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

Missing documentation for what concerns camera sensors frame #425

Open
Nicogene opened this issue Dec 1, 2020 · 5 comments
Open

Missing documentation for what concerns camera sensors frame #425

Nicogene opened this issue Dec 1, 2020 · 5 comments
Assignees

Comments

@Nicogene
Copy link

Nicogene commented Dec 1, 2020

I was unable to find information about the default direction of the optical axis of a generic camera sensor.

Without explicit information, I was assuming:

  • z-axis goes along the optical axis (pointing outward)
  • x-axis points rightward (wrt to the sensor's image plane)
  • y-axis points downward.

(See here for reference)

But looking at a simple example like this one, in absence of any <pose> specification, the optical axis seems to be along x, since for Gazebo Z is up and X is in front then the camera plane is defined by YZ instead of XY as I was assuming.

Can you confirm that?

For the users, it would be ideal if the documentation could specify the documentation should specify on which axis the optical axis is oriented, and which axes define the image plane.

Related downstream issue: robotology/icub-models#69

cc @traversaro

@traversaro
Copy link
Contributor

An additional point that could be confusing for users is the following. It seems that indeed the optical axis in Gazebo is assumed to be aligned with the X direction of the frame defined by the composition of the sensor element <pose>'s and the camera element pose, meaning that the image plane is the YZ plane. However, the elements under the lens element seem to refer to the XY as the camera plane, see the fx, fy, cx and cy in http://sdformat.org/spec?ver=1.7&elem=sensor#lens_intrinsics .

@traversaro
Copy link
Contributor

Interestingly, the convention currently assumed in Gazebo for SDF's Camera frame seems to be not compatible with the Drake one (see https://drake.mit.edu/doxygen_cxx/classdrake_1_1systems_1_1sensors_1_1_camera_info.html), for which instead the Z-axis is indeed the viewing direction. fyi @EricCousineau-TRI

@EricCousineau-TRI
Copy link
Collaborator

EricCousineau-TRI commented Dec 3, 2020

Per f2f, @azeey can look into this, and potentially document the conventions used for the sensor frame: axes, computer vision vs. (right-handed) computer graphics, and possibly with a suggested rpy offset to align w/ another convention.

@traversaro
Copy link
Contributor

Thanks a lot @EricCousineau-TRI and @azeey !

@traversaro
Copy link
Contributor

traversaro commented Dec 3, 2020

and possibly with a suggested rpy offset to align w/ another convention.

That is indeed the strategy we used ourself in robotology/icub-models#69 . We used the sensor pose to reflect the OpenCV/REP-103-style frame, and then we used the camera pose to convert it to the SDF/Gazebo convention.

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

4 participants