Gazebo camera distrortion
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
Asked by Andrea on 2015-05-12 07:49:24 UTC
Answers
The tutorial you are using is specifically for Gazebo 5+. There is no support for this feature (yet) in Gazebo 2.2.
Asked by crzx5 on 2015-05-12 09:48:46 UTC
Comments
Correct, camera distortion is only available in gazebo5 and above. This feature will not be backported to gazebo2.
Asked by nkoenig on 2015-05-12 09:56:25 UTC
It is possible to use gazebo5 with ROS
Asked by nkoenig on 2015-05-12 10:03:17 UTC
Thanks, I will update gazebo.
Asked by Andrea on 2015-05-12 10:05:41 UTC
Hello, I upgraded gazebo to the 5.x version. It still displays the error. It should now support distorted cameras, shouldn't it?
Asked by Andrea on 2015-05-18 05:03:02 UTC
Yes, Gazebo should be fine. However, the warning message is from ROS, which likely does not support distortion. I should have noticed that earlier.
Asked by nkoenig on 2015-05-18 18:02:06 UTC
Comments