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 camera lens flare example and test worlds #2633

Closed
wants to merge 5 commits into from

Conversation

j-rivero
Copy link
Contributor

🦟 Bug fix

Summary

When running the lens flare example the output display a cryptic error saying:

❯ gz sim -v4 -- camera_lens_flare.sdf 
(2024-09-18 12:12:46.989) [info] Gazebo Sim GUI    v9.0.0~pre1
...
(2024-09-18 12:12:49.381) [debug] Create scene [scene]
(2024-09-18 12:12:49.420) [debug] Rendering Thread initialized
(2024-09-18 12:12:49.420) [debug] Initialization needed
(2024-09-18 12:12:49.427) [debug] Camera images for [camera_model_normal::body::camera_normal] advertised on [camera_normal]
(2024-09-18 12:12:49.427) [debug] Camera info for [camera_model_normal::body::camera_normal] advertised on [/camera_info]
(2024-09-18 12:12:49.427) [warning] Ogre2Camera::SetVisibilityMask: Mask bits c0000000 are set but will be ignored as they conflict with the reserved bits used internally by the ogre2 backend.
(2024-09-18 12:12:49.427) [debug] Camera images for [camera_model_lens_flare::body::camera_lens_flare] advertised on [camera_lens_flare]
(2024-09-18 12:12:49.427) [debug] Camera info for [camera_model_lens_flare::body::camera_lens_flare] advertised on [/camera_info]
(2024-09-18 12:12:49.427) [warning] Ogre2Camera::SetVisibilityMask: Mask bits c0000000 are set but will be ignored as they conflict with the reserved bits used internally by the ogre2 backend.
(2024-09-18 12:12:49.429) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.429) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.430) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.430) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.431) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.433) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.434) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.435) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.436) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.437) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.438) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
(2024-09-18 12:12:49.439) [error] Unable to find sensor: lights::camera_model_lens_flare::body::camera_lens_flare
...

It is hard to know where the error comes from and understand the underlying problem. If I'm not wrong, the lensflare plugin needs to be directly under the <camera> parent which is not the case.

In this PR, I'm trying to fix and help the situation:

  • 633c434 fix to place the plugin in the right place
  • 7ae7a87 change error message to know where it is is coming from and explain what is the real problem.

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.

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Sep 18, 2024
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
@iche033
Copy link
Contributor

iche033 commented Sep 18, 2024

I think the lens flare issue should be fixed by #2559?

@j-rivero
Copy link
Contributor Author

I think the lens flare issue should be fixed by #2559?

Ouch, I should have checked this before. I think that using prereleases instead of nightlies make that I did not get the change in my binaries.

BTW, I think that the problem is also present on Harmonic, #2559 needs to be backported.

@j-rivero j-rivero closed this Sep 19, 2024
@j-rivero j-rivero deleted the jrivero/lens_flare branch September 19, 2024 09:49
@iche033
Copy link
Contributor

iche033 commented Sep 19, 2024

BTW, I think that the problem is also present on Harmonic, #2559 needs to be backported.

hmm I just tested on harmonic with latest gz-sim8 branch, and looks like it's working. Just need to hit play first for the lens flares to be applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants