[slam_toolbox] Why do graph nodes get sparse over time?

asked 2021-04-09 07:33:31 -0500

wienans gravatar image

updated 2021-04-09 08:13:12 -0500

Hi, i wanted to Map a outdoor environment with the slam_toolbox in a ROS melodic robot. As slam_toolbox uses a graph slam approach i visualized the graph points in RVIZ. But i was wondering why the graph points get less frequent over time.

The red dots are the graph and i started on the right side of the picture. You see that there are many points. Later in the drive to the left you see that the red dots are less frequent. I use the online async slam. I think at the beginning the dots are spaced like defined in the config with the minimum driven distance of 0.5 meter. But why they are spreading out?

edit retag flag offensive close merge delete

Comments

I have had this issue as well, can you reliably reproduce it? I'm wondering if it has anything to do with lack of CPU resources since it I have seen in on a robot but when I convert the map in to a simulated world and run it on my computer (which has more computing power) I don't see the issue

MikeWrock gravatar image MikeWrock  ( 2021-05-03 19:00:47 -0500 )edit

yes i can reproduce it reliably every time. And yes it is running live on the robot so yes limited CPU power might be a problem.

wienans gravatar image wienans  ( 2021-05-05 05:11:53 -0500 )edit

I have used map2gazebo to recreate the map as a world and mapped the area locally with no loss of posegraph node density, so one solution is to replay the sensor data and run mapping offline. If that is not an option, you could try synchronous mapping or stopping the robot while in asynchronous mode to let the algorithm catch up with the sensor data but I have not tested that approach so I'm not sure if it will solve the issue

MikeWrock gravatar image MikeWrock  ( 2021-05-05 12:57:15 -0500 )edit