introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.74k stars 780 forks source link

Huge optimization error may cause the system to stop when using robust graph optimization #1172

Closed borongyuan closed 9 months ago

borongyuan commented 10 months ago

RGBD/OptimizeMaxError needs to be set to 0 when using Vertigo for robust graph optimization. But this may cause the system to stop with a huge optimization error. [ERROR] (2023-11-28 16:02:38.793) Rtabmap.cpp:3731::process() Huge optimization error detected!Linear error ratio of 138.123383 (edge 41->59, type=1, abs error=13.019796 m, stddev=0.094262). You may consider enabling "RGBD/OptimizeMaxError" to reject those bad optimizations by setting it to a non null value! To reproduce this issue, just try to make the odometry produce a large drift. What is the expected behavior at this time? Vertigo is responsible for rejecting wrong loop closure, so this error should not appear.

matlabbe commented 10 months ago

RGBD/OptimizeMaxError should be indeed zero when Optimizer/Robust is used, from parameter description:

$ rtabmap --params | grep Optimizer/Robust
Param: Optimizer/Robust = "false" [Robust graph optimization using Vertigo (only work for g2o and GTSAM optimization strategies). Not compatible with "RGBD/OptimizeMaxError" if enabled.]

I think that error msg should not happen in that case, or at least should not show up with Optimizer/Robust is true. I updated the code to do so in commit above. Thx for reporting!

borongyuan commented 9 months ago

Thanks