librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Corrupted Maps Being Exported

Open JBBee opened this issue 7 years ago • 15 comments


Required Info
Camera Model T265
Firmware Version 0.0.18.6100
Operating System & Version Win 10
Kernel Version (Linux Only)
Platform PC
SDK Version 2.25.0
Language unity
Segment AR

Issue Description

I'm seeing an issue with 2.25.0 where it's possible to be unable to import a map that was previously exported by the T265.

To reproduce this in the viewer all I have to do is start and map an area, then stop and export that map. Then import the same file I exported and see if it was successful. If it was successful I run the device for a little with the imported map until it relocalizes. Then stop and repeat the steps from the beginning. After roughly five times the map import fails with the message below.

Invalid Value in rs2_import_localization_map(sensor:0000022AA6265BE0, lmap_blob:R, blob_size:849021): import localization failed, map size 849021

Thanks.

JBBee avatar Aug 06 '19 21:08 JBBee

I tested it a little further, and when the map comes out corrupted the T265 is actually in a bad state where you can't interact with it further until you unplug it and plug it back in.

JBBee avatar Aug 07 '19 14:08 JBBee


Thanks @JBBee, after a while I was able to reproduce the issue as well


Hi @JBBee - are you still running into corrupted maps issue?

Hi @RealSenseCustomerSupport actually we are still seeing corrupted maps being exported every so often in 2.30.0. Please see below.

Steps to reproduce in the viewer:

  • Start with a freshly plugged in T265. Start the module and walk around the room for a bit, for maybe 20 seconds. Stop the module and export the localization map to a file.
  • Import the file just exported and run it for a short while, again about 20 seconds. It should relocalize at some point. Stop the module
  • Start the module and walk around for 20 seconds again. Stop the module and export the localization map.
  • Import the localization map, and here I'm seeing it fail to import, the map is corrupt.

Thanks.

JBBee avatar Nov 12 '19 19:11 JBBee

Thanks for the procedure @JBBee. While we try and duplicate this, could you provide the final map that fails to import?

radfordi avatar Nov 12 '19 20:11 radfordi

Sure @radfordi , here is the corrupted map. Thanks again.

map.zip

JBBee avatar Nov 12 '19 20:11 JBBee

Interesting. Will try to reproduce tomorrow.

neilyoung avatar Nov 12 '19 20:11 neilyoung

Thanks @JBBee. I'm able to duplicate the issue with that map.

radfordi avatar Nov 12 '19 20:11 radfordi

@JBBee, #5234 should fix this. It also doubles the internal map size as a bonus.

radfordi avatar Nov 13 '19 05:11 radfordi

@radfordi I can confirm the issue. I additionally noticed no relocation info on the third run, step 3. Import failed too in step 4. Currently cloning your repo. While running Cmake I got this trace:

--Info: REALSENSE_VERSION_STRING=2.17.0

Not sure if it is just cosmetic.

Anyway. After build I can't make your version run. Starting realsense-viewer just gives this

decades@ubuntu:~/Documents/radfordi-librealsense/build/tools/realsense-viewer$ ./realsense-viewer
 13/11 11:46:12,797 ERROR [140529635838528] (backend-v4l2.cpp:518) Cannot access /sys/class/video4linux
 13/11 11:46:12,804 ERROR [140529635838528] (backend-v4l2.cpp:518) Cannot access /sys/class/video4linux
 13/11 11:46:13,068 ERROR [140529635838528] (backend-v4l2.cpp:518) Cannot access /sys/class/video4linux
 13/11 11:46:13,285 ERROR [140529635838528] (backend-v4l2.cpp:518) Cannot access /sys/class/video4linux

Since your PR is not merged yet, I have to wait for it I guess. Not a problem.

neilyoung avatar Nov 13 '19 12:11 neilyoung

Thanks @radfordi I'll grab it once it's merged.

JBBee avatar Nov 13 '19 16:11 JBBee

@neilyoung, those message aren't related to T265. When running cmake you should have seen:

-- Info: REALSENSE_VERSION_STRING=2.30.0

so I'd guess you don't have my branch checked out. Try doing git checkout t265-release and then building again.

radfordi avatar Nov 13 '19 22:11 radfordi

True. Works. No corrupted map anymore. Double size confirmed. I thought I would have filed an issue, but I can't actually find it: At least under Ubuntu there is no .raw extension on save added. So the file open dialog doesn't find it. It is just an annoyance, just so you know.

It's getting better day by day :) Great PR.

neilyoung avatar Nov 14 '19 05:11 neilyoung

@radfordi 0.2.0.879 in 2.31.0 works great. I'm not seeing any corrupted maps and the relocalization is faster. Thanks!

JBBee avatar Dec 03 '19 23:12 JBBee

Thanks for following up @JBBee.

radfordi avatar Dec 03 '19 23:12 radfordi