Skip to main content

5.1.2 apt installation and upgrade

This section introduces how to use apt to install TogetheROS.Bot on RDK.

RDK​

Prerequisites

  • The Environment Setup has been completed.
  • RDK has installed the Ubuntu operating system.
  • The RDK can access the internet normally.
  • The RDK can be accessed remotely via SSH.
πŸ“‹ System Version Confirmation and Download

Before installing TogetheROS, please confirm the system version and download the latest image. For system image downloads, refer to: Download Resources Summary

Note for RDK X3 platform:

Attention
  • 2.x version tros.b only supports 2.x version system images,1.x version tros.b[Chinese Only] only supports 1.x version systems.
  • If you are using a 1.x version system image, you need to upgrade the system to version 2.x.
  • For the method of checking system and tros.b version numbers and detailed instructions, please refer to FAQs.
Dependency1.x tros.b2.x tros.b
1.x System Image√x
2.x System Imagex√

Installation​

Note: The IP address of the RDK used here is 10.64.61.241. Replace it with your IP address during installation.

Login to the RDK

ssh root@10.64.61.241

Install the tros.b package:

sudo apt update
sudo apt install tros
Attension
  • If the sudo apt update command fails or reports an error, please refer to Q10: How to handleapt updatecommand failure or errors? in the FAQs section for resolution.
  • If you encounter the error E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).' after running the installation command, please execute the command apt --fix-broken install` to install the related dependencies before installing tros.b.

After the installation is complete, check the files in the /opt directory

root@ubuntu:/userdata# ls /opt/
hobot tros

The tros.b is installed in the /opt directory.

Upgrade tros.b​

Taking RDK installation as an example, the X86 Ubuntu upgrade method is consistent with that of RDK.

Login to RDK:

ssh root@10.64.61.241

Upgrade tros.b deb package:

sudo apt update
sudo apt upgrade
Attension
  • If the sudo apt update command fails or reports an error, please refer to Q10: How to handleapt updatecommand failure or errors? in the FAQs section for resolution.

Check the current version of tros.b​

root@ubuntu:~# apt show tros
Package: tros
Version: 2.0.0-20230523223852
Maintainer: kairui.wang <kairui.wang@d-robotics.cc>
Installed-Size: unknown
Depends: hobot-models-basic, tros-ros-base, tros-ai-msgs, tros-audio-control, tros-audio-msg, tros-audio-tracking, tros-body-tracking, tros-dnn-benchmark-example, tros-dnn-node, tros-dnn-node-example, tros-dnn-node-sample, tros-elevation-net, tros-gesture-control, tros-hand-gesture-detection, tros-hand-lmk-detection, tros-hbm-img-msgs, tros-hobot-app-xrrobot-body-tracking, tros-hobot-app-xrrobot-gesture-control, tros-hobot-codec, tros-hobot-cv, tros-hobot-falldown-detection, tros-hobot-hdmi, tros-hobot-image-publisher, tros-hobot-mot, tros-hobot-usb-cam, tros-image-subscribe-example, tros-img-msgs, tros-imu-sensor, tros-line-follower-model, tros-line-follower-perception, tros-mipi-cam, tros-mono2d-body-detection, tros-mono2d-trash-detection, tros-mono3d-indoor-detection, tros-parking-perception, tros-parking-search, tros-rgbd-sensor, tros-websocket, tros-xrrobot, tros-xrrobot-msgs
Download-Size: 980 B
APT-Manual-Installed: yes
APT-Sources: http://archive.d-robotics.cc/ubuntu-rdk focal/main arm64 Packages
Description: TogetheROS Bot

It can be seen that the current version of tros.b has been upgraded to version 2.0.0.

X86 Platform Setup​

Prerequisites:​

  • The Environment Setup has been completed.
  • The system is Ubuntu 20.04 with active internet access.

1. Set Locale and Enable Universe Repository​

Run the following commands to configure the locale and enable the universe software repository:

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

sudo apt install software-properties-common
sudo add-apt-repository universe

2. Download GPG Keys and Add Source Lists​

Run the following commands to download the required GPG keys and add the appropriate source lists:

sudo apt update && sudo apt install curl

sudo curl -sSL http://archive.d-robotics.cc/keys/sunrise.gpg -o /usr/share/keyrings/sunrise.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/sunrise.gpg] http://archive.d-robotics.cc/ubuntu-rdk-sim focal main" | sudo tee /etc/apt/sources.list.d/sunrise.list > /dev/null

sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

3. Update Package Sources and Install tros.b​

Run the commands below to update package sources and install the tros.b package:

sudo apt update
sudo apt install tros
caution
  • If your X86 platform already has tros.b version 1.x installed, please use the command sudo apt remove tros to uninstall it before installing tros.b version 2.x.
  • For details on how to check the version of tros.b, refer to the FAQs.