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

asked 2021-10-08 00:58:55 -0600

ttttthomas gravatar image

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 I don't have enough point to do so.

edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by gvdhoorn
close date 2021-10-08 02:08:57.406643

Comments

Even though this is a ROS plugin for Gazebo, I feel that you are asking about a specific behaviour of Gazebo you've observed. That would make this a question about Gazebo, which should be asked over at answers.gazebosim.org.

If/when you post there, please post a comment here with a link to your new question, so we keep things connected.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-08 02:10:06 -0600 )edit

thanks, yeah after I posted the question here and move on searching for a possible answer, I found someone asked gazebo question here and got moved to gazebosim.org. So I have already created the same post there. Then link is here https://answers.gazebosim.org/questio...

ttttthomas gravatar image ttttthomas  ( 2021-10-08 02:14:56 -0600 )edit