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

gazebo :camera focal length in mm

asked 2020-10-02 12:14:29 -0500

leogeo gravatar image

i want to specify the focal length camera value in mm or pixel dimensions, in my urdf file gazebo ros

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-04 05:29:12 -0500

Weasfas gravatar image

Hi @eogeo,

If you look at the SDF format in the sensor tag, inside camera tag, there is a section for camera intrinsics in which you can define, among other things:

  1. fx: X focal length (in pixels, overrides horizontal_fov).
  2. fy: Y focal length (in pixels, overrides horizontal_fov).
  3. cx: X principal point (in pixels).
  4. cy: Y principal point (in pixels).
  5. s: XY axis skew.

Hope this helps you.

Regards.

edit flag offensive delete link more

Comments

hello @Weasfas, thank you for your reply. yeah i see . I have already get all this information by configuration in urdf file or by camera calibration. my request is the values in mm ( focal_length, sensor dimensions ). regards

leogeo gravatar image leogeo  ( 2020-10-05 04:41:36 -0500 )edit

@leogeo Well in your answer you stated literally "focal length camera value in mm or pixel dimensions". As I undestand with your post is that you wanted to know how to set up those parameters in the URDF; If that is what you want, you will need to convert those values from mm to pixel and use the parameters I mentioned in my answer. However, If you want to know how to compute the focal_length from what you have in mm to what you need in px, that, indeed, is completely different question. Since It seems that is this last option I would say that you cand find plenty of information about this topic over the internet, like here, butI will say, this is something that not related to ROS.

Weasfas gravatar image Weasfas  ( 2020-10-05 09:01:28 -0500 )edit

thank you so much, yeah exactly that'is what i'am looking for. how to set up focal length value in mm in the URDF or number of pixel in mm.

leogeo gravatar image leogeo  ( 2020-10-05 09:45:47 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-10-02 12:14:29 -0500

Seen: 1,692 times

Last updated: Oct 04 '20