Getting Started with the TurtleBot 4

#equipment#turtlebot4#mobile-robot#ros2#navigation#tutorial

The TurtleBot 4 is the robot students learn ROS 2 on. It is small enough to run in a corridor, carries a lidar and a depth camera, and comes with mapping and navigation working out of the box, so a first project can start from “the robot already drives itself” rather than from wiring. Everyone who starts on it asks what to learn first, and the answer is the same for everyone, so it lives here.

The order below matters more than the volume. Steps 1 and 2 are prerequisites for driving the robot; steps 3 and 4 depend on what your project does.

How to use this

  • Expect the network to be the hard part. The robot is two computers, the Create 3 base and a Raspberry Pi, that talk to your laptop over Wi-Fi. ROS 2’s default discovery relies on multicast, which university and corporate Wi-Fi networks often block. Ask me which network the robots are on before you start, and do not spend an afternoon debugging the campus Wi-Fi.
  • Run new code in the simulator first. The TurtleBot 4 simulator has the same functionality as the real robot, so a bug costs nothing there.
  • Back up the SD card before you change anything on the robot. The Raspberry Pi runs from it, and restoring a backup is far quicker than rebuilding the robot’s software from scratch.
  • You can practice on the robot while you work through the material. If you need access for that, ask me and I will arrange it — time on the TurtleBots is arranged through me, not self-served.
  • Everything below is free, and the software is open source.

1. Setup and networking

Start here regardless of what your project is about. This is the required first step.

Resource What it is Why bother
TurtleBot 4 User Manual Clearpath’s official manual The reference for everything below
Features Specs and hardware overview What is on the robot and what it can carry
Basic Setup Setting up your laptop and the robot Installing the matching ROS 2 and Ubuntu versions
Networking The two discovery options compared Why the robot might be invisible to your laptop
Discovery Server The setup that avoids multicast What works on networks that block multicast

Your laptop must run the Ubuntu and ROS 2 versions that match the robot. Check which ROS 2 version the robot runs before you install anything; the manual has separate instructions for each, and mixing them does not work.

Read the Networking page carefully. Simple Discovery is the default and needs no setup, but it depends on multicast and on the Create 3 joining 2.4 GHz Wi-Fi. Discovery Server avoids both problems at the cost of some extra setup, and it is usually the one that works on a university network.

2. Driving and the Create 3 base

Read this after step 1, with the robot in front of you.

Resource What it is Why bother
Driving your TurtleBot 4 Manual tutorial Controller, keyboard, and command-line driving
Create 3 in the manual The base’s ROS 2 actions and topics Docking, undocking, driving a set distance, and the bump and cliff sensors
Create 3 documentation iRobot’s documentation for the base The base’s own web interface, firmware, and hardware

Drive with the controller or keyboard before you drive from code. The robot is capped at 0.31 m/s in its default safe mode; leave safe mode on. Learn the dock and undock actions early, because a robot that docks itself at the end of every session is a robot that is charged for the next person.

3. Mapping and navigation

Relevant to most projects; this is what the TurtleBot 4 is best at.

Resource What it is Why bother
Generating a map Manual tutorial Building a map of a room with SLAM
Navigation Manual tutorial Localizing on that map and navigating with Nav2
TurtleBot 4 Navigator Python API for navigation Sending goals and routes from your own script
Simulation The robot in Gazebo Practicing all of the above without the robot

Do the whole sequence in simulation first: map, save the map, localize, navigate. Then repeat it on the robot in a room you have mapped yourself. Map with as few people moving around as possible; people walking through a scan end up as walls.

4. Writing your own code

Relevant once your project goes beyond the built-in demos.

Resource What it is Why bother
Creating your first node (Python) Manual tutorial A first ROS 2 node that reads the robot and drives it
TurtleBot4Lessons Clearpath’s lesson repository Structured exercises, if you want a course rather than a reference
Creating a backup of your SD card Manual tutorial The backup from “How to use this,” step by step
FAQ Manual troubleshooting The answers to most “why is it doing that” questions

There is also a C++ version of the first-node tutorial. Write your code on your laptop and run it there, talking to the robot over the network, until it needs to run on the robot itself. The Raspberry Pi is already busy with the drivers.

Specs and links for the sensors: OAK-D Pro Camera and RPLIDAR A1M8 under Accessories below.

Accessories on our TurtleBot 4

These are mounted on or wired to our robot. Each entry lists the maker’s documentation and drivers where they exist.

OAK-D Pro Camera

Luxonis

A stereo depth camera with a color camera between its two depth cameras, mounted under the top plate and facing forward. Its IR dot projector adds texture to blank walls and floors so depth still works there, and an IR flood LED lets it see in low light. It runs neural networks on the camera itself, so object detection does not load the Raspberry Pi.

  • Active stereo depth; ideal range about 0.8–12 m
  • 12 MP color camera (IMX378)
  • On-camera AI processor: 4 TOPS, 1.4 TOPS for AI
  • Built-in 9-axis IMU
ResourceWhat it is
Product documentationLuxonis's specs, depth ranges, and camera details
DepthAI ROSThe ROS 2 driver the TurtleBot 4 uses for the camera
depthai-ros (GitHub)Driver source and example launch files

RPLIDAR A1M8

Slamtec

A 2D laser scanner that spins on top of the robot and measures distance all the way around it. Its scans are what the TurtleBot 4 uses for mapping (SLAM), localization, and obstacle avoidance in Nav2.

  • 360° scanning
  • More than 8,000 distance samples per second
  • Scan rate: 2–10 Hz
  • Micro-USB connection
ResourceWhat it is
Product pageSlamtec's overview and specs for the RPLIDAR A1
rplidar_rosThe ROS 2 driver installed on every TurtleBot 4

What comes next

Once you have worked through the steps relevant to your project, come see me and we will scope a first task on the actual hardware. Bring a specific thing you want the robot to do; “learn the robot” is not a task and you have already done it by this point.