SBC Setup
WARNING
- This process may take long time. Please do not use battery while following this section.
- An HDMI monitor and input devices such as a keyboard and a mouse will be required to complete this setup.
Prepare microSD Card and Reader
If you PC do not have a microSD slot, please use a microSD card reader to burn the recovery image.
Download TurtleBot3 SBC Image
Download the correct image file for your hardware and ROS version.
Noetic version images are created based on Ubuntu 20.04.
Download Raspberry Pi 3B+
ROS Noetic image
SHA256 : a7c57e20f2ee4204c95315866f4a274886094f7c63ed390b6d06d95074830309
Download Raspberry Pi 4B (2GB or 4GB)
ROS Noetic image
SHA256 : 9d48925a78381885916a6f3bb77891adbfae2b271b05fe2ae9a9b7ebd12c46cc
- Please note that this image may not compatible with Raspberry Pi 4B with 8GB RAM.
The recovery image files can be modified without a prior notice.
Unzip the downloaded image file
Extract the .img
file and save it in the local disk.
Burn the image file
You can use various image burning tools.
For example, Raspberry Pi Imager
or Linux Disks
utility can be used.
Choose your preferred tool to burn the image to microSD.
Raspberry Pi Imager
Please refer to this article to find more information about Raspberry Pi Imager.
If you have dependency error in download imager through .deb
, use snap install
like below CLI.(This version of imager is not latest, so it may be a little different from the picture below)
[Remote PC]
$ sudo snap install rpi-imager
$ rpi-imager
- Click
CHOOSE OS
. - Click
Use custom
and select the extracted.img
file from local disk. - Click
CHOOSE STORAGE
and select the microSD. - Click
WRITE
to start burning the image.
Disks Utility
Disks
utility is included in the recent Ubuntu Desktop. Search for “Disks” and launch the app.
- Select the microSD card in the left panel.
- Select
Restore Disk Image
option. - Open the
.img
file from local disk. - Click
Start Restoring...
>Restore
button.
Resize the Partition
In order to reduce the size of recovery image file and to decrease the time to burn the image onto microSD, the recovery partition is minimized.
Please resize the partition to use the unallocated space.
Be aware of selecting an incorrect disk or a partition. Partitioning a system disk of your PC may cause a serious system malfunction.
Download or install GParted GUI tool
- Select microSD card from the menu (mounted location may vary by system).
- Right click on the yellow partition.
- Select
Resize/Move
option. - Drag the right edge of the partition to all the way to the right end.
- Click
Resize/Move
button. - Click the
Apply All Operations
green check button at the top.
Configure the WiFi Network Setting
- Open a terminal window with
Alt
+Ctrl
+T
and go to the netplan directory in the microSD card.
Start editing the50-cloud-init.yaml
file with a superuser permissionsudo
.
[Remote PC]$ cd /media/$USER/writable/etc/netplan $ sudo nano 50-cloud-init.yaml
When the editor is opened, replace the
WIFI_SSID
andWIFI_PASSWORD
with your wifi SSID and password.
Save the file withCtrl
+S
and exit withCtrl
+X
.
If “No such file or directory” is returned, make sure the microSD is mounted to the system.
- Boot Up the Raspberry Pi
a. Connect the HDMI cable of the monitor to the HDMI port of Raspberry Pi.
b. Connect input devices to the USB port of Raspberry Pi.
c. Insert the microSD card.
d. Connect the power (either with USB or OpenCR) to turn on the Raspberry Pi.
e. Login with IDubuntu
and PASSWORDturtlebot
.`
HDMI cable has to be connected before powering the Raspberry Pi, or else the HDMI port of the Raspberry Pi will be disabled.
ROS Network Configuration
NOTE : If you encounter apt failures about the ROS GPG key (due to the existing GPG expiration), you may need to update GPG key. Please see ROS GPG Key Expiration Incident, and proceed to the given solution.
Please follow the instructions below on the SBC (Raspberry Pi).
- Confirm the WiFi IP address.
[Turtlebot3 SBC]$ ifconfig
- Edit the
.bashrc
file.
[Turtlebot3 SBC]$ nano ~/.bashrc
- Find the
ROS_MASTER_URI
andROS_HOSTNAME
setting section, then modify the IP adddresses accordingly.
[Turtlebot3 SBC]export ROS_MASTER_URI=http://{IP_ADDRESS_OF_REMOTE_PC}:11311 export ROS_HOSTNAME={IP_ADDRESS_OF_RASPBERRY_PI_3}
-
Save the file with
Ctrl
+S
and exit the nano editor withCtrl
+X
. - Apply changes with the command below.
[Turtlebot3 SBC]$ source ~/.bashrc
NEW LDS-02 Configuration
LDS-01 | LDS-02 |
---|---|
The TurtleBot3 LDS has been updated to LDS-02 since 2022 models.
Please follow the instructions below on the SBC (Raspberry Pi) of TurtleBot3.
- Install the LDS-02 driver and update TurtleBot3 package
[Turtlebot3 SBC]$ sudo apt update $ sudo apt install libudev-dev $ cd ~/catkin_ws/src $ git clone -b noetic https://github.com/ROBOTIS-GIT/ld08_driver.git $ cd ~/catkin_ws/src/turtlebot3 && git pull $ rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/ $ cd ~/catkin_ws && catkin_make
- Export the LDS_MODEL to the bashrc file. Depending on your LDS model, use
LDS-01
orLDS-02
.
[Turtlebot3 SBC]$ echo 'export LDS_MODEL=LDS-02' >> ~/.bashrc $ source ~/.bashrc
This is it! Now you are done with SBC setup :)
Next Step : OpenCR Setup
Click to expand : Manual SBC Setup Instructions
Please be aware that this manual setup takes a lot more time than burning the recovery image file, but allows flexible choice of package installation. This instruction is not recommended for the beginners.
- Download the proper
Ubuntu 20.04.1(Focal) Preinstalled Server
image on your PC. -
Extract the downloaded file.
-
Burn the
.img
file to the microSD card. You can use various image burning tools.
For example,Raspberry Pi Imager
or LinuxDisks
utility can be used. Choose your preferred tool to burn the image to microSD.
a. ClickCHOOSE OS
.
b. ClickUse custom
and select the extracted.img
file from local disk.
c. ClickCHOOSE STORAGE
and select the microSD.
d. ClickWRITE
to start burning the image. -
Boot Up the Raspberry Pi
a. Connect the HDMI cable of the monitor to the HDMI port of Raspberry Pi.
b. Connect input devices to the USB port of Raspberry Pi.
c. Insert the microSD card.
d. Connect the power (either with USB or OpenCR) to turn on the Raspberry Pi. - Configure the Raspberry Pi
a. Log in with default username(ubuntu
) and password(ubuntu
). After logged in, system will ask you to change the password.
b. Open automatic update setting file.$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
- Change the update settings as below.
APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
a. Save the file with
Ctrl
+S
and exit withCtrl
+X
. - Enter below command to configure the WiFi network setting.
$ sudo nano /etc/netplan/50-cloud-init.yaml
-
When the editor is opened, append below contents at the end of the file.
Replace theWIFI_SSID
andWIFI_PASSWORD
with your wifi SSID and password.
Save the file withCtrl
+S
and exit withCtrl
+X
. - Reboot the Raspberry Pi.
$ sudo reboot
- Set the
systemd
to prevent boot-up delay even if there is no network at startup. Run the command below to set mask thesystemd
process using the following command.$ systemctl mask systemd-networkd-wait-online.service
- Disable Suspend and Hibernation
$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
- After rebooting the Raspberry Pi, if you wish to work from the Remote PC using SSH, use below command from the remote PC terminal. The default password is ubuntu.
$ ssh ubuntu@{IP Address of Raspberry PI}
- Install ROS Noetic Ninjemys
Enter below commands to the terminal one at a time.
In order to check the details of the easy installation script, please refer to the script file.$ sudo apt-get update $ sudo apt-get upgrade $ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros_noetic_rpi.sh $ chmod 755 ./install_ros_noetic_rpi.sh $ bash ./install_ros_noetic_rpi.sh
If the above installation fails, please refer to the official ROS Noetic installation guide.
- Install and Build ROS Packages.
$ sudo apt install ros-noetic-rosserial-python ros-noetic-tf $ sudo apt install ros-noetic-hls-lfcd-lds-driver $ sudo apt install ros-noetic-turtlebot3-msgs $ sudo apt install ros-noetic-dynamixel-sdk $ cd ~/catkin_ws/src $ git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/catkin_ws/src/turtlebot3 $ rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/ $ cd ~/catkin_ws/ $ catkin_make -j1 $ source ~/.bashrc
- USB Port Setting
$ rosrun turtlebot3_bringup create_udev_rules
- ROS Network Configuration
Confirm the WiFi IP address and edit the
.bashrc
file$ nano ~/.bashrc
- Modify the IP adddresses of
ROS_MASTER_URI
and theROS_HOSTNAME
.export ROS_MASTER_URI=http://{IP_ADDRESS_OF_REMOTE_PC}:11311 export ROS_HOSTNAME={IP_ADDRESS_OF_RASPBERRY_PI_3}
-
Save the file and exit the nano editor.
- LDS Configuration
The TurtleBot3 LDS has been updated to LDS-02 since 2022 models.
Please follow the instructions below on the SBC (Raspberry Pi) of TurtleBot3.$ sudo apt update $ sudo apt install libudev-dev $ cd ~/catkin_ws/src $ git clone -b noetic https://github.com/ROBOTIS-GIT/ld08_driver.git $ cd ~/catkin_ws && catkin_make
- Export the LDS_MODEL to the bashrc file. Depending on your LDS model, use
LDS-01
orLDS-02
.$ echo 'export LDS_MODEL=LDS-01' >> ~/.bashrc $ source ~/.bashrc
- Apply changes with the command below.
$ source ~/.bashrc
Please refer to the Ubuntu Blog below for more useful information.
SBC Setup
WARNING
- This process may take long time. Please do not use battery while following this section.
- An HDMI monitor and input devices such as a keyboard and a mouse will be required to complete this setup.
- In order to use the webOS Robotics Platform, please refer to webOS Robotics Platform instruction. Packages will be cross-compiled using OpenEmbedded on a higher performance PC and an image file is created.
Prepare microSD Card and Reader
If your PC do not have a microSD slot, please use a microSD card reader to burn the recovery image.
The microSD card reader is not included in the TurtleBot3 package.
Install Raspberry Pi Imager
Download the Raspberry Pi Imager
to install Ubuntu Server 22.04 for Raspberry Pi.
If the Raspberry Pi Imager is already installed, update to the latest version.
Please refer to this article to find more information about Raspberry Pi Imager.
Click here to expand more details about How to install Raspberry Pi Imager.
Choose one way to install rpi-imager between deb
and apt
deb
Download deb file
$ cd Downloads $ sudo dpkg -i imager_[you_rversion]_amd64.deb #check the file name downloaded
If you have any dependency error, use below CLI
$ sudo apt-get install -f $ rpi-imager
apt
$ sudo apt install rpi-imager
$ rpi-imager
Install Ubuntu 22.04
- Run Raspberry Pi Imager
- Click
CHOOSE OS
. - Select
Other gerneral-purpose OS
. - Select
Ubuntu
. - Select
Ubuntu Server 22.04.5 LTS (64-bit)
that support RPi 3/4/400.
(Choose Server OS, not desktop OS)
- Click
CHOOSE STORAGE
and select the micro SD card. - Click
WRITE
to install the Ubuntu.
Configure the Raspberry Pi
HDMI cable must be connected before powering the Raspberry Pi, or else the HDMI port of the Raspberry Pi will be disabled.
-
Boot Up the Raspberry Pi
* You can get the information about where to connect HDMI, power and input device in here
a. Connect the HDMI cable of the monitor to the HDMI port of Raspberry Pi.
b. Connect input devices(generally keyboard) to the USB port of Raspberry Pi.
c. Insert the microSD card into Raspberry Pi.
d. Connect the power (either with USB or OpenCR) to turn on the Raspberry Pi.
e. Login with IDubuntu
and PASSWORDubuntu
. Once logged in, you’ll be asked to change the password.
- Open the network configuration file with the command below.
[TurtleBot3 SBC]$ sudo nano /etc/netplan/50-cloud-init.yaml
-
When the editor is opened, edit the content as below while replacing the
WIFI_SSID
andWIFI_PASSWORD
with your actual wifi SSID and password.
-
Save the file with
Ctrl
+S
and exit withCtrl
+X
. - Enter the command below to edit automatic update setting file.
[TurtleBot3 SBC]$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
- Change the update settings as below.
[TurtleBot3 SBC]APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
-
Save the file with
Ctrl
+S
and exit withCtrl
+X
. - Set the
systemd
to prevent boot-up delay even if there is no network at startup. Run the command below to set mask thesystemd
process using the following command.
[TurtleBot3 SBC]$ systemctl mask systemd-networkd-wait-online.service
- Disable Suspend and Hibernation
[TurtleBot3 SBC]$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
- Reboot the Raspberry Pi.
[TurtleBot3 SBC]$ reboot
- After rebooting the Raspberry Pi, if you wish to work from the Remote PC using SSH, use below command from the remote PC terminal. Make sure to use the password you set in
Step 1
.
[Remote PC]$ ssh ubuntu@{IP Address of Raspberry PI}
Click here to expand more details about How to connect ssh
- Edit here
[TurtleBot3 SBC]$ sudo nano /etc/ssh/sshd_config.d/50-cloud-init.conf
- Install net-tools and check your ip.
[TurtleBot3 SBC]$ reboot $ sudo apt update $ sudo apt install net-tools $ ifconfig
- Enter command below in
remote PC
and use yourpassword
that you changed before.
[Remote PC]$ ssh ubuntu@{IP Address of Raspberry PI}
-
Install ROS2 Humble Hawksbill
Follow the instruction in the official ROS2 Humble installation guide. Installing ROS-Base(Bare Bones) is recommended. - Install and Build ROS Packages.
Building theturtlebot3
package may take longer than an hour. Please use the SMPS to ensure the system is always powered.$ sudo apt install python3-argcomplete python3-colcon-common-extensions libboost-system-dev build-essential $ sudo apt install ros-humble-hls-lfcd-lds-driver $ sudo apt install ros-humble-turtlebot3-msgs $ sudo apt install ros-humble-dynamixel-sdk $ sudo apt install libudev-dev $ mkdir -p ~/turtlebot3_ws/src && cd ~/turtlebot3_ws/src $ git clone -b humble https://github.com/ROBOTIS-GIT/turtlebot3.git $ git clone -b humble https://github.com/ROBOTIS-GIT/ld08_driver.git $ cd ~/turtlebot3_ws/src/turtlebot3 $ rm -r turtlebot3_cartographer turtlebot3_navigation2 $ cd ~/turtlebot3_ws/ $ echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc $ source ~/.bashrc $ colcon build --symlink-install --parallel-workers 1 $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc $ source ~/.bashrc
- USB Port Setting for OpenCR
[TurtleBot3 SBC]$ sudo cp `ros2 pkg prefix turtlebot3_bringup`/share/turtlebot3_bringup/script/99-turtlebot3-cdc.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules $ sudo udevadm trigger
- ROS Domain ID Setting
In ROS2 DDS communication,
ROS_DOMAIN_ID
must be matched between Remote PC and TurtleBot3 for communication under the same network environment. Following commands shows how to assign aROS_DOMAIN_ID
to SBC in TurtleBot3.- A default ID of TurtleBot3 is
30
. - Configuring the
ROS_DOMAIN_ID
of Remote PC and SBC in TurtleBot3 to30
is recommended.
[TurtleBot3 SBC]$ echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc $ source ~/.bashrc
- A default ID of TurtleBot3 is
WARNING : Do not use an identical ROS_DOMAIN_ID with others in the same network. It will cause a conflict of communication between users under the same network environment.
LDS Configuration
The TurtleBot3 LDS has been updated to LDS-02 since 2022.
If you have purchased TurtleBot3 after 2022, please use LDS-02
for the LDS_MODEL.
LDS-01 | LDS-02 |
---|---|
Depending on your LDS model, use LDS-01
or LDS-02
.
[TurtleBot3 SBC]
$ echo 'export LDS_MODEL=LDS-02' >> ~/.bashrc
Apply changes with the command below.
[TurtleBot3 SBC]
$ source ~/.bashrc
This is it! Now you are done with SBC setup :)
Next Step : OpenCR Setup
Please refer to the Ubuntu Blog below for more useful information.