Turtlebot4 Assembly & Setup


A Word of Caution


This page is NOT intended for student use. This page is designed for course staff to build and maintaining the turtlebots. If you are a student, please ensure you have permission from course staff before making any of the changes detailed on this page to any of the turtlebots.


Turtlebot4 Assembly & Setup



Initial Turtlebot4 Setup


This initial Turltlebot4 setup is meant to take a new Turtlebot4 or a recently re-imaged Turtlebot4 and set it up for use in the course. Follow these steps to set up the Turtlebot4:

  1. Power off the robot and re-image the RaspberryPi SD card
  2. Power on the robot and connect your computer to the robot in Access Point mode
    • Place the robot on a charger to power it on.
    • Wait for the robot to play the "chime" sound and for it to display its IP address 10.42.0.1 on the digital display.
    • On your computer, connect to the Wi-Fi network named "Turtlebot4" (password: Turtlebot4).
  3. ssh into the robot
    • Open a terminal on your computer.
    • ssh into the robot:
      ssh ubuntu@10.42.0.1
    • When prompted, enter the password: turtlebot4.
  4. Connect the robot to the intro-robo Wi-Fi network
    • In a terminal session on your computer that's already ssh'd into the robot, run the Turtlebot4 setup tool:
      turtlebot4-setup
    • Navigate to the Wi-Fi Setup menu within the Turtlebot4 setup tool and make the following changes:
      • Wi-Fi Mode: Client
      • SSID: intro-robo
      • Password: (ask course staff for network password)
      Turtlebot4 Wi-Fi settings
    • At the bottom of the Wi-Fi Setup menu page, hit Save.
    • Back at the main menu, hit Apply Settings, double check the settings you've changed, and select Yes to apply them.
    • You'll now need to wait for the robot to reboot, make the "chime" noise, and connect to the intro-robo Wi-Fi network.
    • Once the robot has rebooted, it should connect to the intro-robo Wi-Fi network. Check to make sure the IP address listed on the digital display matches the one listed in the Turtlebot4 status spreadsheet.
  5. Ensure the Create base is up-to-date
    • Access the Create webserver (see image below) by opening a web browser and navigating to [robot-ip-address]:8080:
    • Turtlebot4 Wi-Fi settings
    • Navigate to the Update tab on the top navigation bar.
    • Check the firmware version, you should see something like H.1.2 on the Update page. If the firmware version is H.2.6, you do not need to update the firmware, if it is a version less than that, you will need to update it.
    • If you need to update the Create firmware (version < H.2.6), follow these steps:
      1. Download the latest Create 3 firmware version for ROS2 Humble on the Create 3® software releases page - for this course we're currently using H.2.6.
      2. Upload the new firmware file in the Create webserver "Update" tab and press the green button below to upload it to the Create base.
      3. Wait for the software to be installed, for the robot to reboot, and for it to play the "chime" noise.
      4. Now, check to see if the new software version has updated by refreshing the Create webserver's Update page, and you should see the newly downloaded version displaying on the page (H.2.6).
  6. Update the RaspberryPi
    • On your computer, ssh into the robot (password: turtlebot4):
      ssh ubuntu@[robot-ip-address]
    • Update the RaspberryPi by running the following commands:
      sudo apt update
      sudo apt upgrade -y
  7. Set up the Turtlebot4's Discovery Server network configuration
    • If you're not already, on your computer, ssh into the robot (password: turtlebot4):
      ssh ubuntu@[robot-ip-address]
    • Run the Turtlebot4 setup tool:
      turtlebot4-setup
    • Navigate to the ROS Setup menu
    • Enter the Bash Setup menu and execute the following:
      • Change the ROBOT_NAMESPACE to /tb## where the ## represents the two-digit number of the robot. For example, if you're setting up TB 04, you'll set ROBOT_NAMESPACE to /tb04 or if you're setting up TB 11, you'll set it to /tb11.
      • Change the ROS_DOMAIN_ID to the two-digit number of the robot. For example, 04 for TB 04 or 11 for TB 11.
      • Change the TURTLEBOT4_DIAGNOSTICS to Disabled.
      • Press Save.
      Turtlebot4 bash setup settings
    • Enter the Discovery Server menu and execute the following:
      • Change Enabled to True.
      • Change the Onboard Server - Server ID to the the two-digit number of the robot. For example, 04 for TB 04 or 11 for TB 11.
      • Press Save.
      Turtlebot4 discovery server settings
    • Press Esc to go back to the main menu.
    • Back at the main menu, hit Apply Settings, double check the settings you've changed, and select Yes to apply them.
    • Exit the Turtlebot4 setup tool.
  8. Finish Applying Settings & Restart ROS2 Daemon
    • In your terminal (still ssh'd into the robot) execute the following commands one at a time to finish applying the discovery server settings and restart the ROS2 daemon:
      sudo systemctl daemon-reload && sudo systemctl start turtlebot4
      turtlebot4-source
      ros2 daemon stop; ros2 daemon start
    • Wait for the robot to play the "chime" noise.
  9. Check to Ensure Robot is Publishing to ROS2 Topics According to the New Settings
    • In your terminal (still ssh'd into the robot), list the ros topics currently visible from the robot by running the following command:
      ros2 topic list
      You should see an output similar to the image below (the example below is for TB11, so you can see topics appearing with the prefix /tb11/):
      ros2 topic list output
  10. Test Discovery Server Settings by Controlling the Robot from your Computer
    • Following the instructions on the Physical Turtlebot page to test and ensure that the robot can receive commands from your computer.
  11. Set Up Bluetooth Connection with XBox Controller


Re-Imaging the RaspberryPi


If you're either setting up the Turtlebot4 for the first time or you find yourself in a sticky situation where the the Turtlebot4's networking setup isn't working properly (e.g., IP address change, discovery server settings change), you may want to re-image the RaspberryPi. First you'll need to access the SD card in the RaspberryPi.

Removing the SD Card from the RaspberryPi

FIRST before removing the SD card, make sure the Turtlebot4 is OFF.

To remove the SD card from the RaspberryPi, you'll first need to remove the top plate of the Turtlebot4 (see below) by removing the 4 screws on the top plate.

Turtlebot4 screws to remove on top plate

Next, remove the 4 vertical posts by unscrewing them with your hand:

Turtlebot4 unscrew vertical posts

Now you can lift the top plate (see photo below) and you can see the SD card coming out of the front of the RaspberryPi:

Lifting the lid of the Turtlebot4 to access the RaspberryPi

You'll now need to remove the SD card from the RaspberryPi. There are two ways to do this. One way is to use a pair of needle-nose pliers to gently pull the SD card out of the slot (see below).

Removing the SD card from the RaspberryPi using pliers

If that doesn't work for you, you can also access the SD card by pulling up the black plastic siding surrounding the RaspberryPi. You'll need to remove the 8 screws shown in the image below.

Turtlebot4 screws to remove.

To access the SD card, pull up the black plastic siding in the front of the robot to reveal the SD card (see below). You may need needle nose pliers to pull the SD card out of the RaspberryPi.

Turtlebot4 access SD card.

Re-imaging the SD Card

Follow the steps below to re-image the SD card (these steps were adapted from the Turtlebot4 User Manual):

  1. Download the latest Raspberry Pi image
    • Find the latest Turtlebot4 RaspberryPi images at http://download.ros.org/downloads/turtlebot4/.
    • Download the latest image for the given ROS distribution and robot model (thus far in the course, we have used turtlebot4_humble_standard_1.0.5 ).
    • Extract the zip file to get the .img file.
  2. Insert the SD card
    • If you're using a microSD to SD card adapter, make sure that it is in the "unlocked" mode by ensuring that the grey switch is slid to the "unlocked" (UP) position and remains up after being inserted in your computer.
      SD card adapter with lock switch to unlock
  3. Note: If you see the error dcfldd:/dev/sda: Read-only file system, check the lock switch on the microSD to SD card adapter (see image above). If it's in the locked position, the OS will treat it as read-only. Slide it to the unlocked position.
  4. Get the name of your SD card
    lsblk -d -e7
    • It should be named something like sda, sdb, or mmcblk0.
    • If that command doesn't work, you may need to install the imaging tool dcfldd:
      sudo apt install dcfldd
  5. Get the SD flash script from turtlebot4_setup and flash the SD card:
    wget https://raw.githubusercontent.com/turtlebot/turtlebot4_setup/humble/scripts/sd_flash.sh
    bash sd_flash.sh /path/to/downloaded/image.img
    • Follow the instructions and wait for the SD card to be flashed.
  6. Remove the SD card from your PC
    • Don't forget to unmount the SD card before removing it (e.g., through a file manager).

Put the SD Card Back in the RaspberryPi

Now, place the SD card back in the RaspberryPi and replace all of the screws, posts, and top plate. You can now turn on the Turtlebot4 and continue with the setup.


Attaching the OpenManipulatorX Arm


Materials

OpenManipulatorX arm attachment materials

You'll need the following materials to attach the OpenManipulatorX arm to the Turtlebot4 for the first time:

Attaching the OpenManipulatorX Arm

First, attach the custom 3D printed mounting plate to the OpenManipulatorX arm (make sure you're attaching it in the right direction - see image below).

When attaching the mounting plate, ensure that you're feeding the cable through that will connect with the U2D2 Power Hub later on. If the cable hanging out of the base of the arm is from the original OpenManipulatorX assembly (has a longer 3-wire JST cable), remove it and attach the shorter 3-wire JST cable (that Sarah put with the assembly materials).

attaching the mounting plate to the OpenManipulatorX arm

Once you have the mounting plate in position, detach the back cap of the Dynamixel motor.

removing the back cap of the Dynamixel motor

Next, cut or bend-cut the two small side panels following the seam. These small panels are designed to be removable for wires to thread from outside of the motor to the inside:

cutting the side panels of the Dynamixel motor

Pop the plug. You can use your finger to pop it out from the other side.

popping the plug out of the Dynamixel motor

Thread the wire through the center hole.

threading the wire through the center hole

Use 16 M2.5x8mm screws to attach the mounting plate to the OpenManipulatorX arm with 4 screws on each side.

attaching the mounting plate to the OpenManipulatorX arm with screws

Once you've attached the mounting plate to the OpenManipulatorX arm, the result should look like the image below. Remember to check the orientation of the mounting plate and Dynamixel motor at the base of the arm.

OpenManipulatorX arm with mounting plate attached

Next, grab the U2D2 and U2D2 Power Hub.

U2D2 and U2D2 Power Hub

Attach the U2D2 to the U2D2 Power Hub using the 4 black snap rivets that came in the bag with the U2D2.

attaching the U2D2 to the U2D2 Power Hub

Your U2D2 and U2D2 Power Hub should now look like the image below:

U2D2 attached to the U2D2 Power Hub

Attach the white spacers to the U2D2 Power Hub using the 4 spacers and 4 nuts that came in the bag with the U2D2 Power Hub.

U2D2 attached to the U2D2 Power Hub

Attach the following cables to the U2D2 and U2D2 Power Hub as shown in the image below:

U2D2 cable attachment

Attach the U2D2 Power Hub to the custom Turtlebot4 top plate using the 4 M3x8mm screws.

U2D2 attached to the Turtlebot4 top plate

Make sure the switch on the U2D2 board is ON.

U2D2 switch

Feed the OpenManipulatorX cable through the hole in the Turtlebot4 top plate. Attach the OpenManipulatorX arm to the Turtlebot4 top plate on the OPPOSITE SIDE from the U2D2 Power Hub using the 4 M2.5x16mm screws and 4 M2.5 nuts.

OpenManipulatorX arm attached to the Turtlebot4 top plate

After the 3D printed mount is mounted onto the plate, the wire should come out directly from the motor to the hole on the plate.

OpenManipulatorX arm cable coming through the hole in the Turtlebot4 top plate

The 3 wire cable from the OpenManipulatorX arm should now be dangling down out of the Turtlebot4 top plate, attach it to the U2D2 Power Hub as shown in the image below.

OpenManipulatorX cable to U2D2

Unscrew the old top plate for the Turtlebot4 and replace it with the new top plate with the OpenManipulatorX arm and U2D2 Power Hub attached.

Attaching the new top plate to the Turtlebot4

Plug in the USB-A end of the micro USB to USB-A cable into the top left port on the RaspberryPi (see image below).

Plugging in the USB cable to the RaspberryPi

Attach a hook velcro strip (scratchy side) to the Turtlebot4 top plate as shown in the image below.

velcro on Turtlebot4 top plate

Attach a loop velcro strip (soft side) to the LiPo battery and attach it to the robot. Also attach the LiPo battery to the power cable (T-plug end). Finally, use a cable tie to secure the power cable to one of the vertical posts on the Turtlebot4.

battery attachment

You're hardware setup of the OpenManipulatorX arm attachment to the Turtlebot4 is now complete!

Turtlebot4 with OpenManipulatorX arm

Software Setup for OpenManipulatorX Arm


After attaching the arm, the RaspberryPi will need some additional software to be able to control the arm. Follow these steps (derived from the OpenManipulatorX user manual to set up the software for the OpenManipulatorX arm:


Acknowledgments


The Turtlebot4 assembly with arm was made possible by Kendrick Xie and Danny Lingen, who helped to configure the Turtlebot4 and integrate the arm. Chi Wang helped significantly with laser cutting the custom top plates and 3D printing the custom mounts for the OpenManipulatorX arm. Willa Yang also helped to refine the Turtlebot4 assembly process.