ROS 2 RMW Integration
AstuteDDS ships a native ROS 2 RMW (ROS Middleware) plugin —
rmw_astutedds_cpp — that replaces the default middleware layer so all ROS 2
communication runs over the AstuteDDS DDSI-RTPS 2.5 stack.
Prerequisites
| Requirement | Version |
|---|---|
| ROS 2 | Lyrical or later |
| AstuteDDS | 1.0.0-rc.6 or later |
| OS | Ubuntu 24.04 / 26.04, AlmaLinux 9 / 10 |
Installation
Ubuntu (24.04 or 26.04)
Install both the core library and the RMW plugin from the release .deb
packages:
sudo dpkg -i astutedds-dev_<version>_amd64.deb
sudo dpkg -i ros-lyrical-rmw-astutedds-cpp_<version>_amd64.deb
sudo apt-get install -f # resolve any missing ROS dependencies
AlmaLinux / RHEL 9 or 10
sudo dnf install ./astutedds-dev-<version>-*.x86_64.rpm
sudo dnf install ./ros-lyrical-rmw-astutedds-cpp-<version>-*.x86_64.rpm
Windows
The RMW plugin is included as an optional component in the AstuteDDS SDK installer. Run the installer and ensure the ROS 2 RMW component is selected:
astutedds-sdk-<version>-windows-x64.exe
The installer places rmw_astutedds_cpp.dll and the associated ament index
files under <install prefix>\ros2\opt\ros\lyrical\.
Activating the Plugin
Set RMW_IMPLEMENTATION before launching any ROS 2 process:
export RMW_IMPLEMENTATION=rmw_astutedds_cpp
Source the ROS 2 environment after installing the packages:
source /opt/ros/lyrical/setup.bash
export RMW_IMPLEMENTATION=rmw_astutedds_cpp
You can also activate it inline without modifying your environment:
RMW_IMPLEMENTATION=rmw_astutedds_cpp ros2 topic list
RMW_IMPLEMENTATION=rmw_astutedds_cpp ros2 run demo_nodes_cpp talker
Verifying the Installation
Check the plugin loads
source /opt/ros/lyrical/setup.bash
export RMW_IMPLEMENTATION=rmw_astutedds_cpp
ros2 doctor --report | grep rmw
Expected output includes rmw_implementation: rmw_astutedds_cpp.
List topics
# Use --no-daemon to bypass any cached daemon started with a different RMW
ros2 topic list --no-daemon
Echo a topic
ros2 run demo_nodes_cpp talker &
ros2 topic echo /chatter std_msgs/msg/String
DDS Domain
AstuteDDS uses domain 0 by default. Override with ROS_DOMAIN_ID:
export ROS_DOMAIN_ID=5
ros2 run demo_nodes_cpp talker
All nodes that share a domain ID communicate with each other. Nodes in different domain IDs are isolated.
QoS Compatibility
The plugin maps ROS 2 QoS profiles to DDS QoS policies:
| ROS 2 QoS Profile | Reliability | Durability | History |
|---|---|---|---|
SENSOR_DATA |
Best Effort | Volatile | Keep Last 5 |
PARAMETERS |
Reliable | Volatile | Keep Last 1000 |
SERVICES_DEFAULT |
Reliable | Volatile | Keep Last 1 |
DEFAULT |
Reliable | Volatile | Keep Last 10 |
Mismatched reliability between a publisher and a subscription will result in no data flowing. AstuteDDS will log a warning when a QoS mismatch is detected.
Topic Discovery
rmw_get_topic_names_and_types polls the AstuteDDS discovery cache for up to
one second (20 × 50 ms) after the call is made. If remote participants have
not yet been discovered within that window, their topics will not appear in
the result. This is consistent with standard SPDP announcement intervals.
To allow time for discovery:
# Start your node and wait a moment before querying
ros2 node list
ros2 topic list
Daemon Considerations
The ros2 topic list command uses a background daemon process. The daemon
captures the RMW_IMPLEMENTATION value at start-up. If the daemon was
started under a different RMW (e.g. rmw_fastrtps_cpp), topic discovery will
use that RMW instead.
Restart the daemon with the correct RMW before querying:
export RMW_IMPLEMENTATION=rmw_astutedds_cpp
ros2 daemon stop
ros2 daemon start
ros2 topic list
Or skip the daemon entirely:
ros2 topic list --no-daemon
Interoperability
Because rmw_astutedds_cpp uses the standard DDSI-RTPS 2.5 wire protocol,
it interoperates with:
- Other ROS 2 nodes using any standards-compliant RMW
- Native DDS applications (RTI Connext, Eclipse CycloneDDS, eProsima Fast DDS, OpenDDS, and others)
- Astute Shapes Demo and astutedds-inspect for live traffic monitoring
Troubleshooting
Failed to load shared library 'librmw_astutedds_cpp.so'
The plugin library is not on LD_LIBRARY_PATH. Ensure the ROS 2 environment
is sourced after installing the package:
source /opt/ros/lyrical/setup.bash
ros2 topic list returns empty
- Confirm the daemon is using the correct RMW (see Daemon Considerations).
- Allow a few seconds for SPDP participant discovery before querying.
- Verify publisher and subscriber are on the same
ROS_DOMAIN_ID.
Bad substitution or builtin: not found when sourcing setup.bash
setup.bash requires bash. Do not source it from a sh/dash session:
bash -c "source /opt/ros/lyrical/setup.bash && ros2 topic list"
Nodes on separate machines do not discover each other
AstuteDDS uses UDP multicast for participant discovery (SPDP). Ensure:
- Both machines are on the same subnet and multicast is enabled.
- Firewall rules allow UDP on ports 7400–7413 (domain 0) or the relevant domain-ID range.
- If multicast is unavailable, configure unicast peer addresses via the
ASTUTEDDS_PEERSenvironment variable (see JSON Discovery Config).