TurtleBot 4 Simulator

The turtlebot4_simulator metapackage contains packages used to simulate the TurtleBot 4 in Ignition Gazebo.

Installation

Source code is available here.

Note

The turtlebot4_simulator metapackage can be installed on a PC running Ubuntu Desktop 20.04 with ROS 2 Galactic.

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
    
  • TurtleBot 4 Simulation in Humble is not yet available.

Debian package

  • To install the metapackage through apt:

    sudo apt update
    sudo apt install ros-galactic-turtlebot4-simulator ros-galactic-irobot-create-nodes
    
  • TurtleBot 4 Simulation in Humble is not yet available.

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
    
  • TurtleBot 4 Simulation in Humble is not yet available.

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 and turtlebot4_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
    
  • TurtleBot 4 Simulation in Humble is not yet available.

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.

TurtleBot 4 HMI GUI
TurtleBot 4 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.