ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

MultiLibraryClassLoader Error

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

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

Comments

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

gvdhoorn gravatar image gvdhoorn  ( 2018-05-14 05:33:18 -0600 )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 -0600 )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 -0600 )edit

Thanks, I'll try it later.

TifferPelode gravatar image TifferPelode  ( 2018-05-14 11:48:50 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

TifferPelode gravatar image

I solved this problem by modifving plugin_description.xml

<library path="libtiffer_panel">
  <class name="Tiffer"
         type="Tiffer::TifferPanel"
         base_class_type="rviz::Panel">
    <description>
      Tiffer's simple panel.
    </description>
  </class>
</library>

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

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

1 follower

Stats

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

Seen: 3,052 times

Last updated: May 14 '18