ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Rviz motion_planning Error: Failed to load library

asked 2014-10-06 22:44:06 -0500

sara gravatar image

updated 2014-10-06 22:50:12 -0500

Hi all,

I am following through the Moveit! Industrial Robot Tutorial and got stuck.

when I add motion planning or any from the moveit_ros_visualization folder, it will show the same error:

MotionPlanning The class required for this display, 'moveit_rviz_plugin/MotionPlanning', could not be loaded.

Error: Failed to load library /opt/ros/hydro/lib/ Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = cannot open shared object file: No such file or directory)

However, the is right in its place.

How can I solve this?

This is the screenshot

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-06 23:23:52 -0500

ahendrix gravatar image

It looks like the MoveIt plugin for Rviz depends on a particular version of the Orocos KDL library that isn't present.

I would start by making sure that all of your packages are up to date:

sudo apt-get update
sudo apt-get dist-upgrade
edit flag offensive delete link more


gvdhoorn gravatar image gvdhoorn  ( 2014-10-07 03:36:08 -0500 )edit
anonymous userAnonymous ( 2017-06-09 14:51:19 -0500 )edit

Nope. It looks like the plugin is compiled against packages that use OpenCV 2.4, and can't be used with a different version.

ahendrix gravatar image ahendrix  ( 2017-06-09 16:41:06 -0500 )edit

answered 2021-10-30 07:38:37 -0500

shabelson gravatar image

I had Similar problem on ROS_MELODIC , ubuntu 18.04.

From What I read - moveit uses opencv 3.2. if there is collision between opencv versions it can cause it. The file he is searching for is an OpenCV 3.2 dynamic library (compiled file with a lot of fun inside...)

My solution -

I had OpenCV 2.4 and 4.5 on my machine. once I removed those I still saw under "pkg-config --modversion opencv" - OpenCV 3.2 (I think there were left over from ros opencv .so files)

  1. I completely cleaned the other opencv versions (many tuts online) - which caused the removal of parts of rviz, moveit etc.
  2. I reinstalled ros, moveit etc...

I WISH - I'd knew if there is a possibility to run moveit while other OpenCV versions are installed....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-10-06 22:44:06 -0500

Seen: 4,951 times

Last updated: Oct 06 '14