6. SBC Software Setup

_images/remote_pc_and_turtlebot.png

Note

An SBC(Single-Board Computer) is a complete computer built on a single circuit board with microprocessor(s), memory, input/output (I/O) and other features required as a fully functional computer. TurtleBot3 uses Raspberry Pi (TB3 Burger) and Intel® Joule™ (TB3 Waffle) as SBC.

Note

This instruction was tested on Ubuntu 16.04 and ROS Kinetic Kame.

6.1. Install Linux on TurtleBot3 Burger (Raspberry Pi 3)

Warning

The SDcard should have at least 8 GB of empty space in order to install Linux on TurtleBot3.

[Remote PC] Download Ubuntu MATE 16.04 on the Raspberry Pi 3 from the link below.

_images/download_ubuntu_mate_image.png

[Remote PC] In order to install Ubuntu MATE from an image file, it is recommended using GNOME Disks with Restore Disk Image… option, which natively supports XZ compressed image.

sudo apt-get install gnome-disk-utility

Tip

It is recommended using GNOME Disks, but other applications such as ddrescue on Linux can be used.

sudo apt-get install gddrescue xz-utils
unxz ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
sudo ddrescue -D --force ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img /dev/sdx

Tip

It is recommended using GNOME Disks, but other applications such as Win32 Disk Imager on Windows can be used.

https://sourceforge.net/projects/win32diskimager/

6.2. Install Linux on TurtleBot3 Waffle (Intel® Joule™)

In this section, the Alternative Ubuntu Desktop 16.04 LTS will be installed on Intel® Joule™.

[Remote PC] Download Ubuntu image Alternative Ubuntu 16.04 for Intel® Joule™ from the below link.

[Remote PC] In order to make a bootable installation USB drive, please follow the Alternative install(Ubuntu Desktop 16.04 LTS) section from the below link.

[Remote PC] Before getting started, The board needs to have its BIOS updated to BIOS version #193 to install Ubuntu Image. Download BIOS version #193 and flash the BIOS into the Joule by following instructions in the below link.

Warning

Updating to the latest BIOS(1J2 or higher) may cause unexpected problem of Intel® Joule™ with Ubuntu 16.04 LTS. Please use only the recommended BIOS version #193.

Warning

Intel® Joule™ comes with passive heatsink in the package. It is recommended to use the heatsink. In order to operate Joule without the heatsink, please follow the extra instruction: https://software.intel.com/en-us/node/721471

6.3. Install ROS and Packages (Burger and Waffle)

Warning

The contents in this chapter corresponds to the SBC of TurtleBot3 (Raspberry Pi 3 or Intel® Joule™) which will be the main computer of TurtleBot3. Do NOT apply this instruction to your Remote PC (your desktop PC or laptop).

Note

This instruction takes about 2 hours to install ROS and TurtleBot3 related packages. Elapsed time may vary depending on network environment.

_images/logo_ros.png

[TurtleBot] There are two ways to install ROS. If you prefer manual installation, please take the second method.

6.3.1. First Method

[TurtleBot] Install ROS by using a simple installation script file.

Tip

The terminal application can be found with the Ubuntu search icon on the top left corner of the screen. Shortcut key for terminal is Ctrl-Alt-T.

[TurtleBot Burger]

sudo apt-get update
sudo apt-get upgrade
wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_kinetic_rp3.sh && chmod 755 ./install_ros_kinetic_rp3.sh && bash ./install_ros_kinetic_rp3.sh

[TurtleBot Waffle]

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

Note

After install ROS, please reboot Raspberry Pi or Intel® Joule™.

6.3.2. Second Method

[TurtleBot] You can start from “1.2 Setup your sources.list” and keep following the instruction until “1.7 Getting rosinstall” from below ROS installation instruction link.

Note

In order to see which packages are installed, please check this link out. https://raw.githubusercontent.com/oroca/oroca-ros-pkg/kinetic/ros_install.sh

6.3.3. Install Dependent Packages

[TurtleBot] The next step is to install dependent packages for TurtleBot3 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
cd ~/catkin_ws/src
git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
cd ~/catkin_ws && catkin_make

If catkin_make command is completed without any errors, the preparation for TurtleBot3 is done.

6.4. USB Settings (Burger and Waffle)

[TurtleBot] The following commands allow to use USB port for OpenCR1.0 without acquiring root permission.

cd ~/catkin_ws/src/turtlebot3
sudo cp ./99-turtlebot3-cdc.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

6.5. Network Configuration (Burger and Waffle)

_images/network_configuration.png

ROS requires IP addresses in order to communicate between TurtleBot3 and remote PC.

[TurtleBot] Enter the below command on the terminal window of the SBC in TurtleBot3 to find out the IP address of TurtleBot3.

ifconfig

Texts in the rectangle is the IP address of the TurtleBot.

_images/network_configuration4.png

[TurtleBot] Enter the following command.

gedit ~/.bashrc

[TurtleBot] Replace the localhost in the ROS_MASTER_URI address with the IP address acquired from Remote PC Network Configuration. Also replace the localhost in the ROS_HOSTNAME address with the IP address acquired from the above terminal window, which is the IP address of TurtleBot3.

_images/network_configuration5.png

[TurtleBot] Then, source the bashrc with below command.

source ~/.bashrc