ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There's basically 3 different ways to do this:
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:
http://wiki.ros.org/turtlebot_gazebo/Tutorials/indigo/Make%20a%20map%20and%20navigate%20with%20it
http://wiki.ros.org/turtlebot/Tutorials/indigo (Section "5. Simulation" has info on both Gazebo and 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:
http://wiki.ros.org/navigation_stage
e.g.:
sudo apt install ros-kinetic-navigation-stage
roslaunch navigation_stage move_base_gmapping_5cm.launch
# now use the "2D Nav Goal" tool in RViz
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.
Pros:
Cons:
http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData
2 | No.2 Revision |
There's basically 3 different ways to do this:
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:
http://wiki.ros.org/turtlebot_gazebo/Tutorials/indigo/Make%20a%20map%20and%20navigate%20with%20it
http://wiki.ros.org/turtlebot/Tutorials/indigo (Section "5. Simulation" has info on both Gazebo and 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:
http://wiki.ros.org/navigation_stage
e.g.:
sudo apt install ros-kinetic-navigation-stage
roslaunch navigation_stage move_base_gmapping_5cm.launch
# now use the "2D Nav Goal" tool in RViz
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.
Pros:
Cons:
http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData