ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Steps to build and run ROS2 application with different DDS implementations

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

AmAppu gravatar image

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

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

Comments

Can you please share how you have done this pub/sub on default dds?

sumit.paul gravatar image sumit.paul  ( 2021-12-24 06:28:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

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

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

Comments

@marguedas thank you.

AmAppu gravatar image AmAppu  ( 2020-04-20 03:52:08 -0500 )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 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 502 times

Last updated: Apr 19 '20