Hi chopin1998@gmail.
I created together with a colleague a package for having the launch files and config files regarding the navigation stack, please have a look (https://github.com/fontysrobotics/tur...)
Now, if you want to just navigate I highly recommend you to use the navigation core and not slam_toolbox. But, if you want to continue mapping with slam_toolbox (yeah, it is cool and convenient to be able to map and navigate at the same time), then do the following:
- If resume, you need the posegraph/slam data file instead of the simple yaml/pgm file, program crashes if you feed the wrong data
For saving the map: ros2 service call /serialize_map slam_toolbox/srv/SerializePoseGraph "{filename : 'give_any_name'}"
For opening the map to continue mapping: ros2 launch turtlecrab slam_toolbox.launch.py use_map_file:='True' map_file:='<path_to_the_map_location>' map_pose:="[<x, y, z>]"
- Where map_pose is relative to what
/odom
is publishing.
Now, if you saved your map as a .yaml file, then use the core navigation (slam) instead:
ros2 launch turtlecrab nav_core.launch.py map:='<map_location.yaml>'
any help? thanks!