Skip to content

ROS 2 Humble on Tinker Board with Armbian

To extend the capabilities of the Tinker Board, especially for the robotics applications I decided to install a ROS 2 Humble on it. Such a board with the installed ROS 2 could be successfully used as a simple robot brain that takes data from sensors, processes them, and generates some actions (for example velocity commands for motors driver).

But let’s introduce quickly the used hardware and software. ASUS Tinker Board is a single-board computer (SBC) equipped with a 32-bit ARM-based processor and multiple peripheral devices. The ROS 2 Humble is a recent version of the robot operating system (ROS) that has been released in May 2022. As an operating system (OS) for the Tinker Board, it was used Armbian which is a Debian-based OS intended for the ARM architecture (both 32-bit and 64-bit).

Let’s look at the process of ROS 2 Humble installation from sources on Tinker Board (with Armbian Jammy).

Download and configure Armbian Jammy

  • Download Armbian Jammy 5.17.5 for Tinker Board, for example from the following link.
  • Prepare SD card with Armbian image.
    To do that, one of the easiest options is to use Balena Etcher tool.
  • Run OS from the memory card and initially configure it (for example network connection).
    Connection to the external monitor could be helpful at this stage to configure WiFi.

Preparation of the development environment

  • Install required development tools with APT
    sudo apt update && sudo apt install -y \
    build-essential wget git cmake \
    python3-pip \
    python-rosinstall-generator \
    python3-colcon-common-extensions \
    python3-flake8*
    python3-pytest python3-pytest-cov python3-pytest-repeat python3-pytest-rerunfailures \
    python3-rosdep python3-setuptools python3-vcstool \
    libcunit1-d libcunit1-dev

Get ROS 2 source code

It has been used ros-base version which is rather a basic set of ROS packages.
If more packages are necessary then they have to be cloned and installed manually or
alternatively you can try to install ros-desktop version but I haven’t checked that.

  • Create a workspace where ROS 2 will be installed

    mkdir -p ~/ros2_humble/src
    cd ~/ros2_humble
  • Download the list of repositories that are included in ros-base

    rosinstall_generator ros_base --deps --rosdistro humble > ros2.repos
  • Clone repositories from the prepared list placed in ros2.repos

    vcs import src < ros2.repos

Install dependencies with rosdep tool

  • Initialize and update rosdep tool
    sudo rosdep init
    rosdep update
  • Install dependencies
    rosdep install --from-paths src --ignore-src -y \
    --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers" --rosdistro humble

Build ROS 2 from sources

cd ~/ros2_humble/
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF

Verification of the installation with demo nodes

  • Load ROS 2 environment

    source ~/ros2_humble/install/local_setup.bash
  • Create the separate workspace

    mdkir -p ~/ros2_ws/src
    cd ~/ ros2_ws/src
  • Download ROS 2 demos

    git clone https://github.com/ros2/example_interfaces.git
    git clone https://github.com/ros2/demos
  • Build selected demos

    cd ~/ros2_ws
    colcon build --packages-up-to demo_nodes_cpp
  • Run a talker node that publishes some data to a specified topic

    source ~/ros2_ws/install/setup.bash
    ros2 run demo_nodes_cpp talker
  • In a separate terminal run the listener node that listens to data on the specified topic

    source ~/ros2_humble/install/local_setup.bash
    source ~/ros2_ws/install/setup.bash
    ros2 run demo_nodes_cpp listener

Now if the ROS 2 installation was successful, you should be able to see the same data on the listener that is published by the talker.

References

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.