Rqt plugin C++ undefined symbol
Hi everyone, i'm having trouble in making my own rqt plugin in c++. I want to write a plugin that subscribes to /odom topic. With the odometry data, i want to draw the trajectory of the robot with Qwt. I made the code, did the catkin_make and everything worked fine. Nevertheless when I open rqt and try to launch the plugin, i get the following error :
[ERROR] [1459848732.059769566]: Failed to load nodelet [odom_plugin/OdomPlugin_1] of type [odom_plugin/OdomPlugin]: Failed to load library /local/etienne/ros/catkin_ws/devel/lib//libodom_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /local/etienne/ros/catkin_ws/devel/lib//libodom_plugin.so: undefined symbol: _ZTVN11odom_plugin10OdomPluginE)
RosPluginlibPluginProvider::load_explicit_type(odom_plugin/OdomPlugin) failed creating instance PluginManager._load_plugin() could not load plugin "odom_plugin/OdomPlugin": RosPluginlibPluginProvider.load() could not load plugin "odom_plugin/OdomPlugin"
I know this is exactly the same error, of very similar to this topic : http://answers.ros.org/question/20636... But i didn't understand how the man solved his problem.
I only have a header and source file, i give you links of the file just above :
header : http://textuploader.com/5wo0z
source : http://textuploader.com/5wo0w
plugin.xml : http://textuploader.com/5wo03
package.xml : http://textuploader.com/5wok5
CMakeLists.txt : http://textuploader.com/5wok0
I really don't know here to look, so if someone could point me on my error or give me a track it would be really nice. Thank you in advance!
Suggestions: put the project on github so it is easy to download. You could fork https://github.com/lucasw/rqt_mypkg/t... and adapt your code into it. Or avoid C++ rqt entirely, draw the path and publish it as an Image and view it in rqt_image_view.
This is still experimental, but it may be a viable alternative to building your own plugin: https://github.com/ros-visualization/...
Git repository for the project : https://github.com/etienne1234/odom_p...@lucasw i'm gonna try to rebuild with your template, your other option of publishing it might be interesting, but i'm gonna have to do others RQT c++ plugin so ... @ahendrix I kinda need RQT because of existing plugins
i'll tell you how it goes, i'm re-working on this subject today
@etienne1234: the package I linked to is an experimental RQT plugin which plots two different topics on the X and Y axes, much like what you're describing. Still RQT, still allows you to use the other existing RQT plugins.