koide3 / glim

GLIM: versatile and extensible range-based 3D localization and mapping framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

offline viewer does not optimize

changh95 opened this issue · comments

Describe the bug

I have a large-scale map created using glim_rosbag in /tmp/dump.
There were some drift in Z-direction, which the loop could not be closed automatically during reconstruction stage.
I tried using glim_offline_viewer to explicitly make a loop constraint.

But the app only says 'optimizing...' but does not actually do any optimization.
I can still click and drag on the viewer, so surely there isn't any background processing going on.

If the optimization could not be performed, there should be at least some warning/error messages in the terminal.

One reason behind this bug could be that my factor graph was broken in the first place, due to errors like #65 . I had hidden errors (i.e. errors which are only shown in raw terminal, but not in iridescence viewer), like Warning: Levenberg-Marquardt giving up because cannot decrease error with maximum lambda which I presume it's from GTSAM.

To Reproduce
Steps to reproduce the behavior:

  1. Use glim_offline_viewer to open offline viewer, and then load a map.
  2. Find two factors where a loop could be closed.
  3. Following the instructions in the tutorial, assign 'loop begin' and 'loop close', align two point clouds, and then create factor.
  4. 'optimizing...' message pops up the viewer terminal.
  5. But no optimization actually takes place.

Expected behavior

  • Optimization should be performed.
  • If optimization is mathematically not possible, then there should be error messages visible in the viewer.

Screenshots

image

Environment (please complete the following information):

  • CPU/GPU: Core i9-14900K, RTX 3090
  • OS: Ubuntu 20.04
  • ROS: ROS2 Humble docker by koide3.
  • CUDA: 12.2
  • Build with CUDA: ON

Thanks for reporting the issue.
I thinks the problem stems from the corrupted linear system as you pointed out.
I'm thinking to implement a mechanism to prevent the error in #65 and a tool to fix corrupted graphs in offline_viewer, and I would be glad if you could provide example bag and/or dump files to reproduce the issue.

@koide3
Sure, I'll send you a link to google drive for the dump file via email.