Search code examples
rosros2

Problem trying to deploy ROS to a different machine: 'failed to load any RMW implementations'


I installed ROS Humble on a machine following the installation steps.

Now, I want to help people installing this version of ROS on different machines without having to follow the whole installation steps. My company policy unfortunately do not allow me to use docker.

Then I simply:

  • created a target folder (ros2_depends)

  • copied to ros2_depends all the dependencies installed on the first machine (chocolatey, CMake and OpenSSL-Win64 folders)

  • copied this folder to the target machine with ROS2

  • updated the PATH and other variables such as CHOCO_PATH or OPENSSL_CONF to point to ros2_depends folder.

  • also copied C:\Python38 directly from the first machine to the new machine (as some ROS files like ros2-script.py assumes Python is located in C:\Python38, no choice with this one, could not make it part of ros2_depends)

Then, when I try to run ROS2 (ros2 run demo_nodes_py listener), I got the error:

Traceback (most recent call last):
  File "C:\ROS2\ros2-windows\lib\demo_nodes_py\listener-script.py", line 33, in <module>
    sys.exit(load_entry_point('demo-nodes-py==0.20.3', 'console_scripts', 'listener')())
  File "C:\ROS2\ros2-windows\Lib\site-packages\demo_nodes_py\topics\listener.py", line 35, in main
    rclpy.init(args=args)
  File "C:\ROS2\ros2-windows\Lib\site-packages\rclpy\__init__.py", line 89, in init
    return context.init(args, domain_id=domain_id)
  File "C:\ROS2\ros2-windows\Lib\site-packages\rclpy\context.py", line 72, in init
    self.__context = _rclpy.Context(
rclpy._rclpy_pybind11.RCLError: Failed to initialize init options: failed to load any RMW implementations, at C:\ci\ws\src\ros2\rmw_implementation\rmw_implementation\src\functions.cpp:125, at C:\ci\ws\src\ros2\rcl\rcl\src\rcl\init_options.c:75
[ros2run]: Process exited with failure 1

Any idea what could be wrong?


Solution

  • The problem was because OpenSSL-Win64's bin folder was not added to the PATH. Adding it to the PATH fixes the issue.