Skip to content

Expose camera intrinsic matrix API#700

Merged
adityapande-1995 merged 7 commits intomainfrom
deepanshu/optical-center
Sep 7, 2022
Merged

Expose camera intrinsic matrix API#700
adityapande-1995 merged 7 commits intomainfrom
deepanshu/optical-center

Conversation

@deepanshubansal01
Copy link
Contributor

@deepanshubansal01 deepanshubansal01 commented Aug 8, 2022

Signed-off-by: deepanshu deepanshubansal01@gmail.com

🦟 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

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

Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
@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:)

Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
@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 !

Signed-off-by: Aditya <aditya050995@gmail.com>
Signed-off-by: Aditya <aditya050995@gmail.com>
@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
This reverts commit 581aaab.

Signed-off-by: Aditya <aditya050995@gmail.com>
adityapande-1995 added a commit that referenced this pull request Nov 3, 2022
* Added free function to get camera intrinsics
Signed-off-by: Aditya <aditya050995@gmail.com>
adityapande-1995 added a commit that referenced this pull request Nov 8, 2022
This reverts commit 581aaab.
Signed-off-by: Aditya <aditya050995@gmail.com>
ahcorde pushed a commit that referenced this pull request Sep 13, 2023
* Added free function to get camera intrinsics
Signed-off-by: Aditya <aditya050995@gmail.com>
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 <ahcorde@gmail.com>

---------

Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Aditya Pande <aditya050995@gmail.com>
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.

5 participants