πŸ”§ Master Setup#

This guide will walk through the steps to install Ubuntu Desktop 22.04 LTS, ROS2 Humble, and all dependencies on a desktop computer. This computer system is utilized in the United States Air Force Academy’s Electrical and Computer Engineering department in an embedded network with the ground robot, a TurtleBot3 Burger. The master system is used to utilize ROS GUI tools and create secure connections with the TurtleBot3.

This guide is adapted from the TurtleBot3 e-Manual.


Hardware#

For our application, we are using Intel NUC Kits but these instructions will work on any AMD64 architecture.

Software#

Ubuntu 22.04#

For the desktop machine you will first need to download Ubuntu Desktop 22.04 LTS.

Once downloaded, follow the instructions to create a bootable Ubuntu USB stick within Ubuntu. The guide provides links to create USB sticks from Windows and macOS as well.

Once the bootable USB stick is created, follow the guide to Install Ubuntu desktop selecting a useful computer name such as master0. The NUC requires you to press and hold F10 on startup to boot from a USB stick.

Update Alternatives#

Python3 is installed in Ubuntu 22.04 by default. Some ROS packages utilize the python command instead of python3 so we need to create a new executable, /usr/bin/python that will call Python3 (basically use the command python to call Python3):

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10

After running this command, /usr/bin/python will point to /usr/bin/python3 with a priority of 10, allowing us to set and manage different versions of Python easily.

ROS2 Humble#

At this point, the Ubuntu environment is setup. Now we will setup the ROS 2 requirements for the master. All of these instructions are adapted from the ROS 2 Documentation: Humble. ROS 2 Humble is the latest version of ROS 2 that supports Ubuntu 22.04 LTS (Jammy Jellyfish).

Installation#

Follow the official ROS2 documentation to install the ROS2 Humble.

Install colcon:

sudo apt install python3-colcon-common-extensions

Install ROS dependencies for building packages:

sudo apt install ros-humble-gazebo-*
sudo apt install ros-humble-cartographer
sudo apt install ros-humble-cartographer-ros

Install TurtleBot3 packages

source ~/.bashrc
sudo apt install ros-humble-dynamixel-sdk
sudo apt install ros-humble-turtlebot3-msgs
sudo apt install ros-humble-turtlebot3

Create a ROS workspace:

mkdir -p ~/master_ws/src
cd ~/master_ws/

TurtleBot3 Simulation Package#

cd ~/master_ws/src/
git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/master_ws && colcon build --symlink-install

ROS Environment#

Setup ROS environment variables and setup scripts within the ~/.bashrc file. Open the ~/.bashrc file with your favorite command line editor and add the following to the bottom:

source /opt/ros/humble/setup.bash
source ~/master_ws/install/setup.bash
source /usr/share/gazebo/setup.sh
source /usr/share/colcon_cd/function/colcon_cd.sh
export ROS_DOMAIN_ID=0  # For master0 and robot0
export _colcon_cd_root=/opt/ros/humble/
export TURTLEBOT3_MODEL=burger
export LDS_MODEL=LDS-01 # replace with LDS-02 if using new LIDAR
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash

Any time you make changes to your ~/.bashrc file you must source it:

source ~/.bashrc

PIP#

sudo apt install python3-pip
sudo pip install dlib

Note

The dlib package will take quite a while to install.