Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinhole for 2 monocular cameras IP #8

Open
rmunoz6323 opened this issue Feb 2, 2022 · 2 comments
Open

Pinhole for 2 monocular cameras IP #8

rmunoz6323 opened this issue Feb 2, 2022 · 2 comments

Comments

@rmunoz6323
Copy link

Hi, I need help to solve a issue with pinhole projection.
I am using image_projection package to create pinhole projection from two calibrated cameras, I do not know much about them, simply that they are monocular cameras IP.

I set up my own projection in this way:
1.- I calibrated the two monocular cameras IP.
2.- I developed a driver (from http://wiki.ros.org/video_stream_opencv) to launch the two cameras.
3.- The calibration files (.yaml) were loaded by the driver, and it seems to work correctly. One example of calibration file is below:
image_width: 1280
image_height: 720
camera_name: cameraProbot_front
camera_matrix:
rows: 3
cols: 3
data: [783.72954, 0. , 616.94934,
0. , 776.53814, 418.06712,
0. , 0. , 1. ]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.430972, 0.308801, -0.011165, -0.000338, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [1., 0., 0.,
0., 1., 0.,
0., 0., 1.]
projection_matrix:
rows: 3
cols: 4
data: [711.72192, 0. , 619.78121, 0. ,
0. , 719.64154, 414.22166, 0. ,
0. , 0. , 1. , 0. ]

First question I have. If the cameras were fisheye, Would they need to be calibrated with Kalibr?
Another doubt for me is about xacro files: now, I am using a generic template (macro) to describe my robot and I am not sure if the template selection to create .xacro could depend on the cameras model used. Would it be a error source for pinhole?

I updated topics and adapted my projections.launch. Also, I was modifying projections parameters in projections.yaml (basically “horizontal_fov” and “focal_length”) and when run projections.launch none errors appear but pinhole is shown incorrectly.

Can anybody give me any suggestion for this issue? If anybody needs further information, please let me know.

Thanks in advance.
Raúl

@Martin-Oehler
Copy link
Member

Hello Raúl,

First question I have. If the cameras were fisheye, Would they need to be calibrated with Kalibr?

Yes, the standard calibration packages of ROS only support pinhole. You could use other tools that implement the same projection models as Kalibr though.

Another doubt for me is about xacro files: now, I am using a generic template (macro) to describe my robot and I am not sure if the template selection to create .xacro could depend on the cameras model used. Would it be a error source for pinhole?

I do not understand your question. Your robot description (or more specifically your TF tree) needs to contain the optical frames of your cameras. The camera type or any camera parameters are not part of the URDF and would only be of concern for simulation purposes.

I updated topics and adapted my projections.launch. Also, I was modifying projections parameters in projections.yaml (basically “horizontal_fov” and “focal_length”) and when run projections.launch none errors appear but pinhole is shown incorrectly.

What does "incorrectly" mean? Can you share your camera setup (e.g. image of tf tree in rviz), projections.yaml and the result image?

Best regards,
Martin

@paridisankar
Copy link

[Martin-Oehler]
could you please share the code for the Boston Dynamics Spot 5 pinhole cameras image projection it will help for me to configure the pinhole camera thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants