VirtualCamera
From UWSim
Revision as of 13:53, 11 January 2017 by Japerez (Talk | contribs) (Created page with "Virtual Cameras can be added in each vehicle present in the scene. This virtual cameras can be configured using a wide variety of parameters to simulate the different devi...")
Virtual Cameras can be added in each vehicle present in the scene. This virtual cameras can be configured using a wide variety of parameters to simulate the different devices available nowadays. What virtual cameras see can be displayed in a widget pressing the key "c" in the main view of uwsim. Furthermore the VirtualCameraToROSImage interface provides rosimage publishers.
XML syntax
In order to add a camera to the scene we need assign it a name and a frame in the vehicle. The rest of the parameters are recommended but default values are provided.
- name: This parameters sets the camera name that will identify it.
- relativeTo: The name of the vehicle's link where the camera is attached.
- resw: Width of the camera (pixels).
- resh: Height of the camera (pixels).
- position: Initial position of the camera with respect to the vehicle's link.
- orientation: Initial rotation of the camera with respect to the vehicle's link, stated in RPY.
- baseline: Used in stereo cameras.
- frameId: Name of the frame that will be published in the ROS interface.
- fovy: Field of view (y axis).
- parameters: This tag allows to directly set the intrinsic parameters of the camera in the form of this matrix where:
- fx: Focal length (x axis).
- fy: Focal length (y axis).
- x0: Image principal point (x axis).
- y0: Image principal point (y axis).
- f: far plane.
- n: near plane.
- k: Distortion related to skew between x and y axis.
2.0fx/w 2.0k/w 1-2x0/w 0 0 2.0fy/h 1-2y0/h 0 0 0 (f+n)/(n-f) 2fn/(n-f) 0 0 -1 0
- showpath: If set displays in the 3D view marks of the camera path.
- grayscale: Sets the camera to be grayScale.
- std: Standard deviation of the gaussian noise generated in the camera. More info here.