ROS2 slam toolbox localization mode config example
I could not find an example .yaml config file on how to run slam toolbox in localization mode with a pre-generated map.
I tried a lot of different ways. I ended up with the following file:
# ROS Parameters
odom_frame: odom
map_frame: map
base_frame: base_footprint
scan_topic: /scan
mode: localization #mapping
# if you'd like to start localizing on bringup in a map and pose
map_file_name: map_1589815244.yaml
#map_start_pose: [5.0, 1.0, 0.0]
I put the .yaml and the .pgm file in a folder named _maps_ inside my slam toolbox package. I also added this folder as install directory in my CMakeLists.txt
Nevertheless, if I am starting Slam Toolbox with this configuration, it creates a new map instead of loading the "old" map.
I am using ROS2 Eloquent in Ubuntu 18.04