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

Revision history [back]

click to hide/show revision 1
initial version

Okay, I just accidentally found out how to get it while searching for a way to get the ViewController.
You get it as follows:

Your class should have a DisplayContext property called context_*.
Through this property we can access the ViewManager by calling context_->getViewManager() that can give us a reference to the RenderPanel by calling getRenderPanel().

So in short to grab the RenderPanel you simply call:

rviz::RenderPanel* panel = context_->getViewManager()->getRenderPanel();