Author: Alessandro Di Fava < alessandro.difava@pal-robotics.com >

Maintainer: Jordi Pages < jordi.pages@pal-robotics.com >

Support: tiago-support@pal-robotics.com

Source: https://github.com/pal-robotics/tiago_dual_tutorials.git

(!) 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.

Create a map with gmapping

Description: This tutorial shows how to create a map of the environment using the range-finder on the base of TIAGo++.

Keywords: Mapping, laser scan matching

Tutorial Level: INTERMEDIATE

Next Tutorial: Localization

mapping_title.jpg

Purpose

This tutorial shows how to create a laser map of the environment with the public simulation of TIAGo++ using gmapping. The map is required to use afterwards AMCL based localization to match laser scans with the map to provide reliable estimates of the robot pose in the map.

Pre-Requisites

First make sure that the tutorials are properly installed along with the TIAGo simulation, as shown in the Tutorials Installation Section.

Execution

First of all open two consoles and source TIAGo++'s public simulation workspace in each one

cd ~/tiago_dual_public_ws
source ./devel/setup.bash

In the first console launch one of the following simulation:

Starting TIAGo ++ simulation

roslaunch tiago_dual_2dnav_gazebo tiago_dual_mapping.launch public_sim:=true

mapping_gazebo.jpg

Note that a rviz will also show up in order to visualize the mapping process.

mapping_rviz_begin.jpg

Starting TIAGo OMNI ++ simulation

roslaunch tiago_dual_2dnav_gazebo tiago_dual_mapping.launch public_sim:=true base_type:=omni_base

TIAGo_OMNI_mapping_gazebo.png

Note that a rviz will also show up in order to visualize the mapping process.

TIAGo_OMNI_mapping_rviz.png

Mapping

In the second console launch the keyboard teleoperation node

rosrun key_teleop key_teleop.py

key_teleop.jpg

By pressing the arrow keys on this console drive TIAGo++ around the world. The map being created will be shown. When the world has been fully mapped, as in the below example

mapping_rviz_end.jpg mapping_gazebo_end.jpg

Press 'q' in the key_teleop console and save the map as follows

rosservice call /pal_map_manager/save_map "directory: ''"

The service call will save the map in the following folder

~/.pal/tiago_dual_maps/config

If the folder ~/.pal/tiago_dual_maps doesn't exist, please create it and run again the previous command to save the map. Now TIAGo++ is ready to do autonomous localization and path planning using the map. See next tutorial on how to make use of maps to perform autonomous navigation.

Wiki: Robots/TIAGo++/Tutorials/Navigation/Mapping (last edited 2022-09-19 16:06:53 by thomaspeyrucain)