ROS2 Windows - rmw_implementation error when running examples
I have been trying to install ROS 2 from binary onto Windows by following these instructions. When on the step to run the examples, the C++ talker exits silently, while the Python listener raises the following exception:
C:\Users\Testing>call "C:\dev\ros2_foxy\local_setup.bat"
[connext_cmake_module] Warning: The location at which Connext was found when the workspace was built [[C:\Program Files\rti_connext_dds-5.3.1]] does not point to a valid directory, and the NDDSHOME environment variable has not been set. Support for Connext will not be available.
C:\Users\Testing>ros2 run demo_nodes_py listener
Traceback (most recent call last):
File "C:\dev\ros2_foxy\lib\demo_nodes_py\listener-script.py", line 11, in <module>
load_entry_point('demo-nodes-py==0.9.3', 'console_scripts', 'listener')()
File "C:\dev\ros2_foxy\Lib\site-packages\demo_nodes_py\topics\listener.py", line 32, in main
rclpy.init(args=args)
File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\__init__.py", line 71, in init
return context.init(args)
File "C:\dev\ros2_foxy\Lib\site-packages\rclpy\context.py", line 59, in init
rclpy_implementation.rclpy_init(args if args is not None else sys.argv, capsule)
RuntimeError: Failed to initialize init_options: failed to load shared library of rmw implementation: C:\dev\ros2_foxy\bin/rmw_fastrtps_cpp.dll Exception: LoadLibrary error: 126, at C:\ci\ws\src\ros2\rcutils\src\shared_library.c:72, at C:\ci\ws\src\ros2\rmw_implementation\rmw_implementation\src\functions.cpp:64, at C:\ci\ws\src\ros2\rcl\rcl\src\rcl\init_options.c:55
Running ros2 node list
generates a related sort of error:
C:\Users\Testing>ros2 node list
Unable to get rmw_implementation_identifier, try specifying the implementation to use via the 'RMW_IMPLEMENTATION' environment variable
I used DependencyWalker to see if anything was missing for the rmw_fastrtps_cpp.dll
file, and it looks like several core Windows files are missing, such as API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL
, API-MS-WIN-CORE-APIQUERY-L1-1-1.DLL
, API-MS-WIN-CORE-APPCOMPAT-L1-1-0.DLL
, and many others. I was assuming these files should have been provided by one of the steps in the installation instructions. Am I wrong?
Has anyone found a fix for this? I need this to work so that I can test that ROS 2 code I develop will work on Windows installations.