Skip to main content

Install ROS 2 on the Modalix SoM DevKit

ROS 2 provides libraries and tools for robot applications. It lets sensor, perception, planning, and control processes exchange data. On the Modalix SoM, ROS 2 runs on the Arm cores. Perception applications can use the MLA for neural network inference.

Before You Start​

You need:

  • A Modalix SoM DevKit with platform version 3.0 or later, or 2.1.x.
  • sima-cli installed on the DevKit.
  • Internet access on the DevKit to download packages.
  • A connection to the DevKit through SSH or serial.

For platform 2.1.x, ROS 2 requires the eLxr runtime. If the DevKit runs Yocto, first follow Convert to eLxr.

Run all commands below on the DevKit.

1. Check the Platform Version​

Read the firmware information:

cat /etc/buildinfo

Use the installation command for your platform version below.

To change from 2.1.x to 3.0.0, first follow Convert from 2.1.3 to 3.0.0.

2. Install ROS 2​

Platform 3.0 and Later​

Run:

sima-cli neat install ros2@v3.0.0

Follow the instructions on the screen to complete the installation and set up the ROS 2 environment.

Platform 2.1.x​

Run:

sima-cli install tools/ros2

The installer adds the Debian Bookworm and ROS 2 package sources. It installs ROS 2, build tools, and required libraries. It also adds the ROS 2 environment setup to /home/sima/.bash_profile for future logins.

To load the environment in the current shell, run:

source /usr/local/ros2/local_setup.bash

3. Check the Installation​

Make sure the ROS 2 environment is loaded in each shell used for this check.

  1. Check that the ROS 2 command is available:

    ros2
  2. Start the talker in one shell:

    ros2 run demo_nodes_cpp talker
  3. Open a second shell on the same DevKit.

  4. Start the listener:

    ros2 run demo_nodes_py listener

The listener should print messages such as I heard: [Hello World: 1]. These messages show that the talker and listener can exchange data.

Press Ctrl+C in each shell to stop the demo.