Ask Your Question

How can I move/zoom the camera in RVIZ?

asked 2020-04-01 07:44:13 -0500

Lennart gravatar image

Hi, I'm using Ubuntu 16.04 and ROS Kinetic. I'm trying to make an AR-Application. For that Issue I want to get a picture stream out of RVIZ.

I tried the camera-Display from RVIZ. to get an Image from an UR10-Robot, which I could modify. I only get an very small image of the scene.

How can I move and zoom the camera picture?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-04-02 09:27:11 -0500

gvdhoorn gravatar image

updated 2020-04-02 09:38:29 -0500

If you really want to use RViz plugins for this (as I'm not entirely sure it's supposed to be used like this), I'd recommend:

  • to render arbitrary points of view: use lucasw/rviz_camera_stream: it's an RViz plugin, so you can just add it to your RViz configuration
  • to control the camera (focus, zoom level, fov): look at AIS-Bonn/rviz_cinematographer. From the documentation: An rqt plugin to create and edit trajectories for the rviz camera and record its views in a video.

And a comment:

I'm trying to make an AR-Application.

I'd take a look at how previous implementations, such as ros-visualization/oculus_rviz_plugins (forks are more up-to-date), AndreGilerson/rviz_vive, ROSIN FTP: rvis2ar, IntelligentRoboticsLabs/ARViz and others have approached this.

Or perhaps even reuse some of them.

For an AR application it may be more efficient to directly alter the way RViz renders the scene.

It's based on OGRE, so anything is possible.

edit flag offensive delete link more


I allready found rviz_camera_stream and I thinks it's good. I will look at your other suggestions. I hope they will be helpful.

Lennart gravatar image Lennart  ( 2020-04-03 08:48:04 -0500 )edit

I'm using rviz_camera_stream now. I can move and zoom when I move the tf-frame of the camera. And After I started the demo-file I can start the camera in other rviz-windows als well. Thanks for the answer.

P.S. It's important for me to get quick a solution, so OGRE would have been to much work.

Lennart gravatar image Lennart  ( 2020-04-17 05:33:20 -0500 )edit

answered 2020-04-01 17:25:31 -0500

LukeBowersox gravatar image

Maybe try rosrun image_view image_view It can be configured a bit more.

edit flag offensive delete link more


Thank you for the Answer. As I see it image_view works with existing image topics. How can I get a Image (.png) from an rviz/ moveit simulation. Prefered in a way I can modify the point of view and the zoom.

I found rviz_camera_stream to get a image-topic out of rviz. But I don't know how to start it in an existing rviz-window. I can only open the demo.launch file. (

Lennart gravatar image Lennart  ( 2020-04-02 05:33:03 -0500 )edit

Hmm, I think gazebo might be better then rviz in this case.... But in general look at modifying whatever settings you have available to simulate your camera regardless of the simulation platform. Specifically I would look for (or create my own way) of dynamically updating the zoom parameters for camera configuration. If you cant find a way do that then dig through that code you linked and start getting creative!

LukeBowersox gravatar image LukeBowersox  ( 2020-04-02 09:22:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-01 07:44:13 -0500

Seen: 343 times

Last updated: Apr 02 '20