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

Localization using SLAM_Toolbox

asked 2020-11-13 04:21:59 -0600

MortenMD gravatar image

Hi! I'm trying to get the localization part of SLAM_Toolbox to work. I made a map and saved it using map saver (ros2 run nav2_map_server map_saver_cli -f 'map_name'), which gave me a pgm and yaml file.

According to the readme of SLAM_Toolbox, the input map in the map_file_name is in the format of a pose-graph file, which I do not have. Attempts at using the /slam_toolbox/save_map service in order to serialize the map had no return. Are there any other way to convert the .pgm and .yaml files to the required format?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-11-27 01:34:25 -0600

Rojekk gravatar image

Hi, if you use SlamToolBox plugin in Rviz, it is easy to do. Yo can save your map by simply typing the map name you want in the box which is next to 'Save Map' button, then press the Save Map button. It saves your map to .Ros directory which you can see by pressing ctrl+h at your home directory. If you do the same with the 'Serialize Map' button it saves the map in the format you need.

SlamToolBox rviz config file is in the config file in Slam_Toolbox package and don't forget to source that location in the terminal where you launch rviz, which i did too :D

Hope it helps

edit flag offensive delete link more
0

answered 2022-12-04 15:36:15 -0600

Yes, now there is a way to convert from .pgm to a serialized .posegraph and it is using the Ogm2pgbm package!

If you have a changing or dynamic environment, SLAM_toolbox is the way to go for long-term localization! 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!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-13 04:21:59 -0600

Seen: 2,156 times

Last updated: Dec 04 '22