You're reading the documentation for a development version. For the latest released version, please have a look at Kilted.
RTI Connext DDS
RTI Connext DDS is trusted in over 2000 of the world’s most demanding system designs, distributing critical real-time data with the highest levels of performance, reliability, and security. It is free-of-charge for prototyping, research, non-commercial and academic use. Visit the RTI website for more information and to learn about options for support and commercial licenses.
Prerequisites
Install RTI Connext DDS
To build and use
rmw_connextddsrequires a version of Connext DDS compatible with the distribution of ROS 2 in use. Connext DDS is included when installingrmw_connextddsusing apt, or can be installed manually for building from source. The following table details which Connext DDS versions are installed usingapt, and which versions are required for building from source:
ROS 2 Distribution
Installed using apt
To Build from Source
rolling
n/a
7.7.0kilted
7.3.0
7.3.0jazzy
6.0.1
6.0.1humble
6.0.1
6.0.1
RTI Connext Pro is available through a variety of channels:
- ROS 2 apt repositories
ROS 2 users can install a non-commercial-use version of the RTI Connext DDS libraries from the ROS apt repository using the following command:
$ sudo apt update && sudo apt install -q -y rti-connext-dds-7.7.0-ros
$ sudo apt update && sudo apt install -q -y rti-connext-dds-7.3.0-ros
$ sudo apt update && sudo apt install -q -y rti-connext-dds-6.0.1
This package includes the RTI Connext core DDS libraries only; it does not include the full Connext Professional suite of tools and run-time services. Note that these Connext libraries are automatically installed when installing
rmw_connextddsusing apt.
Other Installation Options The Connext Robotics Toolkit includes the full suite of Connext tools and infrastructure services. It provides a single step installation of ROS and Connext using apt. It is free for prototype development, research, non-commercial and academic use.
Detailed instructions for building and tuning the RMW and ROS 2 applications for a variety of platforms, and enabling DDS Security are available on the RTI ROS Community pages.
Install rmw_connextdds binary packages
To install the binary packages for rmw_connextdds and the Connext libraries from the ROS 2 apt repositories, use the following command:
$ sudo apt update && sudo apt install -q -y ros-lyrical-rmw-connextdds
Building rmw_connextdds from source code
Building from source code can ensure the RMW is matched to your system and installed correctly. The following instructions assume a Linux x86_64 build host and target; the RTI ROS Community pages have instructions for building for other platforms and targets, including Arm, Windows, and macOS.
Clone the repository for rmw_connextdds into your ROS 2 workspace and select the branch that matches the ROS 2 distribution in use:
$ mkdir -p ros2_ws/src
$ cd ros2_ws
$ git clone -b lyrical https://github.com/ros2/rmw_connextdds src/rmw_connextdds
Then, install necessary packages for RTI Connext DDS.
$ cd ..
$ rosdep install --from src -i
Set up the environment to help colcon discover where RTI Connext is installed.
This can be done by manually setting the environment variable NDDSHOME to the location of the RTI Connext installation, or by using a script that comes with the RTI Connext installation.
For example, for version 7.7.0, you can run the following code to execute the helper script:
$ source /opt/rti.com/rti_connext_dds-7.7.0/resource/scripts/rtisetenv_x64Linux4gcc8.5.0.bash
If the previous command failed, and you can’t find the location of the RTI Connext installation, run this to find all Connext installations (and their corresponding helper scripts) in your system:
$ find /opt -name rtisetenv*.bash
Note
Replace .bash with your shell if you’re not using bash.
Possible values are: rtisetenv*.bash, rtisetenv*.sh, rtisetenv*.zsh, rtisetenv*.tcsh.
Make sure you have the ROS 2 environment set up:
$ source /opt/ros/lyrical/setup.bash
Build the RMW using colcon:
$ colcon build --symlink-install
After the build completes successfully, be sure to source the setup file for the workspace:
$ source install/setup.bash
Use the resulting rmw_connextdds
Set the environment variable RMW_IMPLEMENTATION to tell ROS 2 which RMW to use:
$ export RMW_IMPLEMENTATION=rmw_connextdds
Run the talker and listener
Now run talker and listener to test RTI Connext DDS
$ source /opt/ros/lyrical/setup.bash
$ ros2 run demo_nodes_cpp talker
$ source /opt/ros/lyrical/setup.bash
$ ros2 run demo_nodes_cpp listener