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, Joule requires a BIOS update to install Ubuntu Image. Download the latest software which contains Joule’s new BIOS and flash the BIOS into the Joule by following instructions below.

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

[Intel® Joule™] Connect micro HDMI to HDMI cable, power connector supplied by OpenCR, USB devices including Bootable USB drive, mouse and keyboard. You might need a USB hub to plug multiple USB devices into Joule.

[Intel® Joule™] Installation will be proceeded as shown in below images. When Joule is turned on, monitor will blink about 3 times after 5 seconds, and print menu screen. Press F7 to go to Boot Manager.

_images/j1.JPG

[Intel® Joule™] Select USB Device.

_images/j2.JPG _images/j3.JPG _images/j4.JPG _images/j5.JPG

[Intel® Joule™] Select Erase disk and install Ubuntu then continue.

_images/j6.JPG

[Intel® Joule™] Intel® Joule™ has two different disk drives: 16GB micro SD Card and 16GB eMMC. In this instruction, it is highly recommended to install Alternarive Ubuntu for Joule on the 16GB eMMC. Select MMC/SD card #2 (mmcblk1) - 15.7 GB MMC 016G32 then continue.

_images/j7.JPG _images/j8.JPG

[Intel® Joule™] Installation will take about 10 minutes.

_images/j9.JPG

[Intel® Joule™] When installation is completed, click Restart Now.

_images/j10.JPG

[Intel® Joule™] Remove bootable USB drive from Joule.

_images/j11.JPG

[Intel® Joule™] Don’t press any key. It will boot from 16GB eMMC which is a default boot device.

_images/j12.JPG _images/j13.JPG _images/j14.JPG

[Intel® Joule™] Finish the rest of settings.

_images/j15.JPG _images/j16.JPG _images/j17.JPG _images/j18.JPG _images/j19.JPG _images/j20.JPG _images/j21.JPG

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 OpenCR 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