ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

MultiLibraryClassLoader Error

asked 2018-05-14 02:41:35 -0500

TifferPelode gravatar image

Hello everyone,

I'm writing a rviz panel.

When I change namespace (tiffer_panel -> Tiffer) in my code, and change the PLUGINLIB_EXPORT_CLASS.

#include <pluginlib/class_list_macros.h>
PLUGINLIB_EXPORT_CLASS(Tiffer::TifferPanel,rviz::Panel )

After Compiled, when I run rviz with this panel, got this

PluginlibFactory: The plugin for class 'Tiffer' failed to load.  Error: MultiLibraryClassLoader: Could not create class of type tiffer_panel::TifferPanel

It seems not change. But when I change the namespace back (Tiffer -> tiffer_panel), it works well again...

Can someone tell me what's wrong with this?

edit retag flag offensive close merge delete


Did you also update your plugin.xml (or whatever you named that file)?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-14 05:33:18 -0500 )edit

I did not find this file,can you plz tell me where it is?

TifferPelode gravatar image TifferPelode  ( 2018-05-14 09:20:03 -0500 )edit

It doesn't have to have exactly that name. But there should be a file that registers your plugin with the ROS plugin system. It's typically called plugin.xml and is referenced in your package's package.xml.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-14 10:32:07 -0500 )edit

Thanks, I'll try it later.

TifferPelode gravatar image TifferPelode  ( 2018-05-14 11:48:50 -0500 )edit

I had a similar error for a different problem, using the class_loader to make a MoveGroup capability. If anyone comes here searching: Make sure to modify not only the class files and the xml file, but also the CMakeLists.txt to generate the executable for the class you are trying to load.

fvd gravatar image fvd  ( 2018-09-04 19:31:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-14 21:22:04 -0500

TifferPelode gravatar image

I solved this problem by modifving plugin_description.xml

<library path="libtiffer_panel">
  <class name="Tiffer"
      Tiffer's simple panel.

Just modify the type to what you change in your code.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-05-14 02:41:35 -0500

Seen: 4,046 times

Last updated: May 14 '18