Closed lucasw closed 7 years ago
The solution is to use view manager setCurrentViewControllerType
manager_ = new rviz::VisualizationManager( render_panel_ );
render_panel_->initialize( manager_->getSceneManager(), manager_ );
manager_->initialize();
manager_->startUpdate();
QString class_id = "rviz/Orbit";
manager_->getViewManager()->setCurrentViewControllerType(class_id);
Glad to see you figured it out, and thanks for documenting what you did!
I've modified myviz.cpp here https://github.com/lucasw/visualization_tutorials/tree/set-view-controller-test and using a custom view controller appears to work as far as rendering the grid from a default location, but the mouse is unable to rotate or translate the view.
Is there something else I need to do to hook up the mouse? Is it still owned by the old default view controller somehow?
Also on answers: http://answers.ros.org/question/256100/rviz-setviewcontroller-doesnt-hook-up-mouse-events