Gazebo | Ignition | Community
Ask Your Question
0

Gazebo camera distrortion

asked 2015-05-12 07:49:24 -0600

Andrea gravatar image

Hello everybody, I am trying to distort a camera mounted on my quadrotor according to the parameters of the sensor I have. I am using Gazebo 2.2.3 along with ROS Indigo under Ubuntu 14.04. I have my sdf set up in the following way:

  <sensor name="base_link_camera_sensor" type="camera">
    <pose>0 0 0 0 1.570793 0</pose>
    <camera name="head">
      <!--horizontal_fov is 60 degrees (approx 1.05 rad)-->
      <horizontal_fov>1.047</horizontal_fov>
      <image>
        <!-- check the camera intrinsic parameters -->
        <width>320</width>
        <height>240</height>
        <format>L8</format>
      </image>
      <clip>
        <near>0.02</near>
        <far>300</far>
      </clip>
      <noise>
      <type>gaussian</type>
      <!-- Noise is sampled independently per pixel on each frame.
         That pixel's noise value is added to each of its color
         channels, which at that point lie in the range [0,1]. -->
      <mean>0.0</mean>
      <stddev>0.02</stddev>
      </noise>
    </camera>
    <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
      <robotNamespace>/vtol/camera</robotNamespace>
      <alwaysOn>true</alwaysOn>
      <updateRate>50.0</updateRate>
      <imageTopicName>image_raw</imageTopicName>
      <cameraInfoTopicName>camera_info</cameraInfoTopicName>
      <frameName>camera_link</frameName>
      <hackBaseline>0.07</hackBaseline>
      <distortionK1>-0.43172</distortionK1>
      <distortionK2> 0.17008</distortionK2>
      <distortionK3> 0.00000</distortionK3>
      <distortionT1> 0.00122</distortionT1>
      <distortionT2>-0.00030</distortionT2>
    </plugin>
  </sensor>

However, the image is not distorted and I get the following message

[ WARN] [1431434020.115191249]: gazeboroscamera_ simulation does not support non-zero distortion parameters right now, your simulation maybe wrong.

But according to this tutorial seem to be supported. Is there something wrong?

Thank you very much

Andrea

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-12 09:48:46 -0600

crzx5 gravatar image

The tutorial you are using is specifically for Gazebo 5+. There is no support for this feature (yet) in Gazebo 2.2.

edit flag offensive delete link more

Comments

Correct, camera distortion is only available in gazebo5 and above. This feature will not be backported to gazebo2.

nkoenig gravatar imagenkoenig ( 2015-05-12 09:56:25 -0600 )edit

It is possible to use [gazebo5 with ROS](http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install#Gazebo5inROS)

nkoenig gravatar imagenkoenig ( 2015-05-12 10:03:17 -0600 )edit

Thanks, I will update gazebo.

Andrea gravatar imageAndrea ( 2015-05-12 10:05:41 -0600 )edit

Hello, I upgraded gazebo to the 5.x version. It still displays the error. It should now support distorted cameras, shouldn't it?

Andrea gravatar imageAndrea ( 2015-05-18 05:03:02 -0600 )edit

Yes, Gazebo should be fine. However, the warning message is from ROS, which likely does not support distortion. I should have noticed that earlier.

nkoenig gravatar imagenkoenig ( 2015-05-18 18:02:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-12 07:49:24 -0600

Seen: 1,772 times

Last updated: May 12 '15