ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Calibrate Gazebo Camera

asked 2012-03-02 03:34:56 -0600

updated 2014-04-20 14:09:43 -0600

ngrennan gravatar image

Hi!

I have a robot in a gazebo environment. This robot has a camera (I use the libgazebo_ros_prosilica.so controller).

I have to use ar_pose to get the robot position in gazebo world through camera acquisition. But I have a big problem: how can I calibrate that camera? There is some ar_pose internal tools or I have to search for more esoteric solutions?

Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-03-02 04:01:52 -0600

hsu gravatar image

Intrinsic calibration is not really required in gazebo since we do not inject any distortion to the image. You can see how the projection matrix is setup in GazeboRosCamera::PublishCameraInfo().

Extrinsic calibration is also not necessary as you should be able to access the exact pose of the camera sensor in simulation through either the ROS API or using tf.

But if you really wanted to run through the calibration procedure, you'll have to create a checkerboard in simulation and run through camera calibration, or you can see how the pr2 cameras are calibrated here.

Please let me know if any of the above is unclear.

edit flag offensive delete link more
1

answered 2012-03-02 03:49:22 -0600

You can set the intrinsic calibration parameters of your camera in the camera configuration xml belonging to your urdf model (see here for an example). The plugin also publishes a camera info topic, that should contain the intrinsic parameters.

The extrinsic parameters are generally known, because you select where the camera is mounted.

edit flag offensive delete link more

Comments

This may be useful for anyone doing camera calibration in Gazebo ROS2 https://medium.com/@arshad.mehmood/ca...

Arshad gravatar image Arshad  ( 2022-12-06 05:24:00 -0600 )edit

Question Tools

Stats

Asked: 2012-03-02 03:34:56 -0600

Seen: 6,036 times

Last updated: Mar 02 '12