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

Fix wide-angle lens flare occlusion lag #3325

Merged
merged 12 commits into from
May 25, 2023

Conversation

audrow
Copy link
Contributor

@audrow audrow commented May 17, 2023

Fixes #3310

This forces an update of the wide angle dummy camera, which updates the Ogre camera's view matrix.


One way to check that this fixes the bug, is to use this world file. Open it in Gazebo, and then move the only camera (wide_angle_cameras_occluded_higher) from it's starting height (z=21) to z=11, where it will have a wall between it and the light source. You can then move it back to z=21.

You should see lens flare when the light source is in the image and now lens flare when the light source is occluded.

scpeters and others added 2 commits March 30, 2023 16:56
This adds a model with wide-angle cameras updated at 1 Hz
that demonstrate the bug reported in gazebosim#3310 when moved
back and forth.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
@@ -305,6 +305,7 @@ namespace gazebo
ignition::math::Pose3d(
Conversions::ConvertIgn(cam->getDerivedPosition()),
Conversions::ConvertIgn(quat)));
this->dataPtr->wideAngleDummyCamera->OgreCamera()->getParentSceneNode()->_update(true, true);
Copy link
Contributor

@iche033 iche033 May 17, 2023

Choose a reason for hiding this comment

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

nit: wrap line to 80 chars

Copy link
Contributor Author

@audrow audrow May 17, 2023

Choose a reason for hiding this comment

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

Fixed in 1207519.

Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
@audrow audrow requested a review from iche033 May 17, 2023 23:04
@scpeters
Copy link
Member

this fixes it for me! I've been tinkering with how to add an integration test for it, but if I don't figure it out in my next time box, then I'll just skip it and approve this

scpeters added 5 commits May 18, 2023 23:37
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
The camera names aren't unique in this world,
so use the scoped name when getting sensors.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters changed the title Force update of wide angle dummy camera Fix wide-angle lens flare occlusion lag May 19, 2023
@scpeters
Copy link
Member

this fixes it for me! I've been tinkering with how to add an integration test for it, but if I don't figure it out in my next time box, then I'll just skip it and approve this

I've gotten a test working in branch scpeters/lens-flare-occlusion-lag. I opened a pull request targeting this PR in audrow#3, but it didn't start Jenkins jobs because it's targeting your fork. If the test looks ok, then please merge it into this PR with a merge commit and we can confirm that the tests pass in CI

audrow and others added 2 commits May 19, 2023 17:04
Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters
Copy link
Member

this fixes it for me! I've been tinkering with how to add an integration test for it, but if I don't figure it out in my next time box, then I'll just skip it and approve this

I've gotten a test working in branch scpeters/lens-flare-occlusion-lag. I opened a pull request targeting this PR in audrow#3, but it didn't start Jenkins jobs because it's targeting your fork. If the test looks ok, then please merge it into this PR with a merge commit and we can confirm that the tests pass in CI

the new test case passed on Ubuntu but failed in the homebrew build on mac-four.bigsur. I noticed all the GUI tests failed on that run as well, so there may be an issue with the CI machine. I just pushed an improvement to the image waiting logic in 29dbe5a that hopefully is more robust. The new CI build is also running on mac-four.bigsur, so we'll see if it helps

@scpeters
Copy link
Member

now with 29dbe5a it passed on homebrew but failed repeatedly on Ubuntu. I'll keep testing locally to see if I can reproduce the flakiness

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters
Copy link
Member

now with 29dbe5a it passed on homebrew but failed repeatedly on Ubuntu. I'll keep testing locally to see if I can reproduce the flakiness

I was able to reproduce the issue locally, and it appears in my local testing that --lockstep ( 032247e ) fixes the sensor timing and test flakiness

@scpeters
Copy link
Member

test passes in both CI runs; merging

@scpeters scpeters merged commit 7f49c14 into gazebosim:gazebo11 May 25, 2023
@audrow audrow deleted the audrow/fix-lens-flare-delay branch May 25, 2023 15:26
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

Successfully merging this pull request may close these issues.

Incorrect wide angle camera lens flare occlusion after camera movement
3 participants