ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Change the default DDS implementation

I read through the wiki document on changing the default DDS implementation. However, it does not answer the question. It says how to change the one used at runtime through use of the RMW_IMPLEMENTATION environment variable. It also explains that they are chosen by alphabetical order if that variable is not set and FastRTPS was not compiled in. However, I want to compile in FastRTPS and OpenSplice and CoreDX support, but I want CoreDX to be used when RMW_IMPLEMENTATION is absent. How do I make this happen?

I found the ordering in get_default_rmw_implementation.cmake. However, it’s not clear to me how RMW_IMPLEMENTATION affects this (at compile time). Does RMW_IMPLEMENTATION being set during compile cause a single middleware to get compiled in or does it just change the default middleware?

Hi @BrannonKing,

You can change the default rmw implementation by defining the RMW_IMPLEMENTATION environment variable before compiling (you will need to make sure to recompile the rmw_implementation package for the change to take effect).
You can also change the default rmw implementation used by modifying this file.

Setting this variable before compiling only changes which rmw_implementation library will be opened by default. It still compiles all rmw implementation allowing you to select another one at runtime by setting RMW_IMPLEMENTATION if you want to.