Robotics StackExchange | Archived questions

Best way to externally control RViz Views and Gazebo camera

I want to record a screen cast of both RViz and Gazebo views, changing the camera responding to FSM transitions. e.g. look from top-down when navigating, using fixed frame, and in first-person when manipulating. I don't want pre-recorded movements, just automatically follow the robot's frame or use fixed frame.

So far, the best option I have found is to use rvizanimatedview_controller for RViz and somehow get the pose and set Gazebo camera pose by publishing on /gazebo/default/usercamera/joypose,as explained here. That's the least appealing part, as I must repub a ROS topic as a protobuf topic.

Before starting the work,,, does anyone have a better idea, or alternative packages?

Thanks!

Asked by jorge on 2021-03-29 11:53:51 UTC

Comments

You seem to have a very specific setup/use-case in mind, while the question title seems to ask for generic functionality.

For the generic case: for Gazebo I wouldn't know, but for RViz: AIS-Bonn/rviz_cinematographer.

Hands-down the best.


Edit: from AIS-Bonn/rviz_cinematographer#5, it would appear visevi-robotics/robot_cinematics would allow similar control in Gazebo, but the repository is empty.

Asked by gvdhoorn on 2021-03-29 12:25:48 UTC

Thanks! I reworded the question; hope now is clearer!
rviz_cinematographer looks great, thanks a lot for the tip. But I don't want to prepare camera movements in advance, as I don't know what the robot will do! I want just to follow him from different angled depending on the current action (navigate, manipulate, etc.). Can cinematographer help here?

Asked by jorge on 2021-03-29 21:11:49 UTC

Perhaps visevi-robotics/robot_cinematics can do this, but you'd have to ask them to release the code. They promised to do that in their presentation, but so far nothing has been pushed to the repository.

I don't want pre-recorded movements, just automatically follow the robot's frame or use fixed frame.

isn't this what RViz does by default if you select the frame you want followed in the camera settings?

Asked by gvdhoorn on 2021-03-30 09:55:16 UTC

Yup, will do Yes, but I want to jump between different frames and poses, and camera modes

Asked by jorge on 2021-04-01 03:34:21 UTC

Answers