Rosanswers logo

this is my package: https://github.com/azhar92/GUI-for-AV.git

When I open rqt and try to open the plugin from the drop-down menu using the following steps

cd ~/catkin_ws
source ~/catkin_ws/devel/setup.bash
rqt --force-discover

I can see the name of my package when in the rqt gui, but when i click it,

I get the following error in the terminal output:

[ERROR] [1482121854.496133919]: Failed to load nodelet [rqt_test1/MyPlugin_1] of type [rqt_test1/MyPlugin]: MultiLibraryClassLoader: Could not create object of class type rqt_test1::MyPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
RosPluginlibPluginProvider::load_explicit_type(rqt_test1/MyPlugin) failed creating instance
PluginManager._load_plugin() could not load plugin "rqt_test1/MyPlugin": RosPluginlibPluginProvider.load() could not load plugin "rqt_test1/MyPlugin"

i think it has to do with the registration of the plugin. any form of guidance will be helpful. Thank you.

Plugin.xml : https://github.com/azhar92/GUI-for-AV/blob/master/plugin.xml


<library path="lib/librqt_test1">

 <class name="rqt_test1/MyPlugin" type="rqt_test1::MyPlugin" base_class_type="rqt_gui_cpp::Plugin">


4 buttons to switch between 4 different modes.





    <statustip>Plugins related to visualization.</statustip>



 <statustip>4 buttons to switch between 4 different modes.</statustip>




Originally posted by Azhar on ROS Answers with karma: 100 on 2016-12-19

Post score: 0

Original comments

Comment by gvdhoorn on 2016-12-19:\

i think it has to do with the registration of the plugin

If you feel that is the case, then please include at least a snippet of code where you show how you implemented that bit.

This question will become worthless otherwise if/when your repository is removed/deleted/changed.

Comment by Azhar on 2016-12-19:
I have edit the question. let me know if there are any other things you need. Thank you!

i have not changed my repository!

Comment by gvdhoorn on 2016-12-19:
So where is the code where you actually register your plugin (or really: export it / make it known to class loader)? Please include that in your question.

Comment by AndyZe on 2016-12-19:
From a quick glance, I don't see anything to cause that error. But you can delete this from CMakeLists:

install(PROGRAMS scripts/${PROJECT_NAME}/gauge_script.py

Comment by Azhar on 2016-12-20:
@AndyZelenak, i tried it but it doesn't help. same error ;(


1 Answer 1


Rosanswers logo

Compare your main.cpp to my_plugin.cpp. You don't have this line at the bottom:

PLUGINLIB_DECLARE_CLASS(rqt_gauges, MyPlugin, rqt_gauges::MyPlugin, rqt_gui_cpp::Plugin)

And you're missing this function (which seems important):

void MyPlugin::initPlugin(qt_gui_cpp::PluginContext& context)

So go back and spend some time fixing those obvious issues. I think we would be more motivated to help if you upvoted good answers, too.

Originally posted by AndyZe with karma: 2331 on 2016-12-21

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.