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

rqt: Could not find library corresponding to plugin

asked 2016-10-28 04:24:28 -0500

axilos22 gravatar image

updated 2016-10-30 18:03:26 -0500

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 [rescuer_project/MyWindow_1] of type [rescuer_project/MyWindow]: Could not find library corresponding to plugin rescuer_project/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: rqt_example_cpp

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 !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-30 18:00:59 -0500

axilos22 gravatar image

updated 2016-10-30 18:03:16 -0500

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!

edit flag offensive delete link more

Comments

If anyone has an idea why is "Q_OBJECT" generating this undefined symbol error I would be very grateful.

axilos22 gravatar image axilos22  ( 2016-11-03 13:31:30 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-28 04:24:28 -0500

Seen: 2,545 times

Last updated: Oct 30 '16