TurtleBot3 supports simulation development environment that can be programmed and developed with a virtual robot in the simulation. There are two development environments to do this, one is using afake node with 3D visualization tool RViz, and the other is using the3D robot simulator Gazebo.
Thefake nodeis suitable for testing with the robot model and movement, but it does not support sensors.
If you need to perform SLAM or Navigation,Gazebowould be a feasible solution as it supports sensors such as IMU, LDS, and camera.
In this instruction, Gazebo will be mainly introduced which is most widely used among ROS developers.
Read more aboutHow to run Autonomous Collision Avoidance
A simple collision avoidance node is prepared which keeps certain distance from obstacles and make turns to avoid collision. In order to autonomously drive a TurtleBot3 in theTurtleBot3 world, please follow the instruction below.
Terminate the turtlebot3_teleop_key node by enteringCtrl+Cto the terminal that runs the teleop node.