Ask Your Question

Steps to build and run ROS2 application with different DDS implementations

asked 2020-04-19 04:43:11 -0600

AmAppu gravatar image

updated 2020-04-19 04:43:51 -0600

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-19 05:09:43 -0600

marguedas gravatar image

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
edit flag offensive delete link more


@marguedas thank you.

AmAppu gravatar image AmAppu  ( 2020-04-20 03:52:08 -0600 )edit

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

marguedas gravatar image marguedas  ( 2020-04-20 05:18:53 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-19 04:43:11 -0600

Seen: 217 times

Last updated: Apr 19 '20