Turtlebot 3 Simulation
This guide is based on this tutorial for Turtlebot 3. If you want to explore more examples with this particular robot, that is the website to go to.
Complete the previous guide.
By now you should have turtlebot3 metapackage and turtlebot3-msgs package installed. In this guide we will install the required simulation packages
Define your turtlebot 3 model:
echo -e '\nexport TURTLEBOT3_MODEL=waffle_pi' >> ~/.bashrc && source ~/.bashrc
Install simulation metapackage:
cd ~/catkin_ws/src/ git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git cd ~/catkin_ws && catkin_make
Run the Turtlebot 3 fake node:
roslaunch turtlebot3_fake turtlebot3_fake.launch
It should open rviz. Remember that rviz is not simulating the robot, it’s only used for visualization and little interaction. The code that simulates this robot is quite small, you can take a look at it with the following command, but you don’t need to understand it.
rosed turtlebot3_fake turtlebot3_fake.cpp
Control the robot with:
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
For this part we will need to install Gazebo.
Install Gazebo 7:
sudo apt install libgazebo7-dev
Run the simulation:
roslaunch turtlebot3_gazebo turtlebot3_world.launch
Run collision avoidance:
roslaunch turtlebot3_gazebo turtlebot3_simulation.launch
Run rviz for visualization
roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
Play around! Disable the Camera if your computer gets too slow. It is normal due to Gazebo.
You can now explore applications following this guide
Use rosbash tools (rostopic, rosnode, etc.) to check that everything is indeed using ROS topics.