Skip to content

Add $ DDS-Implementations #5355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Install packages

The easiest way is to install from ROS 2 apt repository.

.. code-block:: bash
.. code-block:: console

sudo apt install ros-{DISTRO}-rmw-cyclonedds-cpp
$ sudo apt install ros-{DISTRO}-rmw-cyclonedds-cpp

Build from source code
----------------------
Expand All @@ -31,33 +31,33 @@ Building from source code is also another way to install.

First, clone Cyclone DDS and rmw_cyclonedds in the ROS 2 workspace source directory.

.. code-block:: bash
.. code-block:: console

cd ros2_ws/src
git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {REPOS_FILE_BRANCH}
git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds
$ cd ros2_ws/src
$ git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {REPOS_FILE_BRANCH}
$ git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds

Then, install necessary packages for Cyclone DDS.

.. code-block:: bash
.. code-block:: console

cd ..
rosdep install --from src -i
$ cd ..
$ rosdep install --from src -i

Finally, run colcon build.

.. code-block:: bash
.. code-block:: console

colcon build --symlink-install
$ colcon build --symlink-install

Switch to rmw_cyclonedds
------------------------

Switch from other rmw to rmw_cyclonedds by specifying the environment variable.

.. code-block:: bash
.. code-block:: console

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
$ export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`

Expand All @@ -66,10 +66,10 @@ Run the talker and listener

Now run ``talker`` and ``listener`` to test Cyclone DDS.

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp talker
$ ros2 run demo_nodes_cpp talker

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp listener
$ ros2 run demo_nodes_cpp listener
Original file line number Diff line number Diff line change
Expand Up @@ -35,56 +35,56 @@ Installation
Option 1: Install from the ROS 2 apt repository (Recommended)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash
.. code-block:: console

sudo apt install ros-{DISTRO}-rmw-gurumdds-cpp
$ sudo apt install ros-{DISTRO}-rmw-gurumdds-cpp

This installs both ``rmw_gurumdds_cpp`` and ``gurumdds``.

Option 2: Build from source code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Clone the repository

.. code-block:: bash
.. code-block:: console

cd ros2_ws/src
git clone https://github.com/ros2/rmw_gurumdds -b {DISTRO} ros2/rmw_gurumdds
$ cd ros2_ws/src
$ git clone https://github.com/ros2/rmw_gurumdds -b {DISTRO} ros2/rmw_gurumdds

2. Install dependencies:

.. code-block:: bash
.. code-block:: console

cd ..
rosdep install --from src -i --rosdistro {DISTRO}
$ cd ..
$ rosdep install --from src -i --rosdistro {DISTRO}

3. Build the workspace using Colcon:

.. code-block:: bash
.. code-block:: console

colcon build --symlink-install
$ colcon build --symlink-install


Switch to rmw_gurumdds
----------------------
Switch from other RMW implementations to rmw_gurumdds by setting the environment variable:

.. code-block:: bash
.. code-block:: console

export RMW_IMPLEMENTATION=rmw_gurumdds_cpp
$ export RMW_IMPLEMENTATION=rmw_gurumdds_cpp

For more information on working with multiple RMW implementations, see :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`.

Testing the installation
------------------------
Run the ``talker`` and ``listener`` nodes to verify your installation:

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp talker
$ ros2 run demo_nodes_cpp talker

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp listener
$ ros2 run demo_nodes_cpp listener

If the nodes communicate successfully, your installation is working correctly.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ RTI Connext Pro is available through a variety of channels:

.. group-tab:: v7.3.0

.. code-block:: bash
.. code-block:: console

sudo apt update && sudo apt install -q -y rti-connext-dds-7.3.0
$ sudo apt update && sudo apt install -q -y rti-connext-dds-7.3.0

.. group-tab:: v6.0.1

.. code-block:: console

sudo apt update && sudo apt install -q -y rti-connext-dds-6.0.1
$ sudo apt update && sudo apt install -q -y rti-connext-dds-6.0.1

Note that this includes the RTI Connext libraries only, and does not include the full RTI Connext Pro suite of tools and services.
Note also that the Connext libraries are automatically installed when installing ``rmw_connextdds`` using apt.
Expand All @@ -58,9 +58,9 @@ 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:

.. code-block:: bash
.. code-block:: console

sudo apt update && sudo apt install -q -y ros-{DISTRO}-rmw-connextdds
$ sudo apt update && sudo apt install -q -y ros-{DISTRO}-rmw-connextdds


Building rmw_connextdds from source code
Expand All @@ -72,39 +72,39 @@ pages have instructions for building for other platforms and targets, including

Clone the repository for ``rmw_connextdds`` into your ROS 2 workspace and select the branch that matches the ROS 2 distribution in use:

.. code-block:: bash
.. code-block:: console

cd ros2_ws/src
git clone https://github.com/ros2/rmw_connextdds -b {DISTRO}
$ cd ros2_ws/src
$ git clone https://github.com/ros2/rmw_connextdds -b {DISTRO}

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:

.. code-block:: bash
.. code-block:: console

source ${RTI_CONNEXT_INSTALL_LOCATION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash
$ source ${RTI_CONNEXT_INSTALL_LOCATION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash

Build the RMW using colcon:

.. code-block:: bash
.. code-block:: console

colcon build --symlink-install
$ colcon build --symlink-install

After the build completes successfully, be sure to source the setup file for the workspace:

.. code-block:: bash
.. code-block:: console

source install/setup.bash
$ source install/setup.bash


Use the resulting rmw_connextdds
--------------------------------

Set the environment variable ``RMW_IMPLEMENTATION`` to tell ROS 2 which RMW to use:

.. code-block:: bash
.. code-block:: console

export RMW_IMPLEMENTATION=rmw_connextdds
$ export RMW_IMPLEMENTATION=rmw_connextdds

See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`

Expand All @@ -113,11 +113,11 @@ Run the talker and listener

Now run ``talker`` and ``listener`` to test RTI Connext DDS

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp talker
$ ros2 run demo_nodes_cpp talker

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp listener
$ ros2 run demo_nodes_cpp listener

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Install packages

The easiest way is to install from ROS 2 apt repository.

.. code-block:: bash
.. code-block:: console

sudo apt install ros-{DISTRO}-rmw-fastrtps-cpp
$ sudo apt install ros-{DISTRO}-rmw-fastrtps-cpp

Build from source code
----------------------
Expand All @@ -26,33 +26,33 @@ Building from source code is also another way to install.

First, clone Fast DDS and rmw_fastrtps in the ROS 2 workspace source directory.

.. code-block:: bash
.. code-block:: console

cd ros2_ws/src
git clone https://github.com/ros2/rmw_fastrtps ros2/rmw_fastrtps -b {REPOS_FILE_BRANCH}
git clone https://github.com/eProsima/Fast-DDS eProsima/fastrtps
$ cd ros2_ws/src
$ git clone https://github.com/ros2/rmw_fastrtps ros2/rmw_fastrtps -b {REPOS_FILE_BRANCH}
$ git clone https://github.com/eProsima/Fast-DDS eProsima/fastrtps

Then, install necessary packages for Fast DDS.

.. code-block:: bash
.. code-block:: console

cd ..
rosdep install --from src -i
$ cd ..
$ rosdep install --from src -i

Finally, run colcon build.

.. code-block:: bash
.. code-block:: console

colcon build --symlink-install
$ colcon build --symlink-install

Switch to rmw_fastrtps
----------------------

The eProsima Fast DDS RMW can be selected by specifying the environment variable:

.. code-block:: bash
.. code-block:: console

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`

Expand All @@ -61,10 +61,10 @@ Run the talker and listener

Now run ``talker`` and ``listener`` to test Fast DDS.

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp talker
$ ros2 run demo_nodes_cpp talker

.. code-block:: bash
.. code-block:: console

ros2 run demo_nodes_cpp listener
$ ros2 run demo_nodes_cpp listener