Simulation Setup Tutorial 2: Virtual Camera Movement
This tutorial covers moving the virtual camera of the user interface. This is the virtual camera that looks at the 3D rendered part of the interface (middle of the screen), not the robot's real camera (that provides the view in the bottom left).
Virtual Camera Movement
To move the virtual camera, RViz must be in either the Move Camera or the Interact mode:
Virtual camera motions are:
rotate: left mouse click-and-drag
zoom: right mouse click-and-drag
pan: middle mouse click-and-drag
All camera movements are relative to a focal point which is shown as a yellow dot while the camera is being moved:
Rotating and zooming do not change the focal point. However, panning does. Since panning can be somewhat difficult, we generally try to start the simulation with the focal point in a good location (e.g. between the robot's arms) so that no panning will be necessary.
Also note that the camera focal point is relative to the base of the robot, so as the robot drives around, the focal point should move with it.
Using the Keyboard Assist
If right-clicks or middle-clicks are difficult, the on-screen keyboard can be used to turn left-clicks into either of those:
The Interact Mode
When RViz is in the Move Camera mode, clicking anywhere on the screen will result in camera movement. When the Interact mode is active, the RViz scene can be populated with "Interactive Markers" that offer their own interaction tools. Examples include the base and arms of the robot, point clouds, etc. Clicking on any of these will not result in camera movement.
In general, when in Interact mode, in order to move the camera, you must click on an empty region of space.
This click will not result in camera movement, as it was done on the arm of the robot:
This click will result in camera movement, as it was done in empty space (note that the "map" or "floor blueprint" count as empty for camera movement purposes):