Search code examples
google-project-tango

Restarting java point cloud demo often fails to reacquire pose data


(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 ?


Solution

  • 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.