TurtleBot3 Documentation

repository·main·Indexed 24 days ago

https://github.com/robotis-git/turtlebot3

An open-source mobile robot platform for education and research. This repository provides ROS-compatible drivers, simulation environments, and application packages for machine learning and manipulation. It supports multiple ROS distributions including Humble, Jazzy, and Noetic, and includes Docker configurations for high-performance deployment.

Tokens
1.7K
Snippets
2
Records
6
Agent score
84%

What's inside TurtleBot3

  1. Overview of TurtleBot3 and related projects

    main
    TurtleBot3 is a series of open-source mobile robot platforms. The ecosystem includes specialized repositories for messages, simulations, manipulation, machine learning, and specific hardware drivers (such as LDS sensors and Dynamixel SDK).
  2. Access TurtleBot3 official documentation and learning resources

    main

    For detailed technical guidance, hardware manuals, and video tutorials, use the following official resources:

    Documentation

    Learning & Community

  3. Select the correct TurtleBot3 branch for your ROS version

    main

    When cloning or working with the TurtleBot3 repository, ensure you select the branch that matches your ROS distribution:

    • Active Branches: humble, jazzy, main (for ROS Rolling)
    • Legacy Branches: *-devel, noetic (for ROS 1 Noetic)
  4. Run TurtleBot3 using Docker Compose (Jazzy)

    main

    This docker-compose.yml configuration is designed to run a TurtleBot3 container using the ROS 2 Jazzy image. It provides high-level access to host hardware and networking required for robot simulation or hardware interfacing.

    Key Configuration Details

    • Image: Uses robotis/turtlebot3:jazzy-latest.
    • Hardware Access: The container runs in privileged: true mode and maps /dev to allow direct access to robot hardware. It also includes SYS_NICE capabilities and high real-time priority (rtprio: 99) for low-latency tasks.
    • Networking & IPC: Uses network_mode: host, ipc: host, and pid: host to ensure seamless communication with other ROS 2 nodes running on the host machine.
    • GUI Support: Passes the DISPLAY environment variable and mounts X11 sockets (/tmp/.X11-unix) to allow GUI applications (like Rviz or Gazebo) to render on the host screen.
    • Workspace Mapping:
      • Maps the local ./workspace directory to /workspace inside the container.
      • Maps the parent directory ../../ to /root/turtlebot3_ws/src/turtlebot3 for development.

    Usage

    To start the container, run:

    docker-compose up
    services:
      turtlebot3:
        container_name: turtlebot3
        image: robotis/turtlebot3:jazzy-latest
        tty: true
        restart: unless-stopped
        cap_add:
          - SYS_NICE
        ulimits:
          rtprio: 99
          rttime: -1
          memlock: 8428281856
        network_mode: host
        ipc: host
        pid: host
        environment:
         - DISPLAY=${DISPLAY}
         - QT_X11_NO_MITSHM=1
        volumes:
          - /dev:/dev
          - /dev/shm:/dev/shm
          - /run/udev:/run/udev
          - /tmp/.X11-unix:/tmp/.X11-unix:rw
          - /tmp/.docker.xauth:/tmp/.docker.xauth:rw
          - ./workspace:/workspace
          - ../../:/root/turtlebot3_ws/src/turtlebot3
        privileged: true
        command: bash
  5. Run TurtleBot3 in a Docker container using Humble

    main

    You can deploy the TurtleBot3 environment using Docker Compose with the robotis/turtlebot3:humble-latest image. This configuration is designed for high-performance ROS 2 Humble environments, utilizing host networking and IPC to ensure low-latency communication between the container and the host system. It also includes necessary volume mappings for hardware access (/dev) and GUI rendering (/tmp/.X11-unix).

    services:
      turtlebot3:
        container_name: turtlebot3
        image: robotis/turtlebot3:humble-latest
        tty: true
        restart: unless-stopped
        cap_add:
          - SYS_NICE
        ulimits:
          rtprio: 99
          rttime: -1
          memlock: 8428281856
        network_mode: host
        ipc: host
        pid: host
        environment:
         - DISPLAY=${DISPLAY}
         - QT_X11_NO_MITSHM=1
        volumes:
          - /dev:/dev
          - /dev/shm:/dev/shm
          - /run/udev:/run/udev
          - /tmp/.X11-unix:/tmp/.X11-unix:rw
          - /tmp/.docker.xauth:/tmp/.docker.xauth:rw
          - ./workspace:/workspace
          - ../../:/root/turtlebot3_ws/src/turtlebot3
        privileged: true
        command: bash
  6. Configure TurtleBot3 Docker environment variables and volumes

    main

    The TurtleBot3 Docker configuration relies on specific environment variables and volume mounts to function correctly with hardware and displays:

    Environment Variables

    • DISPLAY: Passed from the host to allow GUI applications to render on the host screen.
    • QT_X11_NO_MITSHM=1: Required for certain Qt-based applications to prevent shared memory issues in X11.

    Critical Volume Mounts

    • /dev:/dev: Provides access to hardware devices.
    • /dev/shm:/dev/shm: Shared memory for ROS 2 communication.
    • /run/udev:/run/udev: Access to udev for device management.
    • /tmp/.X11-unix:/tmp/.X11-unix:rw: Enables X11 window system communication.
    • /tmp/.docker.xauth:/tmp/.docker.xauth:rw: Used for X11 authentication.
    • ./workspace:/workspace: Local workspace mapping.
    • ../../:/root/turtlebot3_ws/src/turtlebot3: Maps the local repository source into the container's ROS 2 workspace.