Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Increasing horizontal_hov in gazebo will make the object looks very "far"

Hi everyone, I have a CSI camera sitting in front of my robot. It's resolution is 640x480 with 160 degree HOV. I wanted to use the same camera in gazebo environment so I got all the camera properties from the hardware and setup a csi camera in gazebo world. However, the object from this camera looked extremely far comparing to the real world scenario. I was then tuning the parameters and realized that if I decrease the horizontal_hov values, the object in the camera frame would look a lot closer but the horizontal field of view decreases accordingly. Below is my camera setting in gazebo. Am I missing some camera properties? Also, I got the distortion values from the real camera, but by adding those numbers in gazebo didn't show any barrel effect like I saw in the hardware camera.

  <gazebo reference="camera_csi_front">
<!-- <material>Gazebo/Green</material> -->
<sensor type="camera" name="csi_front">
    <pose>0 0 0 0 0 0</pose>
  <update_rate>60.0</update_rate>
  <camera name="front">
    <horizontal_fov>2.79253</horizontal_fov>  <!--160 degrees -->
    <image>
      <width>640</width>
      <height>480</height>
      <format>R8G8B8</format>
    </image>
    <clip>
      <near>0.02</near>
      <far>300</far>
    </clip>
  </camera>
  <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
    <alwaysOn>true</alwaysOn>
    <updateRate>0.0</updateRate>
    <cameraName>car/csi_front</cameraName>
    <imageTopicName>image_raw</imageTopicName>
    <cameraInfoTopicName>camera_info</cameraInfoTopicName>
    <frameName>camera_csi_front</frameName>
    <hackBaseline>0.07</hackBaseline>
    <distortionK1>-0.264598808</distortionK1>
    <distortionK2>0.0156281135</distortionK2>
    <distortionK3>0.0822019378</distortionK3>
    <distortionT1>0.0000652954</distortionT1>
    <distortionT2>0.0053984313</distortionT2>
  </plugin>
</sensor>
</gazebo>

Any help is appreciated! I was trying to upload the images but unfortunately seems like the website wasn't responding to my upload.image description