0
$\begingroup$

Rosanswers logo

Hi, I have a ROS2 pub-sub application and it works fine on default DDS implementation fastRTPS. I would like to change the middleware to another DDS implementation like openSplice or Connext DDS.

What are the changes needed in my package(in CMake & package.xml) and build steps to support those implementations?


Originally posted by AmAppu on ROS Answers with karma: 3 on 2020-04-19

Post score: 0


Original comments

Comment by sumit.paul on 2021-12-24:
Can you please share how you have done this pub/sub on default dds?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Short answer is : None. No code change is needed at all if your application use only ROS API (and not specific Fast-RTPS symbols)

ROS 2 aims to abstract all this from you and if you have another DDS implementation installed you should be able to switch to another implementation by just setting the RMW_IMPLEMENTATION environment variable. You can find more info here

This has limits though, for examples if you application contains custom ROS messages, you need to generate them for the implementation you want to use. So you need to have the DDS implementation and corresponding ROS packages already installed before building the workspace of your application.

For a concrete example: if you use ROS Eloquent, all you need to do to use Connext DDS in your application is:

  • install connext DDS and it's ROS wrapper : apt-get install ros-eloquent-rmw-connext-cpp
  • source your ROS installation: source /opt/ros/eloquent/setup.bash
  • build your workspace: colcon build
  • export RMW_IMPLEMENTATION=rmw_connext_cpp
  • ros2 run my_package my_application

Originally posted by marguedas with karma: 3606 on 2020-04-19

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by AmAppu on 2020-04-20:
@marguedas thank you.

Comment by marguedas on 2020-04-20:
You're welcome :) If it answered your question satisfyingly, please accept the answer by clicking on the checkmark on the left, this will remove this question from the backlog of "unanswered" questions

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.