Qualcomm Robotics RB3 Drives Turtlebot 3 Burger
Configuring teleoperation on the single-board computer
Turtlebot 3 Burger from Robotis is a mobile, ROS-based robot built around open source hardware and software.
Turtlebot 3 Burger (Qualcomm® Robotics RB3 Development Kit mounted on top)
Its three main components are:
A single-board computer (SBC), such as the Qualcomm Robotics RB3 Development Kit
Qualcomm Robotics RB3 Development Kit
A control module, such as OpenCR
actuators, such as Dynamixel
For developers trying to drive Turtlebots, content abounds. Many articles explain the procedure for mounting hardware onto a Turtlebot then using a remote PC running ROS nodes to control the robot.
This article explains how to set up the Qualcomm Robotics RB3 Development Kit as an SBC to communicate with and control the Turtlebot. Developers may find this information useful for AI/ML applications, whether those applications rely on a remote PC or an SBC to control the robot.
Assemble the robot.
Follow the instructions in the video “TurtleBot3 31 Burger Assembly.”
Set up OpenCR.
Usually, the OpenCR board ships with firmware updated. To test this, power up the OpenCR. Then, push SW1 to see the whether the Turtlebot moves forward and SW2 to see whether it turns 180 degrees in place. If the Turtlebot does not move, follow the instructions at “OpenCR Setup.”
Connect the Qualcomm Robotics RB3 to the Turtlebot.
Connect pins 38 and 40 on the Qualcomm Robotics RB3 to the 12V output on the OpenCR. Then, connect the USB port on the Qualcomm Robotics RB3 to the Micro USB port on the OpenCR for serial communication. (Watch the first five minutes of this video for more details on connections.)
Once the Turtlebot is connected to the Qualcomm Robotics RB3, /dev/ttyACM0 should be visible in the /dev folder.
Setting up the Qualcomm Robotics RB3 to work with Turtlebot
There are two ways to control the Turtlebot:
- You can use a remote Ubuntu PC and Qualcomm Robotics RB3 to control the Turtlebot (“PC setup”). OR ...
- You can pull an Ubuntu Docker image onto the Qualcomm Robotics RB3 to avoid using a remote PC.
The Qualcomm Robotics RB3 supports a variety of different Linux versions (Upstream Debian and Yocto from Linaro, Downstream Linux from Thundercomm). If Docker isn’t already installed on the version of Linux that you are using, you can read our learning resource “How to Install Docker on the Qualcomm Robotics RB3 development platform” and make sure that you can run Docker images on the development kit.
The following steps use the Ubuntu Docker image on Qualcomm Robotics RB3:
On the Qualcomm Robotics RB3, pull the Ubuntu 16.04 Docker image from the Docker hub.
$ docker pull ubuntu:16.04
Run the Ubuntu image to install necessary packages.
$ docker run -it --name ttlb ubuntu:16.04
Install ROS Kinetic Kame in the ttlb container.$ sudo apt-get update$ sudo apt-get upgrade$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_kinetic.sh && chmod 755 ./install_ros_kinetic.sh && bash ./install_ros_kinetic.sh
Install dependent packages for TurtleBot 3 control.$ sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers$ mkdir -p catkin_ws$ cd ~/catkin_ws/src/$ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git$ git clone -b kinetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git$ cd ~/catkin_ws && catkin_make$ cd ~/catkin_ws/devel$ source setup.bash
- The Docker image is now ready. Open another command prompt and save the docker image.
$ docker commit ttlb ttlbros:v1
- To enable launch of the fully ready Docker image with same name, remove the old container.
$ docker rm ttlb
- Run the Docker Ubuntu image, this time mapping the Turtlebot device port.
$ docker run -it --name ttlb --device=/dev/ttyACM0 --network host ttlbros:v1
- Once inside the Ubuntu container (ttlb), set the environment variables as follows:$ export ROS_MASTER_URI=http://localhost:11311$ export ROS_HOSTNAME=<Container_IP>$ export ROS_IP=<Container_IP>$ export TURTLEBOT3_MODEL=burger
- Start roscore.
To control Turtlebot from a Remote PC, follow the steps in ‘NOTE’ section below.
Running the Turtlebot
Here is the high-level picture of the Turtlebot setup with a remote Ubuntu PC and Dragonboard 410c/equivalent SBC that comes with Turtlebot (“PC setup”):
Here is the high-level picture of the Turtlebot setup with the Ubuntu Docker image on the Qualcomm Robotics RB3:
With the Ubuntu Docker image on the Qualcomm Robotics RB3, note that roscore, turtlebot3_core (robot node) and turtlebot3_teleop (teleop node) all run in the same Ubuntu container. Once roscore is running in the ttlb container, start Turtlebot core and Teleop nodes with the commands below:
Start the Turtlebot core.
$ roslaunch turtlebot3_bringup turtlebot3_core.launch
Start Turtlebot teleop node.
$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Once the teleop node is running, teleoperate the Turtlebot by pressing the appropriate keys on the controller or device.
NOTE: To control Turtlebot from a remote PC, follow these instructions:
On the remote PC, set the environment variables as follows to run roscore:$ export ROS_MASTER_URI= < http://<IP_OF_REMOTE_PC > :11311>$ export ROS_HOSTNAME= < IP_OF_REMOTE_PC >
On the Qualcomm Robotics RB3, set the environment variables as follows:$ export ROS_MASTER_URI= < http:// < IP_OF_REMOTE_PC > :11311>$ export ROS_HOSTNAME= < IP_OF_TURTLEBOT(RB3) >
Make sure the appropriate permissions are enabled on the Docker container to access roscore running outside the container. Refer to the Docker article “Networking using the host network.”
For more on ROS, see the QDN blog post, Deploying robotics applications— Introduction to ROS.
Qualcomm Robotics RB3 is a product of Qualcomm Technologies, Inc. and/or its subsidiaries.