Unable to set RMW_IMPLEMENTATION variable in ROS2
I installed ROS2 from source. Also installed RTICONNEXT before building. I set up the envionment for RTICONNEXT 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 ConnextLIBRARIES being set to "" ? Could this be a problem as after this, it does not enters the next 2 loops i.e. `if(foundalloptimizedlibraries)and
if(foundalldebug_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 variablesetx -m OpenCV_DIR C:\opencv
and added the path asC:\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
.
Additional Prerequisites
- 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 addedC:\Program Files\Cppcheck
to the path. - Installed
Qt5_5.10.0
,MSVC64 2015 and MSVC 2017
and set the variable permanentlysetx -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.
Asked by aks on 2018-06-25 03:26:22 UTC
Comments
@Dirk Thomas : I found this script and it is entering in the first
NOT
condition. Not sure why.Asked by aks on 2018-06-25 11:03:32 UTC
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.Asked by Dirk Thomas on 2018-06-25 11:21:20 UTC
@Dirk Thomas : I am using the latest-release version from here. I guess it is #259
Asked by aks on 2018-06-25 11:36:47 UTC
The error msg suggests that
Connext_LIBRARIES
is empty. The logic above (https://github.com/ros2/rmw_connext/blob/57a849992ae4229a798f936b52f54b9d705553a5/connext_cmake_module/cmake/Modules/FindConnext.cmake#L209-L235) doesn't seem to allow that to be the case.Asked by Dirk Thomas on 2018-06-25 12:16:47 UTC
Please add
message("...")
statements above cmake/Modules/FindConnext.cmake:235 to output the various local variables how this happens.Asked by Dirk Thomas on 2018-06-25 12:17:18 UTC
@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 ?
Asked by aks on 2018-06-26 08:43:38 UTC
Is the NDDSHOME environment variable set? Does it contain a space? https://community.rti.com/kb/my-nddshome-environment-variable-has-space-path-why-aren%E2%80%99t-shipped-examples-compiling
Asked by sloretz on 2018-06-26 09:33:08 UTC
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 betweenProgram Files
? @sloretzAsked by aks on 2018-06-26 09:39:11 UTC
@sloretz : no this is not the problem as I replaced it with
PROGRA~1
and it is still the same. I also printed some other local variables which I will update in the question.Asked by aks on 2018-06-26 10:14:24 UTC
@sloretz @Dirk Thomas could you please have a look at it ? I am somehow unable to crack it
Asked by aks on 2018-06-26 15:47:59 UTC
To get more help you will probably need to fully describe how you have setup your workspace and all the commands that you're running. I'd suggest starting from the beginning and copying all your terminal outputs into a gist that you can share so we can understand what you're doing.
Asked by tfoote on 2018-06-26 15:53:51 UTC
@tfoote : although I followed the instructions here but still I have updated the question with all the steps I followed.
Asked by aks on 2018-06-27 01:54:09 UTC
@Dirk Thomas @sloretz @tfoote : Could you please have a look at it and let me know if I am making some common mistake or the
FindConnext.cmake
file has really some bug ?Asked by aks on 2018-06-28 02:14:53 UTC
The double quotes in the middle of your library paths look suspicious. Maybe those are causing problems. I would suggest to continue debugging more until it is clear why the variables get the values they have (fully tracing the flow of the execution).
Asked by Dirk Thomas on 2018-07-27 18:50:23 UTC