ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

slam_toolbox for general case SLAM and localization

asked 2022-01-24 13:27:12 -0500

kokko gravatar image

Scenario:

I have a very large indoor area with multiple large rooms that are dynamic in the sense that objects may change position and I want to create its map periodically in order to localize multiple robots. Probably I’m describing the most complex scenario possible. LiDAR measurements and odometry are available and multiple robots can be used for mapping. My strategy to capture the aforementioned dynamicity is the use of multiple robots that will create separate maps frequently and then merge them.

Solution and "hiccup:"

I would like to use slam_toolbox for ROS1 Noetic for mapping since it seems to be more robust than its "competitors". Once a SLAM session has been finished, slam_toolbox serializes and saves poses and graph data into a file.

This great toolbox includes offline map merging functionality that does not fulfill my needs. More specifically, it creates an occupancy grid of all the maps combined, but it does not update appropriately the Karto::Mapper object i.e. the internal graph used to perform localization. According to the code and the README file, it seems that the merged occupancy grid can be used to generate an ordinary image (pgm) map that can be then used for localization e.g. with AMCL.

Questions:

Based on your experience with slam_toolbox:

  • Do you think that the localization performance of AMCL is comparable to the performance of slam_toolbox (given a relatively accurate initial pose) when the map is created by slam_toolbox?
  • In some posts it is argued that slam_toolbox can be used for localization while being in mapping mode. Does this perform well?
  • slam_toolbox argues that it can perform lifelong mapping and prioritize newer nodes, but it is still experimental and has many bugs, judging from related issues. Instead of that, mapping and restarting the whole localization process is obviously the dirtiest solution, but I can guess it performs well. Does this make sense?

Based on your answers and your experience I am thinking of different solutions and possible developments.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2022-01-24 20:02:37 -0500

  1. SLAM Toolbox, while I did add in a pure localization setting, is probably not what you want to use unless you have very good odometry and want to work with previous serialized sessions rather than straight occupancy maps. I wouldn't tell you not to try, but the pure localization mode of SLAM Toolbox was built for a specific niche that isn't the general case for most people. The localization quality during a SLAM session though is quite good as long as your robot isn't slipping on ice or being pushed around. You should probably use AMCL, of the open-source options, unless you know specifically what you're doing.

  2. I'm not sure what you mean by this. SLAM Toolbox does SLAM. There is localization during SLAM (the "L") and mapping (the "M"). This is quite good.

  3. It depends on what you're looking for. Do you care about global correctness? Are you just looking for essentially sliding window positioning without long-term loop closures? How long as these sessions you're thinking of? All of these questions would lead me down different directions depending on the answers.

edit flag offensive delete link more

Comments

Questions 1 and 2: Answered

Question 3:

Since some objects on the map may change location from time to time (not while the robot moves), I am looking ideally for long-term mapping to keep up with the changes.

From what I understand sliding window positioning without long-term loop closures is something that can be provided by slam_toolbox in localization mode.

The sessions should be 2-3 hours long (in the future probably more).

(I am not sure I understand the term global correctness in this context)

kokko gravatar image kokko  ( 2022-01-25 02:52:34 -0500 )edit

I'm not sure I can give you much more specific advice without getting into the weeds of your application, how your autonomy system is structured, and alignment needs. This is something you may have to answer for yourself with some testing / reading the documentation based on your requirements.

stevemacenski gravatar image stevemacenski  ( 2022-01-25 17:48:44 -0500 )edit

That's fine. The point of the post was to get a very general idea about localization based on users' experience and I think I got it. For specifics I will have to experiment with the actual setup. Truly grateful for your advice and your work on the package

kokko gravatar image kokko  ( 2022-01-26 02:47:35 -0500 )edit

Thanks! If I've answered the question sufficiently ,can you make this as correct with the check box so it enters the "answered" list?

stevemacenski gravatar image stevemacenski  ( 2022-01-27 00:13:20 -0500 )edit
0

answered 2022-12-04 15:18:15 -0500

Regarding your first question, if you have a changing or dynamic environment, SLAM_toolbox is the way to go! As it is demonstrated here: SLAM_toolbox performs way better than AMCL (achieving twice better accuracy). In the comparison, also Cartographer and GMCL are included!

Be aware that the comparison was made with a based map that only contains the permanent structures of the building. If you have a good quality map (e.g. from a Floor plan or architectonical model), you can use this tool to create a serialized .posegraph map and use it for localization with SLAM_toolbox!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-01-24 13:27:12 -0500

Seen: 695 times

Last updated: Dec 04 '22