I'm writing a RQT plugin that includes some functionality of other plugins, as well as my own.
My plugin is in C++, because I'd like to add some rqt_rviz visualization. Mainly the OGRE window.
Along side the RViz visualization, I want to add some functionality of the rqt_bag plugin. I plan on branching this plugin and heavily modifying it.
I want to combine the two plugins in code and create my plugin. I'll call that rqt_curranw. The final product (assume rqt_bag will be much different) looks like the screenshot attached.
The issue is...rqt_bag is written in Python and rqt_rviz is written in C++. I can create two plugins and dock them next to each other, but I'd rather have my single plugin include all of the functionality I want. No extra steps. I can kind of get around this by using a perspective, but I don't see a way to include arguments to the plugins using perspectives.
So my question is, how can I include functionality from both plugins in my one plugin widget? In C++, I can use the pluginlib::ClassLoader to upload the rqt_rviz plugin, and use the functions associated with that class. However, I can't use it to load the rqt_bag plugin, since it's written in Python.
I've looked through rqt_gui for inspiration and it's a monster. I'm hoping to find some quick answers here before jumping down that rabbit hole.
Thoughts:
Is there a way to latch onto an existing QtApplication. For example, if the QtApplication is written in C++ can a simultaneous Python process access it and add widgets to it? Or vice-versa?
I assume there is a way to do this, since rqt_gui uploads both Python and C++ plugins, and is written in Python.
Is there a way to hack perspectives to use plugin arguments? Is this the right approach?
Am I barking up the wrong tree and over-complicating things?
Originally posted by curranw on ROS Answers with karma: 211 on 2016-03-30
Post score: 2
Original comments
Comment by 2ROS0 on 2016-08-15:
I'm looking to do something similar. Which path did you go down finally? Any suggestions based on your experience?