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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ogre2: Set custom projection matrix for other types of cameras #1002

Merged
merged 8 commits into from
May 29, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented May 14, 2024

馃 Bug fix

Related issues: #968, gazebosim/gz-sensors#363

Related PR: gazebosim/gz-sensors#432

Summary

The SetProjectionMatrix function call currently works correctly only for the Ogre2Camera class but not other types of cameras. It just ends up calling the base camera's SetProjectionMatrix without actually making ogre API calls to actually set the projection matrix. To make it work, we would need to override the BaseCamera::SetProjectionMatrix in the derived ogre2 classes. This breaks API so the workaround is to handle setting the custom projection matrix in the PreRender.

Added a test that verifies when the SetProjectionMatrix function is called, the depth image also changed.

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

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

test/integration/depth_camera.cc Outdated Show resolved Hide resolved
ogre2/src/Ogre2ThermalCamera.cc Outdated Show resolved Hide resolved
ogre2/src/Ogre2ThermalCamera.cc Show resolved Hide resolved
ogre2/src/Ogre2SegmentationCamera.cc Show resolved Hide resolved
ogre2/src/Ogre2DepthCamera.cc Show resolved Hide resolved
ogre2/src/Ogre2BoundingBoxCamera.cc Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
This reverts commit 7fbcb1c.

Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested a review from ahcorde May 15, 2024 00:44
@iche033 iche033 merged commit f3d3073 into gz-rendering8 May 29, 2024
7 of 8 checks passed
@iche033 iche033 deleted the proj_matrix branch May 29, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃幍 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants