ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
A newbee like me might find this answer helpful.
After some debugging I have figured out the way to communicate different nodes over dds.
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ROS_DOMAIN_ID=<id> ros2 run <package> <application>
This will run the ROS2 node on the fastrtps DDS. To establish pub/sub communication between two nodes we have to use the same ROS_DOMAIN_ID. As fastrtps is the default dds middleware for ROS2 so we do not have to install it seperately. If anyone has to use other dds middleware he/she has to download the desired dds middleware and replace it in the RMW_IMPLEMENTATION=<desired_dds>
If the ROS2 nodes are in different DOMAIN, then Integration-service is there to save us. Please check this links. ROS2-FASTDDS, Integration-Service, ROS2-Different-Domain-Communication
The transformation of ROS2 topic and DDS idl are handled by the integration-service. This example can be a good starting point.
If anyone has to compile their own ROS2 msg/service/interfaces and generate mix files to use in the integration-service please check this, ROS2-System-handle.