[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

How to load a map

Description: Loading a map, using command-line tools

Tutorial Level: BEGINNER

Next Tutorial: stdr_simulator/Tutorials/Robot manipulation

Using load_map to load a map

This tutorial assumes that you have killed all running nodes, launched in previous tutorials. We will launch a server without a map and then we will load a map using load_map command-line tool.

Launching a server without map

In a new terminal, run:

$ roslaunch stdr_launchers server_no_map.launch

Loading a map, using load_map tool

For more details about load_map see map_loader_node documentation. In new terminal, run:

$ roscd stdr_resources
$ rosrun stdr_server load_map maps/sparse_obstacles.yaml

Spawn a server with a map already loaded

stdr_server_node can take as a command-line argument a filename to a map file and load it on startup. You can include that in a launch file, just like this:

<node type="stdr_server_node" pkg="stdr_server" name="stdr_server" args="$(find stdr_resources)/maps/sparse_obstacles.yaml"/>

or use the launcher provided:

$ roslaunch stdr_launchers server_with_map.launch

To learn how to load a map from STDR GUI, follow this tutorial.


2019-09-21 13:14