Unable to set RMW_IMPLEMENTATION variable in ROS2

asked 2018-06-25 03:26:22 -0500

aks gravatar image

updated 2018-06-27 01:53:16 -0500

I installed ROS2 from source. Also installed RTI_CONNEXT before building. I set up the envionment for RTI_CONNEXT as well call "C:\Program Files\rti_connext_dds-5.3.1\resource\scripts\rtisetenv_x64Win64VS2017.bat" . Now if I try to run the demo nodes with rti connext. I set the rmw_implementation = rmw_connext_cpp. But while running the demo nodes I get an error : Expected RMW implementation identifier of 'rmw_connext_cpp' but instead found 'rmw_fastrtps_cpp', exiting with 102. This clearly states that the support for rti_connext is not installed. But specifically for this purpose I installed ROS2 again from source.

My question is how can I install the RTI_connext support ?


I again tried to install ROS2 from source. called the batch file for connext and now I have a build error :

    Starting >>> rosidl_generator_dds_idl
--- stderr: connext_cmake_module
CMake Error at cmake/Modules/FindConnext.cmake:235 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:9 (find_package)

CMake Error at C:/dev/ros2/install/ament_cmake_core/share/ament_cmake_core/cmake/core/normalize_path.cmake:28 (message):
  normalize_path() the path '' must neither be empty nor contain semicolons
Call Stack (most recent call first):
  CMakeLists.txt:12 (normalize_path)

Failed   <<< connext_cmake_module       [ Exited with code 1 ]
Aborted  <<< rosidl_generator_dds_idl
Aborted  <<< rosidl_generator_c
Aborted  <<< poco_vendor

EDIT 2 :

I tried to print the local variables in FindConnext.cmake as follows :

  message("First variable:'${Connext_LIBRARIES}'")
  message("Second variable:'${_last_index}'")
  message("Third variable:'${_last_lib}'")
  list(GET Connext_LIBRARIES ${_last_index} _last_lib)

And this is the output I get before the build fails :

First variable:''
Second variable:'-1'
Third variable:''
CMake Error at cmake/Modules/FindConnext.cmake:238 (list):
list GET given empty list

Basically It is not finding any connext libraries.

I have already reproduced this on 3 different machines. Not sure what am I doing wrong.


Now I am trying to debug this code and printed some other local variables:

After line 190 and 191, I printed the optimized as well as the debug library name and the library path and it finds these libraries :

optimised library names :'nddsc.lib;nddscore.lib;nddscpp.lib;rticonnextmsgcpp.lib'
optimised library path :'"C:/PROGRA~1/rti_connext_dds-5.3.1/"/lib'
debug library names :'nddscd.lib;nddscored.lib;nddscppd.lib;rticonnextmsgcppd.lib'
debug library path :'"C:/PROGRA~1/rti_connext_dds-5.3.1/"/lib'

That means it is looking into the right path and finding the right libraries.

What I dont understand is, in line 213, why is Connext_LIBRARIES being set to "" ? Could this be a problem as after this, it does not enters the next 2 loops i.e. if(_found_all_optimized_libraries) and if(_found_all_debug_libraries) because we have already set it to "" in line 213.

Recommendations please ?

EDIT 4 :

Here is a summary of the steps I followed :

Installed Prerequistes

  • Chocolatey
  • python
  • OpenSSL using default installation. set the path variable and also the OPENSSL_CONF variable
  • Installed Visual Studio 2017.
  • Installed RTI Connext according to the procedure mentioned in their registration email and then set the NDDSHOME variable using set "NDDSHOME=C:\Program Files\rti_connext_dds-5.3.1"
  • Installed OpenCV to C:\openCV, set the ...
edit retag flag offensive close merge delete


@Dirk Thomas : I found this script and it is entering in the first NOT condition. Not sure why.

aks gravatar image aks  ( 2018-06-25 11:03:32 -0500 )edit

Without know what exact version you are trying to compile the line number aren't helpful. Please include the hash of the rmw_connext / rosidl_typesupport_connext repo you are using.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-06-25 11:21:20 -0500 )edit

@Dirk Thomas : I am using the latest-release version from here. I guess it is #259

aks gravatar image aks  ( 2018-06-25 11:36:47 -0500 )edit

The error msg suggests that Connext_LIBRARIES is empty. The logic above ( https://github.com/ros2/rmw_connext/b... ) doesn't seem to allow that to be the case.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-06-25 12:16:47 -0500 )edit

Please add message("...") statements above cmake/Modules/FindConnext.cmake:235 to output the various local variables how this happens.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-06-25 12:17:18 -0500 )edit

@Dirk Thomas : I have reproducd this issue on 3 different machines. If possible, could you please check at your end if things are working fine at your end ?

aks gravatar image aks  ( 2018-06-26 08:43:38 -0500 )edit

Is the NDDSHOME environment variable set? Does it contain a space? https://community.rti.com/kb/my-nddsh...

sloretz gravatar image sloretz  ( 2018-06-26 09:33:08 -0500 )edit

Yes, NDDSHOME variable is already set. This is the output of SET command on windows: NDDSHOME=C:\Program Files\rti_connext_dds-5.3.1. Do you mean the space between Program Files ? @sloretz

aks gravatar image aks  ( 2018-06-26 09:39:11 -0500 )edit