|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.|
SLAM with Evarobot in GazeboDescription: Generating a map using gmapping and hector_slam in Gazebo.
Tutorial Level: BEGINNER
Next Tutorial: Navigation of the Evarobot in Gazebo
Map Building using hector_slam ROS Package
Clone hector_slam and evarobot_simulator, and build it.
> cd ~/catkin_ws/src > git clone https://github.com/tu-darmstadt-ros-pkg/hector_slam > git clone https://github.com/inomuh/evarobot_simulator.git > cd ~/catkin_ws > catkin_make
Run Evarobot Gazebo model with a map which is UPlat.sdf for this tutorial
> roslaunch evarobot_gazebo evarobot.launch world_path:=$(rospack find evarobot_gazebo)/worlds/UPlat.sdf
In order to start SLAM with Evarobot in Gazebo, it is enough to run gazebo_slam.launch file.
> roslaunch evarobot_slam gazebo_slam.launch
Use teleop_twist_keyboard package to move the Evarobot with keyboard.
> rosrun teleop_twist_keyboard teleop_twist_keyboard.py
> roslaunch evarobot_viz view_evarobot.launch
Save your new map to disk using map_saver from the map_server package:
> rosrun map_server map_saver -f $(rospack find evarobot_slam)/gazebo_map/map