JokerJohn / LIO_SAM_6AXIS

LIO_SAM for 6-axis IMU and GNSS.
630 stars 124 forks source link

The mapped point cloud starts to disappearing #27

Closed Dhruv0208 closed 2 years ago

Dhruv0208 commented 2 years ago

Hi, I had a question. I was testing the code, and observed that once all the data from bagfile is published, the point cloud mapped starts to disappear. Can you tell why is that? And also, is there some parameter which can tweaked to delay it? And also which part of code takes care of it? Thank You.

JokerJohn commented 2 years ago

Hi, @Dhruv0208 ! LIO_SAM is an online system, and its back-end optimization module has two threads, scan2map and loop detection. When the host's performance is relatively general, there is indeed insufficient computing power. For example, scan2map is over, but loop detection is not yet. I recommend two solutions:

  1. Slow down when playing bag, such as rosbag play xx.bag -r 0.5
  2. Modify the mapOptimizatioGps.cpp, use deque to load the point cloud sent by the front end, and process it frames by frame in the while loop to turn it into an offline mapping system. The code writing method can refer to the pose_slam thread in my following picture.

image image image image

Dhruv0208 commented 2 years ago

Hi, I tried using the first solution not much of a difference. Regarding the second solution, I am not using GPS info, will it still affect the output if I make changes? Also, the map starts disappearing even when the point cloud data is publishing.

Dhruv0208 commented 2 years ago

image This is a output of the custom data. The bot is moving forward but the data from behind starts to disappear.

JokerJohn commented 2 years ago

@Dhruv0208 you'd better send me a data bag, and then I may configure the params for you!

Dhruv0208 commented 2 years ago

@JokerJohn sorry but I won't be able to share data. Can you tell what parameters are needed to be tweaked? I can try them by myself.