How to control camera distance using librviz in custom qt gui

asked 2018-06-27 18:05:36 -0500

dlc gravatar image

updated 2018-06-27 19:12:38 -0500

jayess gravatar image

I followed the librviz tutorial to display a pointcould on custom GUI. I can change views using below command

QString class_id = "rviz/TopDownOrtho" ;


QString class_id = "rviz/XYOrbit"; 


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?


edit retag flag offensive close merge delete


Can you please update your question with a link to the tutorial that you're referring to

jayess gravatar image jayess  ( 2018-06-27 19:13:04 -0500 )edit

I modified the code below and followed Lucas's post below But I want to change the view by clicking button (90 degrees, 180 degrees)

dlc gravatar image dlc  ( 2018-06-28 10:01:12 -0500 )edit

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!

dlc gravatar image dlc  ( 2018-06-29 12:16:18 -0500 )edit