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

Expose camera intrinsic matrix API #700

Merged
merged 7 commits into from
Sep 7, 2022
Merged

Conversation

deepanshubansal01
Copy link
Contributor

@deepanshubansal01 deepanshubansal01 commented Aug 8, 2022

Signed-off-by: deepanshu [email protected]

🦟 Bug fix

Fixes gazebosim/gz-sim#705

Summary

This PR solves the camera intrinsics not being reflected properly in /camera_info topic when the <intrinsics> tag is not provided. The PR exposes the CameraIntrinsicMatrix() which can be used by downstream packages gz-sensors to update the DOM object and also the /camera_info topic with correct intrinsics.

Depends on

gazebosim/gz-sensors#256

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #700 (c70882b) into main (1694f3f) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #700      +/-   ##
==========================================
+ Coverage   74.16%   74.18%   +0.01%     
==========================================
  Files         159      159              
  Lines       14370    14381      +11     
==========================================
+ Hits        10657    10668      +11     
  Misses       3713     3713              
Impacted Files Coverage Δ
include/gz/rendering/Camera.hh 100.00% <ø> (ø)
include/gz/rendering/base/BaseCamera.hh 67.60% <100.00%> (+1.06%) ⬆️
ogre2/src/Ogre2Camera.cc 86.54% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@adityapande-1995 adityapande-1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some tests for this one ?

@deepanshubansal01
Copy link
Contributor Author

deepanshubansal01 commented Aug 8, 2022

Could you add some tests for this one ?

yes working on them:)

include/gz/rendering/Camera.hh Outdated Show resolved Hide resolved
include/gz/rendering/Camera.hh Outdated Show resolved Hide resolved
ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh Outdated Show resolved Hide resolved
test/common_test/Camera_TEST.cc Outdated Show resolved Hide resolved
test/common_test/Camera_TEST.cc Outdated Show resolved Hide resolved
test/common_test/Camera_TEST.cc Show resolved Hide resolved
include/gz/rendering/base/BaseCamera.hh Outdated Show resolved Hide resolved
@adityapande-1995 adityapande-1995 self-requested a review August 17, 2022 20:14
@adityapande-1995
Copy link
Contributor

Looks good to me overall, with the math simplified and the calculation documented !

@adityapande-1995 adityapande-1995 merged commit 581aaab into main Sep 7, 2022
@adityapande-1995 adityapande-1995 deleted the deepanshu/optical-center branch September 7, 2022 15:35
@adityapande-1995
Copy link
Contributor

This is to be reverted in favour of #755

adityapande-1995 added a commit that referenced this pull request Nov 2, 2022
adityapande-1995 added a commit that referenced this pull request Nov 2, 2022
adityapande-1995 added a commit that referenced this pull request Nov 3, 2022
* Added free function to get camera intrinsics
Signed-off-by: Aditya <[email protected]>
adityapande-1995 added a commit that referenced this pull request Nov 8, 2022
ahcorde pushed a commit that referenced this pull request Sep 13, 2023
* Added free function to get camera intrinsics
Signed-off-by: Aditya <[email protected]>
iche033 pushed a commit that referenced this pull request Sep 22, 2023
* Calculate camera intrinsics : Refactor #700 (#755)


Signed-off-by: Alejandro Hernández Cordero <[email protected]>

---------

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Co-authored-by: Aditya Pande <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants