Camera Extrinsic from YAML to TF messages

asked 2020-06-26 04:15:00 -0600

Viki93 gravatar image

updated 2022-05-23 09:24:53 -0600

lucasw gravatar image

How to publish Camera extrinsic parameters stored in a yaml file using "tf" of ROS. I need to read the extrinsic parameter of Camera from its yaml file and publish it as "tf " messages.

I have gone through the ROS Documentation, therefore, I request some specific reply to help me arrive at the final goal

Thank you in advance.!

edit retag flag offensive close merge delete

Comments

1

This should come down to reading the relevant parts of your extrinsic calibration file, converting that into a TF message and broadcasting that. You'll likely want to use a StaticBroadcaster, as this calibration will most likely only change very infrequently (if at all).

I have gone through the ROS Documentation, therefore, I request some specific reply to help me arrive at the final goal

Right now your questions comes across as: please do the work for me.

That's not how ROS Answers works.

If you have questions about specific sub problems, ask those.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-26 04:25:25 -0600 )edit

@gvdhoorn
1. I will make my doubts more detailed - I have the Rotation matrix, Projection/Camera Matrix in YAML file. I have the knowledge to publish the Camera Intrinsic in "camera_info". But the Projection mat./Camera Matrix ideally contains the translation, Rotation. Firstly, I would like to know if my understanding on relating this Projection Matrix with TF is correct . -- Please correct me if I am wrong: Translations in Proj. matrix --> x, y, z in TF Rotation matrix --> x, y, z, w in rotation- TF. If the above is correct, I need help to understand how to convert that into a TF message. I have see the information regarding the broadcast using TF.

Viki93 gravatar image Viki93  ( 2020-06-26 04:42:11 -0600 )edit

@gvdhoorn 2. I did not ask anyone to do the work for me nor was my statement implying that. Incase have you been offended by my poor english skills, it was not meant that way. Afterall it was a doubt and not a work I was trying to get support for. I request your right understanding over the queries and not to take queries personally as I hope thats how ROS Answers works.

Viki93 gravatar image Viki93  ( 2020-06-26 04:45:41 -0600 )edit

3. I would like to stick to my query and not deviate in any other direction. I request the community again for some support. Thanks in advance.

Viki93 gravatar image Viki93  ( 2020-06-26 04:47:37 -0600 )edit

@gvdhoorn 1. I will make my doubts more detailed - I have the Rotation matrix, Projection/Camera Matrix in YAML file. I have the knowledge to publish the Camera Intrinsic in "camera_info".

But the yaml file contains Rotation/rectification Mat.containing the Rotation component of Extrinsic. Firstly, I would like to know if my understanding on relating this Rotation/rectification Matrix with TF is correct . -- Please correct me if I am wrong: Rotation matrix --> x, y, z, w in rotation- TF. Need info on how the translationa vector is defined in Yaml/ obtained from elsewhere. If the above is correct, I need help to understand how to convert that into a TF message. I have see the information regarding the broadcast using TF.

Above comment, "1." is Wrong. Please do not consider that for any reference. Viki93 ( 26 mins ago )edit

Viki93 gravatar image Viki93  ( 2020-06-26 05:12:02 -0600 )edit