Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 255

Including both Python and C++ Plugins in a single RQT Plugin

$
0
0
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? ![image description](/upfiles/14593601712864751.png)

Viewing all articles
Browse latest Browse all 255

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>