rqt: Could not find library corresponding to plugin
Hello everyone ! I have been trying to make a simple GUI for my ros application using rqt. I am comfortable with Qt C++ but not really with ROS "advanced tools" (configurations, plugins, packages, etc...)
I tried to do the tutorial to build a simple "rqt_mypkg" in C++ and it works. Now I am trying to adapt this code to simply load a empty QWidget that I could modify later but so far I am always getting the same error:
[ERROR] [1477645407.408326805]: Failed to load nodelet [rescuerproject/MyWindow1] of type [rescuerproject/MyWindow]: Could not find library corresponding to plugin rescuerproject/MyWindow. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
I checked mutiple times all of my files comparing to this example: rqtexamplecpp
There is definitely something I am not understanding... Probably related to "the way you name your plugin, and the name your class and package should have" I tried to make them all match like the example above but I am still getting the error.
Is using Python the only way to use rqt easily ?
Setup: Ubuntu 14, ROS indigo, Qt4 and Qt5 installed (Qt4 is default)
procedure used: catkin_make rqt --force-discover
This displays the recommended way of using rqt. Then when I click on my plugin's name I get the error mentionned above.
I am not using a *.ui file for my GUI, and I rather not to if possible.
The heading of my plugin.xml:
<class name="rescuer_project/MyWindow" type="rescuer_project::MyWindow" base_class_type="rqt_gui_cpp::Plugin">
Heading of my class:
namespace rescuer_project {
class MyWindow
: public rqt_gui_cpp::Plugin
class declaration stuf...
...}
My repository with all code.
Thank you for helping !
Asked by axilos22 on 2016-10-28 04:24:28 UTC
Answers
Solved my own problem with 2 simple yet not explained corrections:
It seems that rqt use a default formatting for library placement, I had to correct the plugin.xml file to match the format:
<library path="lib/lib{NAME_OF_PKG}">
Then I had to comment the
Q_OBJECT
In my *.cpp file. To prevent another error of << undefined symbol: _ZTVN[...]>> to happend. This post helped me a lot to track my errors.
Maybe a fresher version of the rqt tutorial for C++ would help. I would love to be able to design GUI easely for ROS!
Asked by axilos22 on 2016-10-30 18:00:59 UTC
Comments
If anyone has an idea why is "Q_OBJECT" generating this undefined symbol error I would be very grateful.
Asked by axilos22 on 2016-11-03 13:31:30 UTC
Comments