The turtlebot4_simulator metapackage contains packages used to simulate the TurtleBot 4 in Ignition Gazebo.
Source code is available here.
The recommended way to install the Turtlebot4 simulator is to install the debian metapackage, which is available on:
by running
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
sudo apt install ros-galactic-turtlebot4-simulator ros-galactic-irobot-create-nodes
sudo apt install ros-humble-turtlebot4-simulator ros-humble-irobot-create-nodes
sudo apt install ros-jazzy-turtlebot4-simulator ros-jazzy-irobot-create-nodes
For installation from source code, see below.
Install useful development tools:
sudo apt install ros-dev-tools
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
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
Gazebo Harmonic must be installed:
sudo apt-get install curl
sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update
sudo apt-get install gz-harmonic
Source installation is an alternative to the debian package and should only be used if the debian package cannot be used or if modifications are being made to the source code.
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
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
Next, the workspace must be sourced by running source ~/turtlebot4_ws/install/setup.bash in the terminal or by adding that command in the .bashrc file and sourcing the .bashrc file.
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
Next, the workspace must be sourced by running source ~/turtlebot4_ws/install/setup.bash in the terminal or by adding that command in the .bashrc file and sourcing the .bashrc file.
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 jazzy
Install dependencies:
cd ~/turtlebot4_ws
rosdep install --from-path src -yi
Build the packages:
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install
Next, the workspace must be sourced by running source ~/turtlebot4_ws/install/setup.bash in the terminal or by adding that command in the .bashrc file and sourcing the .bashrc file.
Any ROS 2 networking settings on the computer apply to all nodes launched including the simulation nodes. It is recommended to configure the computer for simple discovery prior to running any simulations. If the computer is on the same network as other ROS nodes unrelated to the simulation, then the LOCAL_HOST_ONLY environment variable should be set to True.
The simulation can be run in discovery server mode but the discovery server referenced must exist and be accessible for discovery as well as not having any conflicts in the topics launched.
Simulated robots and physical robots should not be combined in the same system.
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
The turtlebot4_ignition_bringup package contains launch files and configurations to launch Ignition Gazebo.
Launch files:
ros_ign_bridge nodes to bridge Ignition topics with ROS topics.turtlebot4_node and turtlebot4_ignition_hmi_node required to control the HMI plugin and robot behaviour.Ignition launch configuration options:
turtlebot4_node. 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
The turtlebot4_ignition_bringup package contains launch files and configurations to launch Ignition Gazebo.
Launch files:
ros_ign_bridge nodes to bridge Ignition topics with ROS topics.turtlebot4_node and turtlebot4_ignition_hmi_node required to control the HMI plugin and robot behaviour.Turtlebot 4 Ignition launch configuration options:
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
The turtlebot4_gz_bringup package contains launch files and configurations to launch Gazebo.
Launch files:
ros_gz_bridge nodes to bridge Ignition topics with ROS topics.turtlebot4_node and turtlebot4_ignition_hmi_node required to control the HMI plugin and robot behaviour.Turtlebot 4 Gazebo launch configuration options:
Running the simulator with default settings:
ros2 launch turtlebot4_gz_bringup turtlebot4_gz.launch.py
Running synchronous SLAM with Nav2:
ros2 launch turtlebot4_gz_bringup turtlebot4_gz.launch.py slam:=true nav2:=true rviz:=true
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
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 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 turtlebot4_gz_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.
ROS 2 Galactic is no longer supported. Please consider upgrading to a newer release
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.
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.
The turtlebot4_gz_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_gz_bridge to convert the custom TurtleBot 4 messages into standard messages such as Int32 and String.