4. Tutorial: RTI Connext Robotics Toolkit

This tutorial describes the simplest way to set up a complete ROS 2 and Connext development environment on Ubuntu using the RTI Connext Robotics Toolkit.

This information is intended for users who want a fully functional system with minimal manual installation steps. On completion, this installation includes support for running ROS 2 applications with the Connext RMW, as well as standalone Connext DDS applications, RTI Infrastructure Services, and RTI Tools.

The following instructions step you through the installation and basic verification steps required to get started.

4.1. New ROS 2 Users

To get started with ROS 2 + Connext, follow these steps:

  1. Add the ROS APT repository:

sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y

export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')

curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
sudo dpkg -i /tmp/ros2-apt-source.deb
  1. Add the RTI APT repository:

sudo curl -sSL -o /usr/share/keyrings/rti-official-archive.gpg \
  https://packages.rti.com/deb/official/repo.key

printf -- "deb [arch=%s, signed-by=%s] %s %s main\n" \
  $(dpkg --print-architecture) \
  /usr/share/keyrings/rti-official-archive.gpg \
  https://packages.rti.com/deb/official \
  $(. /etc/os-release && echo ${VERSION_CODENAME}) | \
  sudo tee /etc/apt/sources.list.d/rti.list >/dev/null

sudo apt-get update
  1. Install the RTI Connext Robotics Toolkit:

sudo apt-get install rti-connext-robotics-toolkit-kilted-7.3.0-desktop
  1. (Optional) Install your RTI license activation file (rti_license.dat):

sudo cp /path/to/rti_license.dat /opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat

The RTI Connext Robotics Toolkit package already installs an rti_license.dat file that enables core ROS 2 + Connext features. To use additional Connext services and tools, replace it with an RTI-provided rti_license.dat file. If you do not have one, get it at https://www.rti.com/ros.

  1. Load ROS 2 through the environment script provided by the RTI Connext Robotics Toolkit:

source /opt/rti.com/ros/kilted-7.3.0/setup.bash
  1. Verify the installation:

echo $RMW_IMPLEMENTATION

The output should be rmw_connextdds.

Run example nodes to verify end-to-end communication:

ros2 run demo_nodes_py listener &
ros2 run demo_nodes_cpp talker

4.2. Existing ROS 2 Kilted Installations

If ROS 2 Kilted is already installed, follow these steps to migrate to the RTI Connext Robotics Toolkit:

  1. Fully remove (i.e. “purge”) any version of Connext that was previously installed using packages from the ROS 2 APT repository. For example, purge version 7.3.0 with:

sudo apt-get purge -y --auto-remove "rti-connext-dds-7.3.0*"
  1. Add the RTI APT repository:

sudo curl -sSL -o /usr/share/keyrings/rti-official-archive.gpg \
  https://packages.rti.com/deb/official/repo.key

printf -- "deb [arch=%s, signed-by=%s] %s %s main\n" \
  $(dpkg --print-architecture) \
  /usr/share/keyrings/rti-official-archive.gpg \
  https://packages.rti.com/deb/official \
  $(. /etc/os-release && echo ${VERSION_CODENAME}) | \
  sudo tee /etc/apt/sources.list.d/rti.list >/dev/null

sudo apt-get update
  1. Install the toolkit:

sudo apt-get install rti-connext-robotics-toolkit-kilted-7.3.0-desktop
  1. (Optional) Install your RTI license activation file (rti_license.dat):

sudo cp /path/to/rti_license.dat /opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat

The RTI Connext Robotics Toolkit package already installs an rti_license.dat file that enables core ROS 2 + Connext features. To use additional Connext services and tools, replace it with an RTI-provided rti_license.dat file. If you do not have one, get it at https://www.rti.com/ros.

  1. Load ROS 2 through the environment script provided by the RTI Connext Robotics Toolkit:

source /opt/rti.com/ros/kilted-7.3.0/setup.bash
  1. Verify the installation:

echo $RMW_IMPLEMENTATION

The output should be rmw_connextdds.

Run example nodes to verify end-to-end communication:

ros2 run demo_nodes_py listener &
ros2 run demo_nodes_cpp talker

4.3. Unattended Installation (Advanced)

Use unattended installation only after reviewing and accepting the licenses on behalf of users/systems. For most users, interactive installation is recommended first.

To perform an unattended installation of the rti-connext-robotics-toolkit-kilted-7.3.0-desktop Debian package, choose one of the following two methods.

4.3.1. Managing the default free license

During unattended installations, the package can install an included free license file as the global rti_license.dat. This free license supports core libraries only. This behavior applies to both unattended methods below.

If you plan to use your own RTI-provided license activation file and want to avoid having it overwritten by packages, disable the automatic installation of the included free license before installing:

echo "rti-connext-dds-7.3.0-ros rti-connext-dds-7.3.0/license-ros2-free/install select false" | \
  sudo debconf-set-selections

Note

To ensure the unattended installation, explicitly preselect this option as either true or false before installing.

4.3.2. Via debconf

The license acceptance key is set for rti-connext-dds-7.3.0-common, which is a dependency of the RTI Connext Robotics Toolkit package and the component that prompts for license acceptance.

echo "rti-connext-dds-7.3.0-common rti-connext-dds-7.3.0/license/accepted select true" | \

  sudo debconf-set-selections
sudo apt install -y rti-connext-robotics-toolkit-kilted-7.3.0-desktop

4.3.3. Via environment variables

This method is supported only from a root shell.

RTI_LICENSE_AGREEMENT_ACCEPTED=accepted \
apt install -y rti-connext-robotics-toolkit-kilted-7.3.0-desktop