glim icon indicating copy to clipboard operation
glim copied to clipboard

Indeterminant linear system detected while working near variable

Open hardesh-peppermint opened this issue 1 year ago • 9 comments

Hello,

Firstly thank you for making this package.

Describe the bug I'm trying to run the ROS2 package without IMU. Seeing the error in global optimization as described below.

To Reproduce Set IMU to false and use the CPU method instead of GPU

Expected behavior Error should not come

Screenshots Screenshot from 2024-08-18 21-56-29

Environment (please complete the following information):

  • CPU/GPU: 12th Gen i7
  • OS: Ubuntu 22.04
  • ROS: ROS2 Humble
  • CUDA: None

hardesh-peppermint avatar Aug 18 '24 16:08 hardesh-peppermint

That error happens when IMU is disabled and there is absolutely no overlap between submaps. Please try the following configuration that force creating odometry-based relative pose constraints to make the system well constrained.

config_global_mapping_gpu.json :

  • create_between_factors : true
  • between_registration_type : NONE

https://github.com/koide3/glim/blob/64a98d8ce59e83e07ae59e7765e656b677296c60/config/config_global_mapping_gpu.json#L33

koide3 avatar Aug 21 '24 06:08 koide3

I'm getting a similar error, and I have IMU. What could be the issue?

changh95 avatar Aug 27 '24 11:08 changh95

I run into the same issue with the data you provide -- os1_128_01. Reprodue: set IMU to true and use the CPU method instead of GPU

deliangye avatar Sep 12 '24 19:09 deliangye

Hi @koide3, I'm using the CPU only method for now as I don't have GPU on the robot.

Having overlap between submaps is understandable. Is it possible to integrate wheel odometry in the factor graph to handle this? I have really good wheel odometry and it's updated at 30 Hz

hardesh-peppermint avatar Sep 17 '24 19:09 hardesh-peppermint

Can anybody share a bag file with me to reproduce and fix the issue?

koide3 avatar Sep 21 '24 22:09 koide3

Can anybody share a bag file with me to reproduce and fix the issue?

I completely forgot to send! I'll send you one tomorrow 😅😅😅

changh95 avatar Sep 22 '24 06:09 changh95

@koide3 Sent you the dataset to your email! Bare in mind my dataset is quite long :sweat_smile: - there are 5 rosbags that needs to be played in order, using glim_rosbag. On the 4th rosbag, the reconstruction starts to break, despite good LiDAR overlaps and IMU sensor being present. The error from GTSAM disappears when I used global mapping with pose_graph instead of just gpu.

changh95 avatar Sep 25 '24 04:09 changh95

@changh95 Thanks a lot for sharing the rosbags! These were really helpful to find the cause of the issue. I found that the issue stems from a long trajectory without loops that causes a numerical stability issue in global optimization.

I added a mechanism to fix the factor graph when an indeterminant linear system is detected. I would be glad if you could check if the patch https://github.com/koide3/glim/pull/92 fixes the issue on your side.

I'm also trying to implement a few mechanisms to further improve the stability of global mapping, and they will soon be added to https://github.com/koide3/glim/pull/92.

koide3 avatar Oct 08 '24 15:10 koide3

@koide3 Tested the code on my side (the same rosbag I sent you). It works nicely! The code can deal with the exceptions rising, and the factor graph management resets the state. With this, GLIM can go all the way to the end of the data sequence. :+1:

changh95 avatar Oct 14 '24 06:10 changh95

Hi @koide3 ,

Thank you again for making this package. We briefly met at ICRA earlier this year.

I've resumed my work with this package again. The issue seems to be still there in the latest commit on main. I'm not using IMU and doing the optimization on CPU. Would be great if I can get help debug this issue. Let me know the best way to share some data to fix this issue.

hardesh-peppermint avatar Dec 10 '25 07:12 hardesh-peppermint