Best way to externally control RViz Views and Gazebo camera

asked 2021-03-29 11:53:51 -0500

jorge gravatar image

updated 2021-03-29 21:09:26 -0500

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 rviz_animated_view_controller for RViz and somehow get the pose and set Gazebo camera pose by publishing on /gazebo/default/user_camera/joy_pose,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?


edit retag flag offensive close merge delete


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.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-29 12:25:48 -0500 )edit

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?

jorge gravatar image jorge  ( 2021-03-29 21:11:49 -0500 )edit

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?

gvdhoorn gravatar image gvdhoorn  ( 2021-03-30 09:55:16 -0500 )edit

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

jorge gravatar image jorge  ( 2021-04-01 03:34:21 -0500 )edit