Simulation
The simulator allows the user to test the robot without the need for a physical robot. It has all of the same functionality as the real robot. The TurtleBot 4 can be simulated using Gazebo (previously known as Ignition Gazebo). Unlike Gazebo Classic, Gazebo does not natively support ROS. Instead, it has its own transport stack with a similar topic and node implementation. To communicate with ROS, we can use the ros_ign_bridge. This ROS node translates data from ROS to Ignition, and vice versa.
Installing Gazebo
-
Requirements:
- Ubuntu 20.04
- ROS 2 Galactic
-
Requirements:
- Ubuntu 22.04
- ROS 2 Humble
-
Requirements:
- Ubuntu 24.04
- ROS 2 Jazzy
Recommended:
- PC with dedicated GPU
Follow the installation instructions described here.
Launching Gazebo
For a full tutorial using Gazebo, see the Navigation tutorial
- Warning
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
The
ignition.launch.py
launch file has several launch configurations that allow the user to customize the simulation.Default TurtleBot 4 launch:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py
Ignition Gazebo will launch and spawn the TurtleBot 4 in the default world along with all of the necessary nodes.
TurtleBot 4 Lite launch:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py model:=lite
-
The
turtlebot4_ignition.launch.py
launch file has several launch configurations that allow the user to customize the simulation.Default TurtleBot 4 launch:
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py
Ignition Gazebo will launch and spawn the TurtleBot 4 in the default world along with all of the necessary nodes.
TurtleBot 4 Lite launch:
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py model:=lite
-
The
turtlebot4_gz.launch.py
launch file has several launch configurations that allow the user to customize the simulation.Default TurtleBot 4 launch:
ros2 launch turtlebot4_gz_bringup turtlebot4_gz.launch.py
Gazebo will launch and spawn the TurtleBot 4 in the default world along with all of the necessary nodes.
TurtleBot 4 Lite launch:
ros2 launch turtlebot4_gz_bringup turtlebot4_gz.launch.py model:=lite