Skip to content

slam_wiki

Rodrigo Serra edited this page Nov 28, 2023 · 1 revision

Map Information

In the robot the maps are saved in the folder: /home/pal/.pal/tiago_maps. The folder config is a shortcut to the current used map. The folder configurations holds all maps in the robot (you can also add here new maps). To change map being used you can run the follwing command:

rosservice call /pal_map_manager/change_map "input: 'NAME_FOLDER_MAP'"

Mapping

To start mapping first disable the move base and localization nodes using the web commander. The list of nodes to turn off are:

localizer
map_configuration_server
map_server
move_base
navigation_sm

Before mapping, place the robot exactly where you want the center of the map to be (this is true of you restart the robot but not otherwise as he keeps the odometry from startup. TODO: try restarting ros_bringup as I think it launches the node rtt_deployer which publishes the odometry).

In the development computer run a teleop and a mapping algorithm, as well as an rviz windows. Such as:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/key_vel  (or just use the joystick in the robot)

roslaunch tiago_2dnav mapping.launch

Remember to confirm if the scan topic on the mapping.launch file is correct. (From tomar, the mapping with both scans was failing, with the /scan_front it worked well)

Move the robot around the environment to map it, avoid high accelerations (specially in rotations). Once you finish it, save it by running in a terminal (run this command in the folder where you want the map to be):

rosrun map_server map_saver -f map1       (or the name of the map you want)

This will leave you with a map, which you can edit using GIMP to put obstacles where the robot should not go, etc.

Once you are satisfied, move the map into the robot (make sure you know how to do this) and define it as the map to be used. (see the [Map Information](#Map Information) section)

Once you finish mapping you can turn the localization and navigation nodes back on.

Save Waypoints

The script which saves the robot waypoints, outputs the data to a file in the current directory. So, make sure that you are in the correct path

roscd mbot_world_model/maps
  • Run the tool for saving waypoints to a text file
rosrun mcr_navigation_tools save_base_map_poses_to_file
  • Move the robot's base to the first waypoint by using the joypad
  • Type the name of the waypoint you want to save as and press enter
  • Move the robot's base to the second waypoint
  • Type the name of the waypoint you want to save as and press enter
  • ...
  • press ctrl + d when done
Clone this wiki locally