TurtleBot 4 Simulator
The turtlebot4_simulator
metapackage contains packages used to simulate the TurtleBot 4 in Ignition Gazebo.
Installation
Source code is available here.
The turtlebot4_simulator
metapackage can be installed on a PC running Ubuntu Desktop 20.04 with ROS 2 Galactic or Ubuntu Desktop 22.04 with ROS 2 Humble.
Dev Tools
Install useful development tools:
sudo apt install ros-dev-tools
Ignition Gazebo
-
Ignition Edifice must be installed:
sudo apt-get update && sudo apt-get install wget sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt-get update && sudo apt-get install ignition-edifice
-
Ignition Fortress must be installed:
sudo apt-get update && sudo apt-get install wget sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt-get update && sudo apt-get install ignition-fortress
Debian package
-
To install the metapackage through apt:
sudo apt update sudo apt install ros-galactic-turtlebot4-simulator ros-galactic-irobot-create-nodes
-
To install the metapackage through apt:
sudo apt update sudo apt install ros-humble-turtlebot4-simulator
Source installation
-
To manually install this metapackage from source, clone the git repository:
cd ~/turtlebot4_ws/src git clone https://github.com/turtlebot/turtlebot4_simulator.git -b galactic
Install dependencies:
cd ~/turtlebot4_ws vcs import src < src/turtlebot4_simulator/dependencies.repos rosdep install --from-path src -yi
Build the packages:
source /opt/ros/galactic/setup.bash colcon build --symlink-install
-
To manually install this metapackage from source, clone the git repository:
cd ~/turtlebot4_ws/src git clone https://github.com/turtlebot/turtlebot4_simulator.git -b humble
Install dependencies:
cd ~/turtlebot4_ws rosdep install --from-path src -yi
Build the packages:
source /opt/ros/humble/setup.bash colcon build --symlink-install
Ignition Bringup
The turtlebot4_ignition_bringup
package contains launch files and configurations to launch Ignition Gazebo.
-
Launch files:
- Ignition: Launches Ignition Gazebo and all required nodes to run the simulation.
- ROS Ignition Bridge: Launches all of the required
ros_ign_bridge
nodes to bridge Ignition topics with ROS topics. - TurtleBot 4 Nodes: Launches the
turtlebot4_node
andturtlebot4_ignition_hmi_node
required to control the HMI plugin and robot behaviour.
Ignition launch configuration options:
- model: Which TurtleBot 4 model to use.
- options: standard, lite
- default: standard
- rviz: Whether to launch rviz.
- options: true, false
- default: false
- slam: Whether to launch SLAM.
- options: off, sync, async
- default: off
- nav2: Whether to launch Nav2.
- options: true, false
- default: false
- param_file: Path to parameter file for
turtlebot4_node
.- default: /path/to/turtlebot4_ignition_bringup/config/turtlebot4_node.yaml
- world: Which world to use for simulation.
- default: depot
- robot_name: What to name the spawned robot.
- default: turtlebot4
Running the simulator with default settings:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py
Running synchronous SLAM with Nav2:
ros2 launch turtlebot4_ignition_bringup ignition.launch.py slam:=sync nav2:=true rviz:=true
-
Launch files:
- Turtlebot 4 Ignition Launch: Launches Ignition Gazebo and all required nodes to run the simulation.
- Ignition: Launches Ignition Gazebo only.
- ROS Ignition Bridge: Launches all of the required
ros_ign_bridge
nodes to bridge Ignition topics with ROS topics. - TurtleBot 4 Nodes: Launches the
turtlebot4_node
andturtlebot4_ignition_hmi_node
required to control the HMI plugin and robot behaviour.
Turtlebot 4 Ignition launch configuration options:
- model: Which TurtleBot 4 model to use
- options: standard, lite
- default: standard
- rviz: Whether to launch rviz
- options: true, false
- default: false
- localization: Whether to launch localization
- options: true, false
- default: false
- slam: Whether to launch SLAM
- options: true, false
- default: false
- nav2: Whether to launch Nav2
- options: true, false
- default: false
- world: Which world to use for simulation
- options: depot, maze, warehouse
- default: warehouse
- namespace: Optional robot namespace
- options: Any valid ROS 2 name as a string
- default: blank ("")
- x: x coordinate of the robot and dock spawn location in the gazebo world
- options: float representing a valid free location in the map
- default: 0.0
- y: y coordinate of the robot and dock spawn location in the gazebo world
- options: float representing a valid free location in the map
- default: 0.0
- z: z coordinate of the robot and dock spawn location in the gazebo world
- options: float representing a valid free location in the map
- default: 0.0
- yaw: robot and dock orientation at spawn in the gazebo world
- options: float representing a valid free location in the map
- default: 0.0
Running the simulator with default settings:
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py
Running synchronous SLAM with Nav2:
ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py slam:=true nav2:=true rviz:=true
Ignition GUI Plugins
The turtlebot4_ignition_gui_plugins
package contains the source code for the TurtleBot 4 HMI GUI plugin.
-
The TurtleBot 4 HMI GUI plugin is only used for the standard model. The lite model uses the Create® 3 HMI GUI plugin.
-
The TurtleBot 4 HMI GUI plugin is only used for the standard model. The lite model uses the Create® 3 HMI GUI plugin.

Ignition Toolbox
The turtlebot4_ignition_toolbox
package contains the source code for the TurtleBot 4 HMI node. The TurtleBot 4 HMI node acts as a bridge between the turtlebot4_node
and ros_ign_bridge
to convert the custom TurtleBot 4 messages into standard messages such as Int32
and String
.