Managing maps#
There are three different procedures to manage your maps. Using:
the
rviz
toolcommand lines through a terminal
the Building Manager through the Web User Interface tool
Through RViz#
When you are done with mapping, two files will
be saved: a map.pgm
occupancy grid image file and a map.yaml
configuration file. These files will be stored on the robot in the path:
$HOME/.pal/ari_maps/configurations
The current map in use is the one pointed to by the symbolic link $HOME/.pal/ari_maps/config
.
In order to list all the maps stored in the robot the button Refresh List of the
Map Configuration
panel must be clicked. The list of available maps will
appear in the panel as shown in the figure below. Note that the one shown in
bold is the active one:
When the navigation is in localization mode, any of
the maps stored in $HOME/.pal/ari_maps/configurations
can be selected.
Map operations available are:
Set Active: the map selected in the list will be loaded and used for navigation
Download Map: this button saves the selected map in the list in the path of the local computer running the Rviz specified by the user
Delete Map: removes the selected map from the robot
Rename Map: change the name of the selected map
Upload Map: copy a map from the local computer to the robot’s computer.
Through a terminal window#
Another option is to use a terminal window for the mapping process, by calling
the following service of the pal_map_manager
to initiate it:
export ROS_MASTER_URI=http://ari-0c:11311
export ROS_IP=10.68.0.128
rosservice call /pal_navigation_sm "input: 'MAP'"
To save the map just built in the right path automatically, use can use the /pal_map_manager/save_map service:
export ROS_MASTER_URI=http://ari-0c:11311
export ROS_IP=10.68.0.128
rosservice call /pal_map_manager/save_map “directory: ‘’”
The save_map service will store all the map files in the same path as indicated above.
Once mapping is finished, instead of using Rviz it is possible to call the following service from a terminal window to save the map and start the localization mode in the latest built map:
export ROS_MASTER_URI=http://ari-0c:11311
export ROS_IP=10.68.0.128
rosservice call /pal_navigation_sm "input: 'LOC'"
To select a different map the following command can be used, which corresponds
to the Set Active button of the MapManagementWidget
:
ssh pal@ari-0c
rosservice call /pal_map_manager/change_map "input: 'MAP_NAME'"
where MAP_NAME
is the name of the map that we want to select.
Through the Building Manager#
The Web User Interface provides user-friendly interfaces to manage the maps in your robot. Check its own documentation page Building Manager.