ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Experimenting with SLAM navigation with a simulated robot

asked 2018-07-18 16:58:51 -0500

pitosalas gravatar image

updated 2018-07-18 21:48:03 -0500

I am away from my robot and I want to experiment with SLAM and navigation. I am not sure how to get that rigged up, could you point me to a guide or tutorial or posting that can help me get going? Thanks!

edit retag flag offensive close merge delete


Do you want to simulate your own robot or any UGV? For the latter just try the Turtlebot 3 Simulation

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-07-19 02:22:25 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-07-19 03:24:48 -0500

updated 2018-07-20 07:14:47 -0500

There's basically 3 different ways to do this:

1. Gazebo

If you want a realistic 3D simulation (e.g., if you want to build your obstacle map from simulated 3D sensors), the Gazebo simulator is the way to go. For example, here's a tutorial for the Turtlebot2: (Section "5. Simulation" has info on both Gazebo and Stage)

2. Stage

If all you need is a 2D simulation (as is common in navigation + slam), you can use the old but fast "stage" simulator. It's easily 1-2 orders of magnitude faster than Gazebo and really easy to set up if you have a map of the environment. See here:


sudo apt install ros-kinetic-navigation-stage
roslaunch navigation_stage move_base_gmapping_5cm.launch
# now use the "2D Nav Goal" tool in RViz

3. rosbag

Instead of a simulator, you can also record a rosbag of the sensor data from your real robot, and replay it offline to experiment with SLAM and mapping algorithms.


  • real data from your real robot, will work 1:1 on the live robot
  • no need to set up a simulation environment for your specific robot


  • no interactivity: obviously, the recorded robot cannot be controlled from the offline code, so rosbags are only suitable for passive code like SLAM, not active code that wants to command the robot, like move_base

edit flag offensive delete link more


Excellent just what I was looking for! Thanks

pitosalas gravatar image pitosalas  ( 2018-07-20 07:01:20 -0500 )edit

Question Tools

1 follower


Asked: 2018-07-18 16:58:51 -0500

Seen: 2,934 times

Last updated: Jul 20 '18