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

Calibrate Gazebo Camera

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

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

ngrennan gravatar image


I have a robot in a gazebo environment. This robot has a camera (I use the 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

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

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

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

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


This may be useful for anyone doing camera calibration in Gazebo ROS2

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

Question Tools


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

Seen: 5,840 times

Last updated: Mar 02 '12