Rcl init failed to find shared library of rmw implementation
Hi,
I installed ROS2 Dashing via the Debian package (desktop). The demo listener crashes after failing to find the Fast RTPS library (default RMW).
$ ros2 run demo_nodes_cpp listener
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what(): failed to initialized rcl init options: failed to find shared library of rmw implementation. Searched rmw_fastrtps_cpp, at /tmp/binarydeb/ros-dashing-rmw-implementation-0.7.1/src/functions.cpp:130, at /tmp/binarydeb/ros-dashing-rcl-0.7.4/src/rcl/init_options.c:55
$ locate librmw_fastrtps_cpp.so
/opt/ros/dashing/lib/librmw_fastrtps_cpp.so
$ env | grep ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_DISTRO=dashing
$ ldconfig -p | grep libfastrtps
libfastrtps.so.1 (libc6,x86-64) => /opt/ros/dashing/lib/libfastrtps.so.1
libfastrtps.so (libc6,x86-64) => /opt/ros/dashing/lib/libfastrtps.so
$ echo $LD_LIBRARY_PATH
/home/fireman/ros2_examples_ws/install/examples_rclcpp_minimal_composition/lib:/opt/ros/dashing/opt/yaml_cpp_vendor/lib:/opt/ros/dashing/opt/rviz_ogre_vendor/lib:/usr/lib:/opt/ros/dashing/lib
My Linux distribution is Ubuntu 18.04.
On ubuntu that should search
LD_LIBRARY_PATH
. What is the output ofecho $LD_LIBRARY_PATH
? Was that variable modified after sourcing/opt/ros/dashing/setup.bash
?@sloretz: Thanks! I have edited the question to include LD_LIBRARY_PATH and the ldconfig cache. No problems there.