Using PositionalTracking sample has SPATIAL_MEMORY_STATUS stuck at INITIALIZING.

Hi!

I am using the positional tracking sample to create an area map from an svo2 (./ZED_Positional_Tracking --svo vid.svo2 --map -o out.map) and attempting to localise using that same svo2 (./ZED_Positional_Tracking --svo vid.svo2 -i out.map).

When creating the map I see the SPATIAL_MEMORY_STATUS go into INITIALIZING then MAP_UPDATE. However when using the map to localise it is stuck in INITIALIZING.

What means do I have to investigate this? e.g Do you have any sample (known good) recordings I could use to check if this is a problem with my recording?

Thanks!

After some playing around I have some findings:

  • Staying completely in INITIALIZING seems to be when using the same recording for both generating and localising in the area file
  • Visually similar recordings do eventually localise (although it takes longer and more movement through my scene than I would expect).

Hi,

Your second observation is the key one, and your recording is not at fault. I reproduced this on SDK 5.4: localising a recording against an area file built from that same recording, started from frame 0, can never leave INITIALIZING, because the tracker starts already on the map origin so there is no loop closure to find. The poses are correct throughout, they just never get reported as localised.

For a valid check, call setSVOPosition(600) right after open() before the localisation pass. Same SVO, same area file, and I get KNOWN_MAP after about 250 frames. Note also that KNOWN_MAP and LOOP_CLOSED are the localised states, while SEARCHING and OK are deprecated in GEN_3.

Which SDK version are you on? The 5.1 era sample hardcodes GEN_1, which is not designed for area relocalisation, and sets svo_real_time_mode = true which drops frames on replay. That would explain the slower relocalisation on your other recordings.

Best regards,

Tristan