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

Revision history [back]

click to hide/show revision 1
initial version

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/turtlecrab)

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 Pose is relative to what odom says, the example one is for turtlebot3 gazebo start, also be aware that it is setup for simulation by default.

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>'

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/turtlecrab)

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 Pose map_pose is relative to what odom says, the example one /odom is for turtlebot3 gazebo start, also be aware that it is setup for simulation by default.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>'