Manual
cd ~/turtlebot4_ws/src
git clone https://github.com/turtlebot/turtlebot4_robot.git
Install dependencies:
cd ~/turtlebot4_ws
vcs import src < src/turtlebot4_robot/dependencies.repos
rosdep install --from-path src -yi
Build the packages:
source /opt/ros/galactic/setup.bash
colcon build --symlink-install
Base
The turtlebot4_base package contains the source code for the rclcpp node
turtlebot4_base_node which runs on the physical robot. This node interfaces with the GPIO
lines of the Raspberry Pi which allows it to read the state of the buttons, as well as write to the
LEDs and display.
Publishers:
● /hmi/buttons: turtlebot4_msgs/msg/UserButton
○ description: Button states of the TurtleBot 4 HMI (TurtleBot 4 model only).
Subscribers:
● /hmi/display: turtlebot4_msgs/msg/UserDisplay
○ description: The current information that is to be displayed (TurtleBot 4 model
only).
● /hmi/led/_<led>: std_msgs/msg/Int32
○ description: Hidden topics indicating the state of each LED.
GPIO Interface
The TurtleBot 4 uses libgpiod to interface with the GPIO lines of the Raspberry Pi. The
gpiochip0 device represents the 40-pin header of the Raspberry Pi and is used for reading and
writing to these pins.