Launching TurtleBot 3 simulation in rviz
The TurtleBot 3 rviz simulation is created and controlled by the turtlebot3_fake_node
node.
This node generates the model of the TurtleBot in rviz and allows for it to be run with a teleop node.
Be sure that your ROS IP environment variables are set to localhost
or to the IP address of your computer. In your first terminal window, set the environment variable for the Turtlebot 3 model you wish to use in the rviz simulation. Either burger
or waffle
can be selected for the model parameter. For our examples, we have chosen the model to be burger
:
$ export TURTLEBOT3_MODEL=burger
Then type the following command to launch the simulation:
$ roslaunch turtlebot3_fake turtlebot3_fake.launch
Three nodes are started: robot_state_publisher
, rviz
, and turtlebot3_fake_node
. The following screenshot should appear:
Now you can control the simulated TurtleBot with the keyboard. Open a second terminal window and type the following command:
$ roslaunch...