moveit_calibration
moveit_calibration copied to clipboard
Plugin library is not found after building
I just added and built this package, but get this error when I try to add the panel in Rviz:
The class required for this panel, 'moveit_rviz_plugin/HandEyeCalibration', could not be loaded.
Error:
Failed to load library /root/underlay_ws/devel/lib/libmoveit_handeye_calibration_rviz_plugin.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 = libmoveit_planning_scene_monitor.so.1.0.4: cannot open shared object file: No such file or directory)
In the terminal, almost the same text is displayed, except the first sentence is PluginlibFactory: The plugin for class 'moveit_rviz_plugin/HandEyeCalibration' failed to load.
Has anyone else encountered this? I did not find anything upon cursory googling. Maybe it is a simple setup issue one of you has run into before.
I'll be annoying and ping @JStech and @RoboticsYY just in case
Heh--thanks. I'll see what I can figure out, although I've not run into this myself.
It looks like PLUGINLIB_EXPORT_CLASS
just calls (er, expands to) CLASS_LOADER_REGISTER_CLASS
(defined here), which is in moveit_calibration_gui/handeye_calibration_rviz_plugin/src/plugin_init.cpp
.
Maybe try replacing that CLASS_LOADER_REGISTER_CLASS
call with PLUGINLIB_EXPORT_CLASS
and see if it's happy? I made this change and it built, but I don't know if it fixes this issue, since it didn't happen to me in the first place.
Another idea. What, exactly, are you building? The GUI plugin isn't merged into master
yet. You should check out charuco-with-rviz
from my fork
Another idea. What, exactly, are you building? The GUI plugin isn't merged into
master
yet. You should check outcharuco-with-rviz
from my fork
Hi @JStech, Since the parameter loading has been changed in PR #7, PR #4 is not working with the current target plugin any more. Could you please file a PR from your branch charuco-with-rviz
to PR #4?
Hi @RoboticsYY , I did file this PR: RoboticsYY/moveit_calibration#2, although maybe I filed it in the wrong place (still kinda new to GitHub). I also see now that it has merge conflicts. I'll try to figure it out.
Hi @RoboticsYY , I did file this PR: RoboticsYY#2, although maybe I filed it in the wrong place (still kinda new to GitHub). I also see now that it has merge conflicts. I'll try to figure it out.
Sorry, I missed it. I will rebase PR #4 to master branch, I think this can resolve most of the conflicts.
Thanks for trying to fix the issue. I appreciate other people taking care of the dark arts.
Maybe try replacing that
CLASS_LOADER_REGISTER_CLASS
call withPLUGINLIB_EXPORT_CLASS
and see if it's happy?
That gives me error: expected constructor, destructor, or type conversion at the end of input
for that line. Do I need to add anything?
What, exactly, are you building?
I just merged the two open PRs of the RoboticsYY
repo into the master
of this one locally and tried to build it :0
@JStech I have rebased PR #4 to the master branch. This resolved some conflicts. For the rest conflicts, could you please rebase the branch charuco-with-rviz
to the branch pr-add_handeye_calibration_rviz_plugin
? When the conflicts are resolved, I will test with a camera and merge it into PR #4.
@felixvd I think it also needs #include <pluginlib/class_list_macros.h>
, which can replace the class_loader
include.
Sadly that didn't solve it. I wonder what my problem is. It thought it might be something to do with my workspace setup, but moving it into another one did not change anything.
I have the same issue, I merged PR4 into master, also used info from PR5 to install opencv 3.4 packages. gui failed to build, which lead to the same error being thrown when I try to add the panel.
That sounds like you should try to get your build to succeed first. What is the error?
For the record, I have no build errors, and when the PR was still on the main moveit repo I had built and added the plugin successfully, so maybe something has changed since.
The error is below. I had built and successfully run the plugin previously, but needed to rebuild it as I was working with some other moveit packages.
Starting >>> moveit_calibration_gui
--- EDIT --- remove unnecessary info.
Failed << moveit_calibration_gui:make [ Exited with code 2 ]
Failed <<< moveit_calibration_gui [ 25.2 seconds ]
@felixvd I have made a fresh build with @JStech 's branch, I didn't come into the error that you met when loading the Rviz plugin. I noticed that in your error message Rviz tried to load the plugin from /devel
. Recently seems catkin always create /install
as default. Can you also try source the setup.bash
from /install
?
@ros-gy There are some changes that haven't been merged into PR #4. I believe the build errors can be resolved by using @JStech 's branch instead of PR #4 for now.
Thanks, that branch built and loaded the plugin successfully.
My workspace isn't set up to install, so there's no install
directory after building. I managed to build and load the plugin on another machine with the branch you linked though, so it is definitely something to do with the workspace.
edit: Still getting the same error, but the binary ..._ws/devel/lib/libmoveit_handeye_calibration_rviz_plugin.so
exists. The error mentions this: Could not load library (Poco exception = libmoveit_planning_scene_monitor.so.1.0.4: cannot open shared object file: No such file or directory)
, but I have libmoveit_planning_scene_monitor.so.1.1.0
in my workspace's devel/lib
. Why is the plugin looking for an older version? I wonder where this number is coming from, considering that the moveit binaries in opt/ros/melodic/lib
are 1.0.3
and the master branch I am compiling from source is 1.1.0
. The number 1.0.4
does not appear anywhere in my workspace or even in /opt/ros/melodic
! Tempted to ping @tylerjw for ideas.
PS: Naturally I clean the workspace before building.
I'm curious if you were able to figure this out, @felixvd
No, I have been calibrating with an internal package :(
My new theory is that planning_scene_monitor
is in the moveit_ros_planning
package, but the CMakeLists.txt
and package.xml
for moveit_calibration_gui
don't list that as a dependency (they do have moveit_ros_planning_interface
, which of course is not the same thing), so it's just the wild west when your compiler goes looking for a library to link against. Maybe try this branch? https://github.com/JStech/moveit_calibration/tree/cmake-deps
For the record, I tried this again with master, and now it just crashes on load. Hm.
Hm indeed. Is it still giving an error about the libmoveit_planning_scene_monitor.so
version? I should update that branch and open a PR for it.
I think that this (#61) might fix it. Could you give it a try?
I am having this same issue. Any ideas on how to solve it yet?
Thanks!
@Sofiap91 you've pulled master recently? (as in, since 1 February)
Unfortunately, I've not been able to reproduce this, so I can't figure out what's going wrong. I was hoping that #61 had fixed it . . .
@JStech yes, yesterday actually.
Well, shoot. Could you please share the error message that's being reported?
@JStech The error on Rviz is the following:
The class required for this panel, 'moveit_rviz_plugin/HandEyeCalibration', could not be loaded. Error: Could not find library corresponding to plugin moveit_rviz_plugin/HandEyeCalibration. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
That looks like a slightly different error--it's not finding the library, whereas Felix's issue was that the library was found but was not loading (because it couldn't find yet another library). But I still don't know what to do about it--sorry
Trying building the rviz_visual_tools package from source.
worked for me.