Launching TurtleBot 3 simulation in Gazebo
Before launching TurtleBot 3 in Gazebo, set the environment variable for the Turtlebot 3 model you wish to use in the Gazebo simulation. Either burger
or waffle
can be selected for the model parameter:
$ export TURTLEBOT3_MODEL=burger
To start the simulation, type the following command:
$ roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
You should see the words Advertise odom on odom!
on the screen and a screenshot similar to the following:
Now let us try a more interesting scene with objects for TurtleBot to drive around. Use Quit on the Gazebo application from the menu bar and press Ctrl + C in the terminal window to halt the process. If you close the terminal window at this point, make sure that you export the TURTLEBOT3_MODEL
variable in a new terminal window.
Now, type the following command to spawn the TurtleBot 3 model on the TurtleBot 3 world map:
$ roslaunch turtlebot3_gazebo turtlebot3_world.launch...