Ask Your Question
0

missing file librqt_image_view.so [closed]

asked 2020-06-22 17:18:29 -0600

gab27 gravatar image

updated 2020-06-23 20:29:29 -0600

Hi

if I want to start rqt_image_view via rosrun rqt_image_view rqt_image_view or just rqt_image_view then I get the following error:

[ERROR] [1592863606.174353422]: Failed to load nodelet [rqt_image_view/ImageView_0] of type [rqt_image_view/ImageView]: Failed to load library /opt/ros/melodic/lib//librqt_image_view.so. 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 = libopencv_core.so.3.2: cannot open shared object file: No such file or directory)
RosPluginlibPluginProvider::load_explicit_type(rqt_image_view/ImageView) failed creating instance
PluginManager._load_plugin() could not load plugin "rqt_image_view/ImageView": RosPluginlibPluginProvider.load() could not load plugin "rqt_image_view/ImageView"
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
pure virtual method called
terminate called recursively
Aborted (core dumped)

the same happens for rosrun image_view image_view

[ INFO] [1592863868.679032143]: Initializing nodelet with 12 worker threads.
[ERROR] [1592863868.692291840]: Failed to load nodelet [/image_view] of type [image_view/image] even after refreshing the cache: Failed to load library /opt/ros/melodic/lib//libimage_view.so. 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 = libopencv_core.so.3.2: cannot open shared object file: No such file or directory)
[ERROR] [1592863868.692331964]: The error before refreshing the cache was: Failed to load library /opt/ros/melodic/lib//libimage_view.so. 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 = libopencv_core.so.3.2: cannot open shared object file: No such file or directory)

The problem is that this file /libimage_view.so does not exist. The ros installation works fine for all other things (rviz, rqt_plot, ...). The only problem is the image data.

I also tried to this:

sudo apt-get install ros-melodic-rqt-image-view
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-melodic-rqt-image-view is already the newest version (0.4.14-1bionic.20200530.125139).
ros-melodic-rqt-image-view set to manually installed.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

sudo apt-get install ros-melodic-image-view
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-melodic-image-view is already the newest version (1.15.0-1bionic.20200530.133102).
ros-melodic-image-view set to manually installed.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Edit: locate lilibopencv_core.so:

user@neworder-ph:~$ locate libopencv_core.so
/home/user/opencv_build/opencv/build/lib/libopencv_core.so
/home/user/opencv_build/opencv/build/lib/libopencv_core.so.4.3
/home/user/opencv_build/opencv/build/lib/libopencv_core.so.4.3.0
/usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_core.so.4.3
/usr/local/lib/libopencv_core.so.4.3.0

Does someone have a solution to this problem?

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by gab27
close date 2020-07-09 21:06:02.559864

3 Answers

Sort by ยป oldest newest most voted
0

answered 2020-06-23 00:33:14 -0600

KenYN gravatar image

It looks like you need to run:

sudo apt install ros-melodic-rqt-image-view

This will install the required files.

edit flag offensive delete link more
1

answered 2020-06-23 08:53:00 -0600

Dirk Thomas gravatar image

updated 2020-06-23 23:27:06 -0600

The problem is that this file /libimage_view.so does not exist.

The error message in each case says: Failed to load library .... I would assume the library path stated does exist since you have the Debian packages installed as mentioned below.

The error message also additionally mentions:

Could not load library (Poco exception = libopencv_core.so.3.2: cannot open shared object file: No such file or directory)

So what is not found is the OpenCV library. Please edit your question to include the output of the following command: locate libopencv_core.so.

Update:

Ubuntu Bionic (which is the platform targeted by ROS Melodic) ships with OpenCV 3.2 and as such all ROS Debian packages are built and linked against that version. You seem to have a different custom version installed (4.3). You can do either of the following options:

  • replace your custom OpenCV version with the default version provided by Ubuntu or
  • build all ROS packages which use OpenCV from source (which might or might not work out of the box) against the different OpenCV version.
edit flag offensive delete link more

Comments

Thanks, edited the question. So probally some path is wrong?

gab27 gravatar image gab27  ( 2020-06-23 17:21:11 -0600 )edit

Hmmm ok then I try to install OpenCV 3.2

gab27 gravatar image gab27  ( 2020-06-23 23:44:58 -0600 )edit
0

answered 2020-07-09 21:05:26 -0600

gab27 gravatar image

I had removed OpenCV before and at this process I also removed some opencv files, which where installed by ros. So I removed all opencv files on the computer and ros. I install ros new and it works now!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-22 17:18:29 -0600

Seen: 516 times

Last updated: Jul 09 '20