Advertisement

Quick Links

Turtlebot4 User Manual
TurtleBot 4 Lite (left) and TurtleBot 4 (right)
TurtleBot 4 is the next-generation of the world's most popular open source robotics
platform for education and research, offering better computing power, better sensors
and a world class user experience at an affordable price point.
TurtleBot 4 comes in two models - TurtleBot 4 and TurtleBot Lite. Both are equipped
with an iRobot® Create® 3 mobile base, a powerful Raspberry Pi 4 running ROS 2,
OAK-D stereo camera, 2D LiDAR and more. All components have been seamlessly
integrated to deliver an out-of-the-box development and learning platform. Tap into the
thriving open source ROS developer community and get started learning robotics on
day one.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Turtlebot4 and is the answer not in the manual?

Questions and answers

Summary of Contents for CLEARPATH Turtlebot4

  • Page 1 Turtlebot4 User Manual TurtleBot 4 Lite (left) and TurtleBot 4 (right) TurtleBot 4 is the next-generation of the world's most popular open source robotics platform for education and research, offering better computing power, better sensors and a world class user experience at an affordable price point.
  • Page 2 Features TurtleBot 4 TurtleBot 4 Lite Hardware Specifications Sensors RPLIDAR A1M8 OAK-D-Lite OAK-D-Pro Resources Software Ubuntu Raspberry Pi ROS2 TurtleBot 4 iRobot® Create® 3 Luxonis SLAMTEC Quick Start Powering on the robot Installing ROS2 Galactic on your PC Network Configuration WiFi Setup Find the Raspberry Pi IP on your network Create®...
  • Page 3 User PC TurtleBot 4 Packages TurtleBot 4 Installation Debian installation Source installation Description Messages Actions Messages Services Navigation TurtleBot 4 Navigator Node Functions Configuration Buttons Example LEDs Examples Display Menu Control TurtleBot 4 Robot Installation Source installation Base GPIO Interface I2C Interface SSD1306 Configuration...
  • Page 4 Visualisation TurtleBot 4 Simulator Installation Dev Tools Ignition Edifice Debian installation Source installation Ignition Bringup Ignition GUI Plugins Ignition Toolbox Sensors RPLIDAR A1M8 Connecting Installing Running OAK-D Connecting Installing Running Create® 3 Cliff Bumper Wheeldrop IR Proximity Slip and Stall Kidnap Rviz2 View Model...
  • Page 5 Launch files Parameters Configuration Examples Navigating with Rviz2 Simulation Installing Ignition Gazebo Launching Ignition Gazebo TurtleBot 4 Attaching Accessories to the Top Integration Plate Removing the Top Integration Plate Making Modifications to the Top Integration Plate Attaching Accessories to the Base Unit Removing the PCBA Removing the Create®...
  • Page 6 User USB-C Ports Power Budget Driving your TurtleBot 4 Keyboard Teleoperation Joystick Teleoperation Command Velocity Create® 3 Actions Creating your first node (C++) Create a workspace Create a package and node Write your node Add your dependencies Create a class Subscribe to the Create®...
  • Page 7 SLAM vs Localization SLAM Localization Nav2 Launching navigation Interacting with Nav2 2D Pose Estimate Publish Point Nav2 Goal TurtleBot 4 Navigator Navigate to Pose Code breakdown Initialise the node Dock the robot Set the initial pose Wait for Nav2 Set the goal pose Undock the robot and go to the goal pose Watch navigation progress in Rviz Navigate Through Poses...
  • Page 8 Restart the robot Access the RPi over Ethernet 1. Waiting to connect to bluetoothd… 2. No default controller available Common issues with the user PC 1. ros2: command not found 2. Create® 3 topics are not visible...
  • Page 9 Overview Features TurtleBot 4 TurtleBot 4 The TurtleBot 4 is a ROS2-based mobile robot intended for education and research. The TurtleBot 4 is capable of mapping its surroundings, navigation autonomously, running AI models on its camera, and more. It uses a Create®...
  • Page 10 TurtleBot 4 UI Board On top of the UI board sits a RPLIDAR A1M8 360 degree lidar, and an OAK-D-Pro camera. Above the sensors is the sensor tower, which allows the user to customize their TurtleBot4 with additional sensors or payloads.
  • Page 11 TurtleBot 4 Lite TurtleBot 4 Lite The TurtleBot 4 Lite is a barebones version of the TurtleBot 4. It has just the necessary components for navigation, mapping, and AI applications. The TurtleBot 4 has the same Raspberry Pi 4B, which sits in the cargo bay of the Create® 3, as well as the same RPLIDAR A1M8.
  • Page 12 Hardware Specifications Feature TurtleBot 4 Lite TurtleBot 4 Size (L x W x H) 342 x 339 x 192 mm 342 x 339 x 351 mm Weight 3270 g 3945 g Base platform iRobot® Create® 3 iRobot® Create® 3 Wheels (Diameter) 72 mm 72 mm Ground Clearance...
  • Page 13 VBAT @ 300 mA VBAT @1.9A 12V @ 300 mA User Power 5V @ Low current 5V @ 500 mA 3.3V @ Low current 3.3v @ 250 mA USB 2.0 (Type A) x2 USB 2.0 (Type A) x2 USB Expansion USB 3.0 (Type A) x1 USB 3.0 (Type A) x2 USB 3.0 (Type C) x4...
  • Page 14 Sensors RPLIDAR A1M8 RPLIDAR A1M8 The RPLIDAR A1M8 is a 360 degree Laser Range Scanner with a 12m range. It is used to generate a 2D scan of the robots surroundings. Both the TurtleBot 4 and TurtleBot 4 Lite use this sensor. For more information, click here. OAK-D-Lite OAK-D-Lite The OAK-D-Lite camera from Luxonis uses a 4K IMX214 colour sensor along with a...
  • Page 15 OAK-D-Pro OAK-D-Pro The OAK-D-Pro offers all of the same features the OAK-D-Lite has, but uses higher resolution OV9282 stereo sensors and adds an IR laser dot projector and an IR illumination LED. This allows the camera to create higher quality depth images, and perform better in low-light environments.
  • Page 16 ● Nav2 ○ Documentation: https://navigation.ros.org/ ○ Github: https://github.com/ros-planning/navigation2 ● SLAM ○ slam_toolbox: https://github.com/SteveMacenski/slam_toolbox TurtleBot 4 ● Common package: https://github.com/turtlebot/turtlebot4 ● Desktop visualization package: https://github.com/turtlebot/turtlebot4_desktop ● Simulator package: https://github.com/turtlebot/turtlebot4_simulator ● Robot package: https://github.com/turtlebot/turtlebot4_robot ● TurtleBot 4 images: http://download.ros.org/downloads/turtlebot4/ ● TurtleBot 4 hardware:...
  • Page 17 iRobot® Create® 3 ● Product details: https://edu.irobot.com/what-we-offer/create3 ● Hardware overview: https://iroboteducation.github.io/create3_docs/hw/overview/ ● Electrical overview: https://iroboteducation.github.io/create3_docs/hw/electrical/ ● Create® 3 Simulator: https://github.com/iRobotEducation/create3_sim ● irobot_create_msgs: https://github.com/iRobotEducation/irobot_create_msgs Luxonis ● OAK-D-Lite product details: https://docs.luxonis.com/projects/hardware/en/latest/pages/DM9095.html ● OAK-D-Pro product details: https://docs.luxonis.com/projects/hardware/en/latest/pages/DM9098pro.html ● Depthai-ROS: https://github.com/luxonis/depthai-ros/tree/main ● Depthai-ROS Examples: https://github.com/luxonis/depthai-ros-examples ●...
  • Page 18 Quick Start Powering on the robot To power the robot, place it on the charging dock. The Create® 3 lightring will turn on and the Raspberry Pi will be powered as well. To power off the robot, remove it from the dock and press and hold the Power button on the Create®...
  • Page 19 ● On the first boot, the Raspberry Pi will enter AP mode which will allow you to connect to it over WiFi. ● On a PC, connect to the WiFi network. The password is also Turtlebot4 Turtlebot4 ● Once connected, you can SSH into the Raspberry Pi to configure its WiFi. ssh ubuntu@10.42.0.1 ●...
  • Page 20 Find the Raspberry Pi IP on your network The TurtleBot 4 will display its WiFi IP address on the display. WiFi IP address on a TurtleBot 4 For the TurtleBot 4 Lite, you will need to check the topic for the new address.
  • Page 21 On your PC, run the following commands: source /opt/ros/galactic/setup.bash ros2 topic echo You should see the IP address printed out in your terminal periodically. Echoing the IP address of a TurtleBot 4 If you are unable to find the IP address with the previous methods, you can try to use: nmap 192.168.1.0/24 Make sure to replace...
  • Page 22 Once you have found the IP address, you can now ssh back into the robot with it. ssh ubuntu@xxx.xxx.xxx.xxx If you wish to put the Raspberry Pi back into AP mode, you can call sudo wifi.sh Create® 3 WiFi Setup ●...
  • Page 23 Connecting the Create® 3 to WiFi ● Wait for it to connect to WiFi and play a chime ● On your PC, run to ensure that the Create® 3 is publishing its ros2 topic list topics TurtleBot 4 Controller Setup The TurtleBot 4 comes with an included TurtleBot 4 Controller.
  • Page 24 Putting the TurtleBot 4 in pair mode ● In the CLI look for a Wireless Controller device to be found. It will have a MAC address similar to A0:5A:5C:DF:4D:7F ● Copy the MAC address. ● In the CLI enter , replacing with the controllers trust MAC_ADDRESS MAC_ADDRESS...
  • Page 25 Update over WiFi The Create® 3 can be updated through its webserver. There are two options to connect to the webserver: Find the IP address of the Create® 3 on your WiFi network. This can be done by going to your routers portal and viewing connected devices. You should see the Create®...
  • Page 26 @Create3-G.X.Y.swu http://192.168.186.2/api/firmware-update This may take a few minutes. Debian packages Debian packages can be updated by calling: sudo apt update sudo install <PACKAGE> For example, updating the package can be done like this: turtlebot4_desktop sudo apt update sudo install ros-galactic-turtlebot4-desktop...
  • Page 27 If you wish to install the latest image onto your robot, follow these instructions. The latest TurtleBot 4 Raspberry Pi images are available at http://download.ros.org/downloads/turtlebot4/. ● Download the latest image for your robot model and extract it. ● Power off your robot and then remove the microSD card from the Raspberry Pi.
  • Page 28 ● The SD card should have a name like /dev/mmcblk0 /dev/sda ● If you wish to backup your current image, do so now: sudo dd if=/dev/<SD_NAME> of=<IMAGE_PATH> bs=1M Note SD_NAME is the device name ( , etc.). mmcblk0 IMAGE_PATH is the path to where you want the image saved – e.g., ~/turtlebot4_images/backup_image ●...
  • Page 29 Software ● Overview ● TurtleBot 4 Packages ● Sensors ● Rviz2 ● SLAM ● Nav2 ● Simulation Overview The TurtleBot 4 runs on Ubuntu 20.04 LTS (Focal Fossa) and currently only supports ROS2 Galactic. The TurtleBot 4 software is entirely open source under the Apache 2.0 license, and is available on the TurtleBot Github.
  • Page 30 Create® 3 The Create® 3 exposes ROS2 topics, actions, and services over both WiFi and the USB-C cable powering the Raspberry Pi. This gives users access to the battery state, sensor data, docking actions, and more. While the Create® 3 can be used with just the USB-C interface, in order to view the robot model on Rviz or run software such as SLAM or Nav2 from a user PC, the Create®...
  • Page 31 TurtleBot 4 Packages The TurtleBot 4 has 4 main repositories for software: turtlebot4, turtlebot4_robot, turtlebot4_desktop, and turtlebot4_simulator. Each repository is also a metapackage contains one or more ROS2 packages. TurtleBot 4 turtlebot4 repository contains common packages that are used by both turtlebot4_robot turtlebot4_simulator.
  • Page 32 Build the packages: source /opt/ros/galactic/setup.bash colcon build --symlink-install Description turtlebot4_description package contains the URDF description of the robot and the mesh files for each component. The description can be published with the robot_state_publisher. Messages turtlebot4_msgs package contains the custom messages used on the TurtleBot 4: ●...
  • Page 33 ● Button: Status for a button. ● Dock: Information about the robot sensing the its dock charging station. ● HazardDetection: An hazard or obstacle detected by the robot. ● HazardDetectionVector: All the hazards and obstacles detected by the robot. ● InterfaceButtons: Status of the 3 interface buttons on the Create® robot faceplate. ●...
  • Page 34 ● SLAM Async: Launches slam_toolbox with online asynchronous mapping. Recommended for use on the Raspberry Pi 4. Nav Bringup launch configuration options: ● namespace: Top-level namespace. ○ default: None ● use_namespace: Whether to apply a namespace to the navigation stack. ○...
  • Page 35 ros2 launch turtlebot4_navigation nav_bringup.launch.py localization:=true slam:=off map:=/path/to/map.yaml TurtleBot 4 Navigator TurtleBot 4 Navigator is a Python node that adds TurtleBot 4 specific functionality to the Nav2 Simple Commander. It provides a set of Python methods for navigating the TurtleBot 4. This includes docking, navigating to a pose, following waypoints, and more.
  • Page 36 ○ description: Enable or disable motor stop. ● /robot_power: irobot_create_msgs/srv/RobotPower ○ description: Power off the robot. Action Clients: ● /dock: irobot_create_msgs/action/DockServo ○ description: Command the robot to dock into its charging station. ● /wall_follow: irobot_create_msgs/action/WallFollow ○ description: Command the robot to wall follow on left or right side using bump and IR sensors.
  • Page 37 ● wifi.interface: The Wi-Fi interface being used by the computer. This is used to find the current IP address of the computer. ● menu.entries: Set menu entries to be displayed. Each entry must be one of the support functions. ● buttons: Set the function of Create® 3 and HMI buttons. ●...
  • Page 38 Example Lets say we want the TurtleBot 4 to have the following button functions: ● Make a short press of Create® 3 button 1 toggle EStop. ● Power off robot with 5 second press of Home on the TurtleBot 4 Controller. ●...
  • Page 39 Status LEDs: ● POWER: Always ON while turtlebot4_node is running. ● MOTOR: ON when wheels are enabled, OFF when wheels are disabled. ○ Wheel status is reported on the /wheel_status topic. ● COMMS: ON when communication with Create® 3 is active. OFF otherwise. ○...
  • Page 40 User 1: Solid Green USER_1 OFF: ros2 topic pub /hmi/led turtlebot4_msgs/msg/UserLed "led: 0 color: 0 blink_period: 1000 duty_cycle: 1.0" --once...
  • Page 41 User 1: Off Blink USER_2 red at 1hz with 50% duty cycle: ros2 topic pub /hmi/led turtlebot4_msgs/msg/UserLed "led: 1 color: 2 blink_period: 1000 duty_cycle: 0.5" --once...
  • Page 42 User 2: Red, 1hz, 50% Display Display class in turtlebot4_node controls the HMI display of the TurtleBot 4. The physical display is a 128x64 OLED which is controlled over I2C with a SSD1306 driver. The display has a header line which contains the IP address of the Wi-Fi interface specified in configuration, as well as the battery percentage received on the /battery_state topic.
  • Page 43 ● The select function will call the currently selected menu entry. This can trigger an action such as docking, a service such as EStop, or display a message such as the Help message. This function is mapped to user button 1 by default. ●...
  • Page 44 ~/turtlebot4_ws/src git clone https://github.com/turtlebot/turtlebot4_robot.git Install dependencies: ~/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 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.
  • Page 45 I2C Interface The linux I2C drivers are used to read and write data on the I2C buses of the Raspberry Pi. The display's SSD1306 driver is connected to the i2c-3 device by default, but other buses are available too. SSD1306 The SSD1306 is a driver for OLED displays.
  • Page 46 To check if the TurtleBot 4 service is running, use this command on the Raspberry Pi: systemctl | grep turtlebot4 If the service is active, the CLI will echo turtlebot4.service loaded active running "bringup turtlebot4". To read the most recent logs from the service, call: sudo journalctl -u turtlebot4 -r...
  • Page 47 TurtleBot 4 diagnostics updater. Launch files: ● Diagnostics: Launches the turtlebot4 diagnostics updater and the diagnostic aggregator node. Diagnostics Updater diagnostics updater is a Python3 node that runs on the robot. It subscribes to diagnostic topics records statistics specific to each topic.
  • Page 48 Diagnostic topics: ● /battery_state: Check battery voltage and percentage. ● /wheel_status: Check if wheels are enabled. ● /dock: Check if the robot is docked. ● /scan: Check the frequency of laser scans from the RPLIDAR. ● /left/image: Check the frequency of images from the left OAK-D camera. ●...
  • Page 49 ROS Tests The ROS tests use ROS topics and actions to test various system functionality. Test results are saved to ~/turtlebot4_test_results/Y_m_d-H_M_S where Y_m_d-H_M_S is the date and time of the test. A rosbag is also recorded for the duration of the test and saved to the same location. Currently supported tests: ●...
  • Page 50 Running the Light Ring test...
  • Page 51 PC running Ubuntu Desktop 20.04 with ROS2 Galactic. Debian installation To install the metapackage through apt: sudo apt update sudo install ros-galactic-turtlebot4-desktop Source installation To manually install this metapackage from source, clone the git repository: ~/turtlebot4_ws/src git clone https://github.com/turtlebot/turtlebot4_desktop.git Install dependencies: ~/turtlebot4_ws rosdep...
  • Page 52 Visualisation turtlebot4_viz package contains launch files and configurations for viewing the robot in Rviz2, and viewing the diagnostics. Launch files: ● View Diagnostics: Launches rqt_robot_monitor to view diagnostic data. ● View Model: Launches rviz2. Used to view the model and sensor data. ●...
  • Page 53 Debian installation To install the metapackage through apt: sudo apt update sudo install ros-galactic-turtlebot4-simulator ros-galactic-irobot-create-nodes Source installation To manually install this metapackage from source, clone the git repository: ~/turtlebot4_ws/src git clone https://github.com/turtlebot/turtlebot4_simulator.git Install dependencies: ~/turtlebot4_ws vcs import src < src/turtlebot4_simulator/dependencies.repos...
  • Page 54 ○ 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...
  • Page 55 TurtleBot 4 HMI GUI plugin Ignition Toolbox 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 ros_ign_bridge convert the custom TurtleBot 4 messages into standard messages such as Int32 and String.
  • Page 56 Sensors RPLIDAR A1M8 Connecting The RPLIDAR connects to the TurtleBot 4 with a micro USB to USB-A cable. The sensor does not require high data throughput, so using a USB 2.0 port is sufficient. Once connected, the RPLIDAR should register on the Raspberry PI as a USB device. If the udev rules are installed, the RPLIDAR will appear as /dev/RPLIDAR.
  • Page 57 OAK-D Connecting The OAK-D cameras are connected to the Raspberry Pi with a USB-C to USB-A cable. The cameras requires high data throughput so using a USB 3.0 port is highly recommended. Installing The OAK-D drivers are installed by default on all TurtleBot 4's. To manually install, follow the instructions on the DepthAI ROS github.
  • Page 58 The Create® 3 has 4 cliff sensors located on the front half of the robot. These sensors measure the distance from the robot to the ground, and prevent the robot from falling off of cliffs. Bumper The bumper is used by the Create® 3 to detect objects or walls that the robot has run in to. It can trigger reflexes to recoil from the object, or use the information to follow the wall.
  • Page 59 Rviz2 Rviz2 is a port of Rviz to ROS2. It provides a graphical interface for users to view their robot, sensor data, maps, and more. It is installed by default with ROS2 and requires a desktop version of Ubuntu to use. turtlebot4_desktop provides launch files and configurations for viewing the TurtleBot 4 in Rviz2.
  • Page 60 View Robot For a top down view of the robot in its environment, run ros2 launch turtlebot4_viz view_robot.launch.py. This is useful when mapping or navigating with the robot Rviz2 launched with the View Robot configuration Rviz2 Displays Rviz2 offers support for displaying data from various sources. Displays can be added using the "Add"...
  • Page 61 Adding Displays in Rviz2...
  • Page 62 LaserScan The LaserScan display shows data for sensor_msgs/msg/LaserScan messages. On the TurtleBot 4 the RPLIDAR supplies this data on the /scan topic. LaserScan displayed in Rviz2 Camera The Camera display shows camera images from sensor_msgs/msg/Image messages. The OAK-D cameras publish images on the /color/preview/image /stereo/depth topics.
  • Page 63 Camera image displayed in Rviz2...
  • Page 64 The TF display can be used to visualise the links that make up the robot. When you first add the TF display, it will show every link that makes up the robot. TF with default settings You can uncheck the "All Enabled" box, and then select the links you wish to see. TF with selected links...
  • Page 65 SLAM Simultaneous localization and mapping (SLAM) is a method used in robotics for creating a map of the robots surroundings while keeping track of the robots position in that map. The TurtleBot 4 uses slam_toolbox to generate maps by combining odometry data from the Create® 3 with laser scans from the RPLIDAR.
  • Page 66 proccessing power. This approach is ideal for use on the TurtleBot 4's Raspberry Pi. The default parameters for asynchronous SLAM use a reduced map resolution to further improve performance on the Pi. Launching asynchronous SLAM: ros2 launch turtlebot4_navigation slam_async.launch.py Saving the map Once you have driven the robot around and generated the map, you can use the following call to save the map to your current directory: ros2 service call /slam_toolbox/save_map slam_toolbox/srv/SaveMap...
  • Page 67 Nav2 Nav2 is the official navigation stack in ROS2. Nav2 can be used to calculate and execute a travel path for the robot by using a map of its surroundings. The map can be loaded at launch or generated with SLAM while navigating.
  • Page 68 Examples Launching Nav2 with synchronous SLAM: ros2 launch turtlebot4_navigation nav_bringup.launch.py slam:=sync The map and costmaps can be viewed in Rviz2: ros2 launch turtlebot4_viz view_robot.launch.py Nav2 with SLAM Obstacles that are detected on the map will have a padding around with a radius equivalent to the radius of the robot.
  • Page 69 Navigating with Rviz2 The easiest way to set a navigation goal is to use Nav2 Goal in Rviz2. With Nav2 running, select the Nav2 Goal tool at the top of Rviz2, and click the location on the map where you would like to navigate to.
  • Page 70 Simulation The simulator allows the user to test the robot without the need for a physical robot. It has all of the same functionality as the real robot. The TurtleBot 4 can be simulated using Ignition Gazebo. Unlike Gazebo, Ignition Gazebo does not natively support ROS. Instead, it has its own transport stack with a similar topic and node implementation.
  • Page 71 TurtleBot 4 in Ignition Gazebo TurtleBot 4 Lite launch: ros2 launch turtlebot4_ignition_bringup ignition.launch.py model:=lite TurtleBot 4 Lite in Ignition Gazebo...
  • Page 72 Mechanical TurtleBot 4 TurtleBot 4 is designed to be modified to meet your needs and make it possible to attach additional sensors and accessories. Attaching Accessories to the Top Integration Plate The TurtleBot 4 is equipped with an acrylic plate at the top that is easy to modify in order to attach additional sensors and peripherals.
  • Page 73 To attach accessories above the PCBA, mounting brackets can be designed for the desired accessory and attached to the TurtleBot 4 by securing them to the standoffs. 3D models of the TurtleBot4 are available on Github that can help in the design process.
  • Page 74 Removing the PCBA To access the inside of the "Shell" of the TurtleBot4, the PCBA can be removed. Ensure that you have a safe spot to place the PCBA when it is removed to prevent damage to the components. It is recommended that this procedure is done on an Electrostatic Discharge Mat to protect the PCBA from damage caused by static electricity.
  • Page 75 Removing the Create® 3 Integration Plate and Shell The Create® 3 Integration Plate and Shell can be removed with the rest of the assembly on or off. To remove the Create® 3 Integration Plate, first open and remove the rear Create® 3 tray. Then disconnect the USB C cable and the power harness from the Create®...
  • Page 76 TurtleBot 4 Lite TurtleBot Lite is built on the iRobot Create® 3 learning platform which features an easy to modify integration plate. Attaching Accessories to the Base Unit There is space for sensors and accessories to be attached to the base unit around the Oak Camera and RPILIDAR.
  • Page 77 Removing the Create® 3 Integration Plate The Create® 3 Integration Plate can be removed. To remove the Create® 3 Integration Plate follow the steps below. 1. Disconnect the USB cables connected to the Oak-D Camera and the RPLIDAR. Feed these cables through the slot opening at the back of the Robot. TurtleBot 4 Lite Cable Passthrough 1.
  • Page 78 cables that were previously disconnected through the slot. Attach the USB-C cable to the Oak-Camera and connect the USB Micro cable to the RPLIDAR. Accessing the Raspberry Pi Computer The Raspberry Pi is found in the rear tray of the robot. To fully access the Raspberry Pi, disconnect the USB cables connected to the Oak Camera and RPLIDAR and feed them through the slot opening at the rear of the robot.
  • Page 79 Payloads Over 9kg The TurtleBot4 is able to perform with heavier payloads over 9 kg, however some mechanical and software changes must be made for ideal operation. If these changes are not used the system may become unstable and difficult to control.
  • Page 80 When reassembling the robot with new hardware, ensure that all fasteners are torqued according to the fastener and mating threads and that a threadlocker is used. For the TurtleBot4 Lite, the Create 3 plate can be used to secure payloads. Tips for mounting directly to this plate can be found on the Create 3 Github.
  • Page 81 Example The pictures below show a Clearpath Robotics Hackday project where a NED2 Robot manipulator (8.9kg) mounted on top of a TurtleBot4 Lite using 4X2 M4 standoffs (Mcmaster Carr 98952A450) and an integration plate from a TurtleBot4 Standard.The manipulator was mounted such that the COG was further forward and supported by the front caster wheel.
  • Page 82 TurtleBot 4 Lite with a NED2 arm...
  • Page 83 If you are using the teleop_twist_keyboard ROS2 node, you can follow the CLI instructions to reduce linear and angular velocities. Joystick Teleoperation To limit the teleop_twist_joy velocities you will need create a modified version the TurtleBot4 controller config file. The scale_linear.x value limits the linear velocity, and the scale_angular.yaw value limits the angular velocity.
  • Page 84 Command Velocity If you are manually sending the velocity through the /cmd_vel topic, simply reduce the velocity values to an appropriate level. Create® 3 Actions If you are driving the robot through one of the Create® 3 actions, you can set velocity limits in the action goal.
  • Page 85 Electrical Create® 3 On the TurtleBot 4, the connection of the User Interface board with the Create® 3 robot is only through the VBAT connector J7, which uses JST XH-style connector. The connector has been marked with Positive and Negative signs on the board (Positive being pin 1). The VBAT line is fused with a PTC fuse rated at 2A.
  • Page 86 Raspberry Pi 4B The Raspberry Pi 4 is present on both the TurtleBot 4 and TurtleBot 4 Lite. On the TurtleBot 4 it can be found inside the shell, while on the Lite it is mounted in the Create® 3 cargo bay. The TurtleBot 4 connects the Raspberry Pi with the User Interface Board through a 40 pin...
  • Page 87 User Interface PCBA Note The User Interface PCBA is only available on the TurtleBot 4 and NOT the TurtleBot 4 Lite. Overview The TurtleBot 4 comes with an additional User Interface board that expands on the Raspberry Pi 4 functionality to give the user ease of control over the Create 3 robot and Raspberry Pi and to act as an expansion board for addons, sensors, gadgets the user might have in mind to utilize.
  • Page 88 User I/O The TurtleBot 4 has a 2x20 pin internal connector connecting it to the Raspberry Pi via a flex cable, and another 2x12 pin connector allowing the user to access the remaining GPIOs and a set of 5V, and 3.3V power pins coming from the Raspberry Pi. The IO interface between the 2x20 connector and 2x12 connector and the available GPIOs to the user are shown in Table 1, and 2.
  • Page 89 GPIO6 USER2_GRN_LED USER_PORT GPIO12 GPIO13 DISPLAY-RST GPIO19 USER_SW1 USER_SW2 GPIO16 GPIO26 USER_SW3 USER_SW4 GPIO20 USER2_RED_LED GPIO21 Note ALL USER_PORTs are routed to the 2X12 Auxiliary connectors Table 2: 2x12 User I/O Pinout GPIO # Function Pin # Pin # Function GPIO # 3V3_RPi 5V_RPi...
  • Page 90 User Power In addition to these GPIO ports, the user has two additional power ports available supplying 3.3V, 5V, 12V, VBAT (14.4V), and two grounds each. TurtleBot 4 Additional Power Ports The pinout and power ratings can be found in Table 3.
  • Page 91 Table 3: User Power Port Pinout Pinout Sourc Max current output (mA) Fuse Hold at (mA) VBAT Molex Picoblade 6-Pin cable assembly The two connectors are both 6-Pin Molex PicoBlade P/N 0532610671. The cable assembly needed to use these connectors are 0151340602.
  • Page 92 User USB-C Ports The are 4 USB-C ports that go through an integrated hub on the User Interface board and connect to the Raspberry Pi through a single USB 3.0 cable. The current available to all 4 ports is 3A. Additionally, each individual port is current limited to 3A. In other words, each port is capable of supplying 3A if the others aren't in use, or the available 3A is shared amongst ports that are in use.
  • Page 93 Power Budget The total power made available by the Create 3 output power adapter is 28.8W. This supplies the USB-C connector mated to Raspberry Pi, and the two pin auxiliary VBAT connector combined. Since the two connectors share this power amongst them, a rise in consumption of one will lead to reduction of available power for the other.
  • Page 94 Table 2: Maximum power consumption of individual components and systems Source Operating Max current Max Power Voltage (V) draw (A) User Interface Board 4 USB-C ports USB Hub Controller 1.2, 3.3 OLED Display 0.031 0.372 User LEDs 0.007 0.17 USER PWR Ports VBAT 4.32 0.25...
  • Page 95 Tutorials Driving your TurtleBot 4 There are several methods to get your TurtleBot 4 moving. Note The robot must first be set up and connected to Wi-Fi before it can be driven. Check out the Quick Start section if you have not already. Keyboard Teleoperation The simplest way to get your robot driving is to use a keyboard application on your PC.
  • Page 96 teleop_twist_keyboard CLI Press i to drive forward, j to rotate left, and so on. You can also adjust linear and angular speeds on the go. Joystick Teleoperation If you have a TurtleBot 4 controller or have your own Bluetooth controller, you can drive the robot with it.
  • Page 97 Note The default configuration for the joy_teleop nodes will only work for the TurtleBot 4 controller and PS4 controllers. You may need to create your own config file if the button mappings on your controller differ. To drive the robot, press and hold either L1 or R1, and move the left joystick. By default, L1 will drive the robot at ‘normal' speeds, and R1 will drive the robot at ‘turbo' speeds.
  • Page 98 Creating your first node (C++) This tutorial will go through the steps of creating a ROS2 package and writing a ROS2 node in C++. For a Python example, click here. These steps are similar to the ROS2 Tutorial, but focus on interacting with the TurtleBot 4.
  • Page 99 Add your dependencies For this tutorial, we will need to use the rclcpp and irobot_create_msgs packages. The rclcpp package allows us to create ROS2 nodes and gives us full access to all the base ROS2 functionality in C++. The irobot_create_msgs package gives us access to the custom messages used by the Create®...
  • Page 100 Create a class Now that the dependencies are set, we can create a class that inherits from the rclcpp::Node class. We will call this class TurtleBot4FirstNode. class TurtleBot4FirstNode : public rclcpp::Node public: TurtleBot4FirstNode() : Node("turtlebot4_first_cpp_node") Notice that our class calls the Node constructor and passes it the name of our node, turtlebot4_first_cpp_node.
  • Page 101 Subscribe to the Create® 3 interface buttons Our next step is to subscribe to the Create® 3 interface buttons topic to receive button presses. We will need to create a rclcpp::Subscription as well as a callback function for the subscription. The callback function will be called every time we receive a message on the interface buttons topic.
  • Page 102 ROS2 topic information Test Create® 3 Button 1 Now that we are subscribed, lets test out our node by printing a message every time button 1 is pressed. Edit the interface_buttons_callback function to look like this: // Interface buttons subscription callback void interface_buttons_callback( const irobot_create_msgs::msg::InterfaceButtons::SharedPtr create3_buttons_msg)
  • Page 103 Now every time we receive a message on the /interface_buttons topic we will check if button 1 is pressed, and if it is then the node will print a message. To test this out, we will need to build our package using colcon: ~/turtlebot4_ws colcon build --packages-select...
  • Page 104: Table Of Contents

    class TurtleBot4FirstNode : public rclcpp::Node public: TurtleBot4FirstNode() : Node("turtlebot4_first_cpp_node") // Subscribe to the /interface_buttons topic interface_buttons_subscriber_ = this->create_subscription<irobot_create_msgs::msg::InterfaceButtons>( "/interface_buttons", rclcpp::SensorDataQoS(), std::bind(&TurtleBot4FirstNode::interface_buttons_callback, this, std::placeholders::_1)); // Create a publisher for the /cmd_lightring topic lightring_publisher_ = this->create_publisher<irobot_create_msgs::msg::LightringLeds>( "/cmd_lightring", rclcpp::SensorDataQoS()); private: // Interface buttons subscription callback void interface_buttons_callback( const irobot_create_msgs::msg::InterfaceButtons::SharedPtr create3_buttons_msg) // Button 1 is pressed...
  • Page 105 void button_1_function() // Create a ROS2 message auto lightring_msg = irobot_create_msgs::msg::LightringLeds(); // Stamp the message with the current time lightring_msg.header.stamp = this->get_clock()->now(); // Override system lights lightring_msg.override_system = true; // LED 0 lightring_msg.leds[0].red = 255; lightring_msg.leds[0].blue = 0; lightring_msg.leds[0].green = 0; // LED 1 lightring_msg.leds[1].red = 0;...
  • Page 106 This function creates a LightringLeds message and populates the parameters. We first stamp the message with the current time: lightring_msg.header.stamp = this->get_clock()->now(); Then we set the override_system parameter to true so that our command overrides whatever commands the Create® 3 is sending to the lightring. lightring_msg.override_system = true;...
  • Page 107 Each RGB value can be set between 0 and 255. You can look up the RGB value of any color and set it here. Finally, we publish the message. self.lightring_publisher.publish(lightring_msg) Publish the lightring command with a button press Now we can connect our interface button subscription to our lightring publisher. Simply call button_1_function inside the interface_buttons_callback.
  • Page 108 Toggle the lightring You will notice that once you have set the lightrings LEDs they will remain like that forever. Lets make the button toggle the light on or off each time we press it. Add a boolean to keep track of the light state: bool lights_on_;...
  • Page 109: Class Turtlebot4Firstnode : Public Rclcpp::node

    lightring_msg.leds[3].blue = 255; lightring_msg.leds[3].green = 0; // LED 4 lightring_msg.leds[4].red = 255; lightring_msg.leds[4].blue = 0; lightring_msg.leds[4].green = 255; // LED 5 lightring_msg.leds[5].red = 0; lightring_msg.leds[5].blue = 255; lightring_msg.leds[5].green = 255; // Lights are currently on else { // Disable system override. The system will take back control of the lightring. lightring_msg.override_system = false;...
  • Page 110: Turtlebot4Firstnode()

    TurtleBot4FirstNode() : Node("turtlebot4_first_cpp_node"), lights_on_(false) // Subscribe to the /interface_buttons topic interface_buttons_subscriber_ = this->create_subscription<irobot_create_msgs::msg::InterfaceButtons>( "/interface_buttons", rclcpp::SensorDataQoS(), std::bind(&TurtleBot4FirstNode::interface_buttons_callback, this, std::placeholders::_1)); // Create a publisher for the /cmd_lightring topic lightring_publisher_ = this->create_publisher<irobot_create_msgs::msg::LightringLeds>( "/cmd_lightring", rclcpp::SensorDataQoS()); private: // Interface buttons subscription callback void interface_buttons_callback( const irobot_create_msgs::msg::InterfaceButtons::SharedPtr create3_buttons_msg) // Button 1 is pressed if (create3_buttons_msg->button_1.is_pressed) { RCLCPP_INFO(this->get_logger(),...
  • Page 111: Interface Button Subscriber

    lightring_msg.leds[0].blue = 0; lightring_msg.leds[0].green = 0; // LED 1 lightring_msg.leds[1].red = 0; lightring_msg.leds[1].blue = 255; lightring_msg.leds[1].green = 0; // LED 2 lightring_msg.leds[2].red = 0; lightring_msg.leds[2].blue = 0; lightring_msg.leds[2].green = 255; // LED 3 lightring_msg.leds[3].red = 255; lightring_msg.leds[3].blue = 255; lightring_msg.leds[3].green = 0; // LED 4 lightring_msg.leds[4].red = 255;...
  • Page 112 // Lights on status bool lights_on_; main(int argc, char * argv[]) rclcpp::init(argc, argv); rclcpp::spin(std::make_shared<TurtleBot4FirstNode>()); rclcpp::shutdown(); return 0; Don't forget to build the package again before running the node.
  • Page 113 Creating your first node (Python) This tutorial will go through the steps of creating a ROS2 package and writing a ROS2 node in Python. For a C++ example, click here. These steps are similar to the ROS2 Tutorial, but focus on interacting with the TurtleBot 4.
  • Page 114 Add your dependencies For this tutorial, we will need to use the rclpy irobot_create_msgs packages. The rclpy package allows us to create ROS2 nodes and gives us full access to all the base ROS2 functionality in Python. The irobot_create_msgs package gives us access to the custom messages used by the Create®...
  • Page 115 Subscribe to the Create® 3 interface buttons Our next step is to subscribe to the Create® 3 interface buttons topic to receive button presses. We will need to create a rclpy.Subscription as well as a callback function for the subscription. The callback function will be called every time we receive a message on the interface buttons topic.
  • Page 116 ROS2 topic information Test Create® 3 Button 1 Now that we are subscribed, lets test out our node by printing a message every time button 1 is pressed. Edit the interface_buttons_callback function to look like this: # Interface buttons subscription callback def interface_buttons_callback(self, create3_buttons_msg: InterfaceButtons): # Button 1 is pressed if create3_buttons_msg.button_1.is_pressed:...
  • Page 117 --symlink-install allows us to install a symbolic link to our Python script, rather than a copy of the script. This means that any changes we make to the script will be applied to the installed script, so we don't need to rebuild the package after each change. --packages-select flag allows you to enter any number of packages that you want to build, in case you don't want to build all packages in your workspace.
  • Page 118: The Lightring Publisher Uses The Lightringleds Message Type

    Create a lightring publisher Now that we can receive a button press, lets create a lightring publisher. class TurtleBot4FirstNode(Node): def __init__(self): super().__init__('turtlebot4_first_python_node') # Subscribe to the /interface_buttons topic self.interface_buttons_subscriber = self.create_subscription( InterfaceButtons, '/interface_buttons', self.interface_buttons_callback, qos_profile_sensor_data) # Create a publisher for the /cmd_lightring topic self.lightring_publisher = self.create_publisher( LightringLeds, '/cmd_lightring',...
  • Page 119 # LED 1 lightring_msg.leds[1].red = lightring_msg.leds[1].blue = lightring_msg.leds[1].green = # LED 2 lightring_msg.leds[2].red = lightring_msg.leds[2].blue = lightring_msg.leds[2].green = # LED 3 lightring_msg.leds[3].red = lightring_msg.leds[3].blue = lightring_msg.leds[3].green = # LED 4 lightring_msg.leds[4].red = lightring_msg.leds[4].blue = lightring_msg.leds[4].green = # LED 5 lightring_msg.leds[5].red = lightring_msg.leds[5].blue = lightring_msg.leds[5].green = # Publish the message...
  • Page 120 Next, we populate the 6 LEDs in the leds array with whatever colours we want. # LED 0 lightring_msg.leds[0].red = lightring_msg.leds[0].blue = lightring_msg.leds[0].green = # LED 1 lightring_msg.leds[1].red = lightring_msg.leds[1].blue = lightring_msg.leds[1].green = # LED 2 lightring_msg.leds[2].red = lightring_msg.leds[2].blue = lightring_msg.leds[2].green = # LED 3 lightring_msg.leds[3].red =...
  • Page 121 Finally, we publish the message. self.lightring_publisher.publish(lightring_msg) Publish the lightring command with a button press Now we can connect our interface button subscription to our lightring publisher. Simply call button_1_function inside the interface_buttons_callback. # Interface buttons subscription callback def interface_buttons_callback(self, create3_buttons_msg: InterfaceButtons): # Button 1 is pressed if create3_buttons_msg.button_1.is_pressed: self.get_logger().info('Button 1...
  • Page 122: Class Turtlebot4Firstnode(Node): Lights_On_ = False

    Add a boolean to keep track of the light state: class TurtleBot4FirstNode(Node): lights_on_ = False def __init__(self): And modify button_1_function to toggle the light: # Perform a function when Button 1 is pressed def button_1_function(self): # Create a ROS2 message lightring_msg = LightringLeds() # Stamp the message with the current time lightring_msg.header.stamp = self.get_clock().now().to_msg()
  • Page 123: Subscribe To The /Interface_Buttons Topic Self.interface_Buttons_Subscriber = Self.create_Subscription

    lightring_msg.leds[4].blue = lightring_msg.leds[4].green = # LED 5 lightring_msg.leds[5].red = lightring_msg.leds[5].blue = lightring_msg.leds[5].green = # Lights are currently on else: # Disable system override. The system will take back control of the lightring. lightring_msg.override_system = False # Publish the message self.lightring_publisher.publish(lightring_msg) # Toggle the lights on status self.lights_on_ = not self.lights_on_ Now the Create®...
  • Page 124 # Create a publisher for the /cmd_lightring topic self.lightring_publisher = self.create_publisher( LightringLeds, '/cmd_lightring', qos_profile_sensor_data) # Interface buttons subscription callback def interface_buttons_callback(self, create3_buttons_msg: InterfaceButtons): # Button 1 is pressed if create3_buttons_msg.button_1.is_pressed: self.get_logger().info('Button 1 Pressed!') self.button_1_function() # Perform a function when Button 1 is pressed def button_1_function(self): # Create a ROS2 message lightring_msg = LightringLeds()
  • Page 125 # LED 4 lightring_msg.leds[4].red = lightring_msg.leds[4].blue = lightring_msg.leds[4].green = # LED 5 lightring_msg.leds[5].red = lightring_msg.leds[5].blue = lightring_msg.leds[5].green = # Lights are currently on else: # Disable system override. The system will take back control of the lightring. lightring_msg.override_system = False # Publish the message self.lightring_publisher.publish(lightring_msg) # Toggle the lights on status...
  • Page 126 Generating a map In this tutorial we will be mapping an area by driving the TurtleBot 4 around and using SLAM. Start by making sure that the area you will be mapping is clear of unwanted obstacles. Ideally, you don't want people or animals moving around the area while creating the map. Launch SLAM First, make sure that the RPLIDAR and description nodes are running on the TurtleBot 4.
  • Page 127 Rviz2 showing a map generate by SLAM Drive the TurtleBot 4 Use any method to drive the robot around the area you wish to map. Check out the driving tutorial if you are unsure of how to drive the robot. Keep watch of RVIZ as you drive the robot around the area to make sure that the map gets filled out properly.
  • Page 128 Save the map Once you are happy with your map, you can save it with the following command: ros2 service call /slam_toolbox/save_map slam_toolbox/srv/SaveMap "name: data: 'map_name'" This will save the map to your current directory. View the map Once the map is saved it will generate a map_name.pgm file which can be viewed in an image editor.
  • Page 129 Navigation This tutorial will cover various methods of navigating with the TurtleBot 4 and Nav2. SLAM vs Localization There are two localization methods we can use to figure out where the robot is on the map: SLAM or Localization. SLAM allows us to generate the map as we navigate, while localization requires that a map already exists.
  • Page 130 ros2 launch turtlebot4_ignition_bringup ignition.launch.py nav:=true slam:=off localization:=true This will launch the simulation in the default depot world and will use the existing depot.yaml file for the map. If you are using a different world you will need to create a map for it and pass that in as a launch argument.
  • Page 131 2D Pose Estimate The 2D Pose Estimate tool is used in localization to set the approximate initial pose of the robot on the map. This is required for the Nav2 stack to know where to start localizing from. Click on the tool, and then click and drag the arrow on the map to approximate the position and orientation of the robot.
  • Page 132 The Nav2 Goal tool allows you to set a goal pose for the robot. The Nav2 stack will then plan a path to the goal pose and attempt to drive the robot there. Make sure to set the initial pose of the robot before you set a goal pose. Driving the TurtleBot4 with a Nav2 Goal...
  • Page 133 TurtleBot 4 Navigator TurtleBot 4 Navigator is a Python node that adds on to the Nav2 Simple Commander. It includes TurtleBot 4 specific features such as docking and undocking, as well as easy to use methods for navigating. Note TurtleBot 4 Navigator requires at least version 1.0.11 of Nav2 Simple Commander The code for the following examples is available at https://github.com/turtlebot/turtlebot4_tutorials.
  • Page 134 # Set initial pose initial_pose = navigator.getPoseStamped([0.0, 0.0], TurtleBot4Directions.NORTH) navigator.setInitialPose(initial_pose) # Wait for Nav2 navigator.waitUntilNav2Active() # Set goal poses goal_pose = navigator.getPoseStamped([13.0, 5.0], TurtleBot4Directions.EAST) # Undock navigator.undock() # Go to each goal pose navigator.startToPose(goal_pose) rclpy.shutdown() Initialise the node We start by initialising rclpy and creating the TurtleBot4Navigator...
  • Page 135 The TurtleBot 4 Navigator uses cardinal directions to set the orientation of the robot relative to the map. You can use actual integers or floating points if you need a more precise direction. class TurtleBot4Directions(IntEnum): NORTH = NORTH_WEST = WEST = SOUTH_WEST = SOUTH = SOUTH_EAST =...
  • Page 136 navigator.undock() navigator.startToPose(goal_pose) Once the robot has reached the goal, we call rclpy.shutdown() to gracefully destroy the rclpy context. Watch navigation progress in Rviz You can visualise the navigation process in Rviz by calling: ros2 launch turtlebot4_viz view_robot.launch.py Navigate to a pose Navigate Through Poses This example demonstrates the Navigate Through Poses...
  • Page 137 Code breakdown The source code for this example is available here. Lets take a look at the main function. def main(): rclpy.init() navigator = TurtleBot4Navigator() # Start on dock if not navigator.getDockedStatus(): navigator.info('Docking before intialising pose') navigator.dock() # Set initial pose initial_pose = navigator.getPoseStamped([0.0, 0.0], TurtleBot4Directions.NORTH) navigator.setInitialPose(initial_pose) # Wait for Nav2...
  • Page 138 This example starts the same as navigate to pose. We initialse the node, make sure the robot is docked, and set the initial pose. Then we wait for Nav2 to become active. Set goal poses The next step is to create a list of PoseStamped messages which represent the poses that the robot needs to drive through.
  • Page 139 Navigate through a set of poses Follow Waypoints This example demonstrates how to follow waypoints. The Nav2 stack is given a set of waypoints on the map and creates a path that goes through each waypoint in order until the last waypoint is reached.
  • Page 140 def main(): rclpy.init() navigator = TurtleBot4Navigator() # Start on dock if not navigator.getDockedStatus(): navigator.info('Docking before intialising pose') navigator.dock() # Set initial pose initial_pose = navigator.getPoseStamped([0.0, 0.0], TurtleBot4Directions.NORTH) navigator.setInitialPose(initial_pose) # Wait for Nav2 navigator.waitUntilNav2Active() # Set goal poses goal_pose = [] goal_pose.append(navigator.getPoseStamped([-3.3, 5.9], TurtleBot4Directions.NORTH)) goal_pose.append(navigator.getPoseStamped([2.1, 6.3], TurtleBot4Directions.EAST)) goal_pose.append(navigator.getPoseStamped([2.0, 1.0], TurtleBot4Directions.SOUTH))
  • Page 141 ros2 launch turtlebot4_viz view_robot.launch.py Follow a set of Waypoints Create Path This example demonstrates how to create a navigation path in Rviz during runtime. It uses the 2D Pose Estimate tool to pass the TurtleBot 4 Navigator a set of poses. Then we use the Follow Waypoints behaviour to follow those poses.
  • Page 142 On your PC you will need to start Rviz: ros2 launch turtlebot4_viz view_robot.launch.py Code breakdown The source code for this example is available here. Lets take a look at the main function. def main(): rclpy.init() navigator = TurtleBot4Navigator() # Set goal poses goal_pose = navigator.createPath() if len(goal_pose) == 0: navigator.error('No poses were given,...
  • Page 143 # Finished navigating, dock navigator.dock() rclpy.shutdown() This example begins the same as the others by initialising the TurtleBot 4 Navigator. Create your path After initialisation, the user is prompted to create their path by using the 2D Pose Estimate tool. You must set at least one pose.
  • Page 144 Follow the path Now we can undock and follow the created path. In this example we use the Follow Waypoints behaviour, but this can easily be replaced with Navigate Through Poses. navigator.undock() navigator.startFollowWaypoints(goal_pose) navigator.dock() We finish the example by docking the robot. This assumes that the last pose in the created path is near the dock.
  • Page 145 Troubleshooting Diagnostics The TurtleBot 4 and TurtleBot 4 both run diagnostics updater and aggregator nodes by default. The updater records diagnostics data and the aggregator formats it so that it can be used with rqt_robot_monitor. This is a tool that can be used to monitor various robot topics to ensure that they are publishing data at the expected frequency.
  • Page 146 rqt_robot_monitor with TurtleBot 4 diagnostics The monitor will display any errors in the first window, any warnings in the second window, and a summary of all topics in the "All devices" section at the bottom. Each topic has a status level of OK, WARNING, ERROR, or STALE.
  • Page 147 Color camera diagnostics...
  • Page 148 ROS2 Tests Both TurtleBot 4 models have the turtlebot4_tests package installed by default. This package provides some tests that can be run from CLI to test basic system functions. Each test uses a ROS2 topic, action, or service to perform the action. To run Create® 3 tests, the Create®...
  • Page 149 Test results are saved to ~/turtlebot4_test_results/Y_m_d-H_M_S where Y_m_d-H_M_S is the date and time of the test. A rosbag is also recorded for the duration of the test and saved to the same location.
  • Page 150 Common issues with the Raspberry Pi 4B 1. Access point is not visible If your Raspberry Pi is in AP mode, a Turtlebot4 WiFi network should become visible about 30 seconds after the robot has been powered on. If it does not, try the following.
  • Page 151 Access the RPi over Ethernet If you are still unable to see the Turtlebot4 access point, you can connect directly to the RPi using an ethernet cable. You may need a USB to Ethernet adapter for your PC.
  • Page 152 Configure your PC's wired IP ● Click ‘Apply' You can now go to your terminal and SSH into the robot by typing: ssh ubuntu@192.168.185.3 1. Waiting to connect to bluetoothd… This issue is usually a result of the bluetooth service being stopped. To start the service again, run sudo systemctl start bluetooth.
  • Page 153 Common issues with the user PC 1. ros2: command not found Make sure you have sourced ROS2 galactic: source /opt/ros/galactic/setup.bash If you are building packages from source, you will also want to source the workspace: source /path/to/ws/install/setup.bash 2. Create® 3 topics are not visible First, check that the Create®...

This manual is also suitable for:

Turtlebot 4 lite

Table of Contents