Testing the TurtleBot Simulation
We assume that you have already done the installation step.
Running Gazebo with a TurtleBot
Open a terminal and enter the following command:
NOTE: When you launch Gazebo for the first time it may take a few minutes to update its model database.
You would see an environment, called a Gazebo world, with TurtleBot and some other objects. The scene is the main part of the simulator where objects are animated and you are able to interact with the environment.
We highly recommend using a mouse with a scroll wheel. You can see the basic mouse operations for navigating in the scene and changing the view angle below:
You can watch how it works in this video:
NOTE: Closing Gazebo from the Graphical User Interface (GUI) will not kill
the additional processes spawned with roslaunch. If you need to finish work with
Ctrl+C in the same terminal window.
Rviz is a 3D visualization environment for the ROS. Rviz lets us see what the robot is seeing, thinking and doing. Visualizing and logging sensor information is an important part in developing and debugging.
While Gazebo is running, launch Rviz in a new terminal:
You would see a TurtleBot:
You can see on the picture how to navigate using a wheeled mouse.
Follow the steps below to see what the robot sees:
1. Rotate the camera until you can the TurtleBot from behind.
DepthCloud option from left-bar and you will see TurtleBot’s depth
Image option from left-bar.
NOTE: You will probably have a warning on this step. The problem is that the default topic for image is not supported by simulation. You can see an image with warning below. Go to the next step to choose appropriate topic.
4. You need to change
Image->Image Topic option (choose it from drop-down list)
to show different images depending on which topic you use.
You can watch these steps in this video:
NOTE: To save the configuration as the default, click
When you run Rviz next time, it will load this configuration.
You can find additional information about Gazebo GUI in Gazebo tutorial. You can also find the documentation for Rviz on ROS wiki. In addition, you can ask your questions or find a solution for similar problem on ROS Answers.