How to control camera distance using librviz in custom qt gui
I followed the librviz tutorial to display a pointcould on custom GUI. I can change views using below command
QString class_id = "rviz/TopDownOrtho" ;
or
QString class_id = "rviz/XYOrbit";
manager_->getViewManager()->setCurrentViewControllerType(class_id);
But I don't know how to change the value of clip distance, yaw or pitch in the codes (I plan to use buttons to rotate the pointcloud). Can anyone give me a hint?
Thanks!
Can you please update your question with a link to the tutorial that you're referring to
I modified the code below https://github.com/ros-visualization/... and followed Lucas's post below https://github.com/ros-visualization/... But I want to change the view by clicking button (90 degrees, 180 degrees)
If I use vc_ = manager_->getViewManager()->getCurrent();
I get ViewController vc_ and I can change the view use vc_->lookAt(0, 0, 0) But I don't know how to get OrbitViewController or XYOrbitViewController Can any one give me a hint? Thanks!