VirtualRangeImage

From UWSim
Jump to: navigation, search

Virtual Range image sensors can be configured mostly as a virtualCamera, the main difference is the output will be a range image instead of a texture image. As happens with regular virtual cameras, virtual range images can be displayed in a widget pressing the key "c" in the main view of uwsim. Furthermore the RangeImageSensorToROSImage interface provides rosimage publishers. As every device virtual range image sensors can be added to any vehicle in the scene.

XML syntax

In order to add a virtual range image 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.
  • 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


Besides this tags virtualRangeImage sensors have an attribute underwaterParticles (true|false) that configures the underwater particles noise. By default this attribute is set to false as the noise generated by osgOcean is too high for range cameras (some noise may be added later).