We are back with a new entry of our “96boards: Autoware everywhere” blog series. In this post we outline how to set up Cyclone DDS as the default implementation for our ROS2 installation in 96Boards which we will use for Autoware.Auto.
The post is organized as follows:
- Eclipse Cyclone DDS
- Getting Cyclone DDS
- Cyclone DDS on 96Boards Dockerhub images
Eclipse Cyclone DDS
DDS is used by ROS2 as its middleware, which provides discovery, serialization and transportation. Eclipse Cyclone DDS is an open-source implementation of the OMG Data Distribution Service (DDS) specification.
Getting Cyclone DDS
We have 2 options for getting Cyclone DDS into our board, we can either install the binaries or build it from source.
As a pre-requisite we need to have ROS2 installed in the board, we can use either Dashing or Eloquent releases.
Note: at the time of writing, not all Autoware.Auto dependencies are ported into ROS2 Eloquent so if you plan to use Cyclone DDS with Autoware.Auto you will need to install ROS2 Dashing.
Option 1: install binaries
If we connect the board to the internet we can simply
ssh into the board and install Cyclone DDS via:
$ source /opt/ros/$ROS_DISTRO/local_setup.bash $ apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp
Option 2: build from source
To build Cyclone DDS from source we need to:
- For ROS2 Dashing:
$ source /opt/ros/dashing/local_setup.bash $ mkdir -p ros2_cyclonedds/src $ cd ros2_cyclonedds/src $ git clone https://github.com/ros2/rmw_cyclonedds -b dashing-eloquent $ git clone https://github.com/eclipse-cyclonedds/cyclonedds -b V0.5.0 $ cd .. $ colcon build
- For RO2 Eloquent:
$ source /opt/ros/eloquent/local_setup.bash $ mkdir -p ros2_cyclonedds/src $ cd ros2_cyclonedds/src $ git clone https://github.com/ros2/rmw_cyclonedds -b dashing-eloquent $ git clone https://github.com/eclipse-cyclonedds/cyclonedds $ cd .. $ colcon build
Set Cyclone DDS as the default DDS
To set it to be the default DDS we can add the following to the
$ echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc $ source ~./bashrc
In addition, if we have built Cyclone DDS from source we will need to overlay our Cyclone DDS workspace after sourcing ROS2:
$ echo "source /opt/ros/$ROS_DISTRO/local_setup.bash" >> ~/.bashrc $ echo "source /home/user/ros2_cyclonedds/install/local_setup.bash" >> ~/.bashrc $ source ~./bashrc
Cyclone DDS on 96Boards Dockerhub images
To check that Cyclone DDS is being used we can do the following.
- For ROS2 Dashing:
We can check that the
RMW_IMPLEMENTATION environment variable is set correctly as:
$ echo $RMW_IMPLEMENTATION rmw_cyclonedds_cpp
- For ROS2 Eloquent:
We can use
ros2 doctor utility as:
$ ros2 doctor -r
which will show that the middleware is
In this blog post we have shown how to install Eclipse Cyclone DDS for our ROS2 applications development and how to set it up as the default one to use.
This article is Part 7 in a 8-Part Series.
- Part 1 - 96boards: Autoware everywhere | Autoware.AI and Hikey970
- Part 2 - 96boards: Autoware everywhere | Autoware.Auto and Hikey970
- Part 3 - 96boards: Autoware everywhere | Bridging .AI and .Auto in the Hikey970
- Part 4 - 96boards: Autoware everywhere | Autoware.AI and Dragonboard-845c
- Part 5 - 96boards: Autoware everywhere | Autoware.Auto, bridge with .AI and Dragonboard-845c
- Part 6 - 96boards: Autoware everywhere | Binding Autoware.AI nodes to CPUs
- Part 7 - 96boards: Autoware everywhere | Defaulting to Cyclone DDS
- Part 8 - 96boards: Autoware everywhere | First look at AutoCore's PCU