0

(Wow did SO just select a lot of nonsequitor questions - joy of being on the edge :-)

I find that often when I'm trying to run this app multiple times from Android Studio, subsequent invocations that cause a resume, instead of a cold start (real cold, as in camera permission needed again), the app can no longer acquire pose data - it does get attitude and position data, but it never gets any point clouds because the onPoseAvailable callback in setTangoListeners never gets called again - often I have to reboot the device, sometimes googles app makes everything better, and other times I have to reboot.

I'm pretty sure this is because the proper actions vis connecting to and disconnecting from tango in the Pause and Resume logic is not quite right - however, even when the app is completely rebuilt and installed due to code changes, this irritating behavior remains (irritating) - Anyone have any experience with this ?

Mark Mullin
  • 1,340
  • 1
  • 9
  • 21

1 Answers1

1

I think there are two possible reasons causing this issue, one is the above you mentioned(connect disconnect life cycles), the other one could be the IR frame out of sync issue, as mentioned in Project Tango known issues, as it says:

"Occasionally, or when under high CPU load, the depth flash may appear in the color image, or no depth points are returned. Let the device cool down and/or reboot"

One way to diagnose the problem is to observe the device's IR projector(see Project Tango Tablet Development Kit hardware section). First, launch a depth application, if everything works correctly, you will be able to see a sequence of really dim red flash coming from the IR projector, the red flash pulses around 3Hz. If the problem is connect fails, the IR projector won't give the red pulses. If it is depth out of sync, then you will see the red pulses, but no depth coming out (no callbacks).

Hope it helps.

xuguo
  • 1,816
  • 1
  • 11
  • 15
  • Thats a handy pointer on the red pulses - I do see them, my log shows that XyzIjAvailable has ceased, but if I go to the point cloud demo, that works..... I'm having some success being suspicious of which thread is allocating the Java PointCloud, and I sacrificed a chicken :-) Now, on every third start I don't get point onXyzIjAvailable, and the rest I do, until it magically disappears - I have this feeling there's an exception getting thrown and swallowed somewhere - wondering what kind of client misbehavior can kill off onXyzIhAvailable dispatch – Mark Mullin Jan 07 '15 at 23:38
  • Every third start sounds really magical. Is that happening exactly on the third start? Sounds like a racing condition to me.. There is another test (require some code) you could try maybe. If the IR goes out of sync, you will be able to see it in color image, that basically means, if you render out the videooverlay, you will see the flashing light in the color frame.. Regarding the threading part, one thing to keep in mind is that the callback from onXyzIjAvailable() is actually running on another thread, and data will go out of scope after the function is executed.. :D – xuguo Jan 08 '15 at 00:09
  • Yeah, I've been thinking its a race too - there are certainly issues involving loading and rendering the point cloud - trying to render the video overlay right now which has happily made everything consistently worse - and that is a great factoid on data scope you gave - thanks – Mark Mullin Jan 08 '15 at 14:04