Embed rqt plugins inside another rqt plugin

asked 2016-09-16 13:36:49 -0500

Mani gravatar image

updated 2016-09-16 13:47:44 -0500

My goal is to use rqt_image_view plugin (which is written in C++) inside my own custom rqt plugin (also in C++). Unfortunately using an rqt perspective is not an option for my application. Things I've tried:

  • I've skimmed through the rqt code base, mainly rqt_gui_cpp and qt_gui_cpp. I could not figure out how the whole system is laid out (i.e. how rqt internally works). Is there any design documents regarding this?
  • I've also tried to use pluginlib::ClassLoader to load rqt_image_view, but it fails. The code sample is here.

It fails with the following error:

Error: According to the loaded plugin descriptions the class rqt_gui_cpp/Plugin with base class type Plugin does not exist. Declared types are 

I might be using pluginlib in a wrong way with rqt plugins. I also think I might need to use the helper functions in qt_gui_cpp to load the plugin. Any help/suggestion is really appreciated.

edit retag flag offensive close merge delete


rqt_image_view probably has some kind of top-level QT widget type; can you use that widget directly?

ahendrix gravatar image ahendrix  ( 2016-09-16 13:45:12 -0500 )edit

@ahendrix I probably can move the code over and embed it directly in my plugin. I am trying to avoid code duplication. Also, I could not find any resource on ROS wiki/support/github regarding this. I think it will be a helpful feature if there is a way to do it.

Mani gravatar image Mani  ( 2016-09-16 13:49:13 -0500 )edit

Have you found any solution for this problem, @ahendrix?

adrianohrl gravatar image adrianohrl  ( 2017-10-26 16:20:26 -0500 )edit

@Mani@ahendrix Please post if you have a solution regarding combine plugin with rqt_image_view.

Gabbar gravatar image Gabbar  ( 2019-02-20 23:23:18 -0500 )edit

I do not have a solution for this.

ahendrix gravatar image ahendrix  ( 2019-02-20 23:33:58 -0500 )edit