Rcl init failed to find shared library of rmw implementation

asked 2019-06-13 12:11:56 -0500

ananya.muddu gravatar image

updated 2019-06-14 04:05:15 -0500

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.

edit retag flag offensive close merge delete

Comments

On ubuntu that should search LD_LIBRARY_PATH. What is the output of echo $LD_LIBRARY_PATH? Was that variable modified after sourcing /opt/ros/dashing/setup.bash?

sloretz gravatar imagesloretz ( 2019-06-13 14:32:50 -0500 )edit

@sloretz: Thanks! I have edited the question to include LD_LIBRARY_PATH and the ldconfig cache. No problems there.

ananya.muddu gravatar imageananya.muddu ( 2019-06-14 02:42:17 -0500 )edit