# Revision history [back]

### Unable to set RMW_IMPLEMENTATION variable in ROS2

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 ?

### Unable to set RMW_IMPLEMENTATION variable in ROS2

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 ?

EDIT :

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


### Unable to set RMW_IMPLEMENTATION variable in ROS2

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 ?

EDIT :1:

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.

### Unable to set RMW_IMPLEMENTATION variable in ROS2

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 ?

EDIT 1:

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.

EDIT 3:

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.

### Unable to set RMW_IMPLEMENTATION variable in ROS2

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 ?

EDIT 1:

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.

EDIT 3:

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.

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 variable setx -m OpenCV_DIR C:\opencv and added the path as C:\opencv\x64\vc15\bin.
• Installed dependencies asio, eigen, tinyxml-usestl2.6.2,tinyxml2.6.0.0.
• Installed Python dependencies for cmd tools : python -m pip install -U catkin_pkg empy pyparsing pyyaml setuptools.

• Installed git, cmake, patch.
• Installed developer tools : vcstool, colcon, curl.
• Installed Dependencies : setuptools, pip, catkin_pkg EmPy pyparsing pyyaml, pytest coverage mock, flake8, cppcheck, and added C:\Program Files\Cppcheck to the path.
• Installed Qt5_5.10.0, MSVC64 2015 and MSVC 2017 and set the variable permanently setx -m Qt5_DIR C:\Qt\5.10.0\msvc2017_64.

## Getting the source code

• created a development folder and navigated to the directory : cd \dev\ros2.
• got the ROS2 latest repositories using curl -sk https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos -o ros2.repos.
• Imported the repositories using vcs import src < ros2.repos.
• Switched to a VS2017 Native command prompt, navigated to the ros2 directotry and called the batch file for RTI Connext : call "C:\Program Files\rti_connext_dds-5.3.1\resource\scripts\rtisetenv_x64Win64VS2017.bat". The cmd shell shows a RTI connext installed patch.

## Building the ROS2 code

• from the same cmd shell called colcon build.
• After this it processes around 40 packages and the fails as it could not find the connext libraries as described in the question above and the comments below.