lukasvst / dm-vio-ros

ROS wrapper for DM-VIO: Delayed Marginalization Visual-Inertial Odometry
GNU General Public License v3.0
120 stars 22 forks source link

Many "RE-TRACK ATTEMPT"'s with my own dataset #9

Closed GilMe closed 1 year ago

GilMe commented 1 year ago

Hello there, Great work! I am trying to run the code on my own datasets. In many of my runs while running the code with useimu=0 I get a warning on my output: "RE-TRACK ATTEMPT 30 with initOption 30 and start-lvl 4 (ab -3.100460 68.293648): 5.630381 5.281301 5.038637 5.745661 8.143476 -> 5.630381 5.281309 5.039156 5.745693 8.155555" This happens quite a lot. I was able record a few runs without this happening but it happens in most my runs.

When I run dm-vio with the imu, the program has a hard time initializing. The map that is created isn't very good and the scale changes a lot during the run.

In the camera.txt file I lowered the resolution of the camera from 1024x768 to 768x576. I noticed that if I changed the target resolution to 512x384 dm-vio is able to initialize better when running with the imu, but still the scales change dramatically through out the run.

What could be the cause of the problem? Any suggestions on what I can do?

Thank you very much.

lukasvst commented 1 year ago

Thanks for the kind words!

The "RE-TRACK ATTEMPT" printout is relatively normal when using useimu=0, especially when there are fast camera motions. When moving very slowly it should not appear however, if it still does this might be a sign that camera calibration is bad. My main advice for getting rid of it would be to enable the IMU.

Lowering the resolution was a good idea!

Regarding the IMU: How does your dataset look like? Do you have some acceleration in the beginning or is it almost constant velocity (which would mean that the scale might not be observable in the beginning). If it is the former (sufficient and changing acceleration) the scale should definitely not change dramatically and this might be a sign of something wrong with IMU data / time synchronization or calibration.

You can also try to decrease these parameters, then the system will initialize VIO only when it is more certain about the scale.

init_coarseScaleUncertaintyThresh: 1
init_pgba_scaleUncertaintyThresh: 1
init_pgba_reinitScaleUncertaintyThresh: 0.5

If you paste the full commandline output from one of the runs here, I can have a look. But my main suspicion is that the problem is the IMU data / time synchronization / calibration.

GilMe commented 1 year ago

Hello, Thank you for your help. In the end it was the camera calibration. After I recalibrated the camera I stopped getting those error messages and the scale seems more stable. Thanks again

lukasvst commented 1 year ago

Thanks for letting me know what to problems was and nice to hear that it works now!