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 segmentation camera color id computation with new math::Color clamping behavior (ogre2) #1040

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Aug 19, 2024

🦟 Bug fix

Summary

gz-sensors caught a crash in in its segmentation camera integration test on github actions. The error msgs reveal that it related to the new color clamping behavior in gz::math::Color:

2024-08-19T23:31:54.9495719Z Color values were clamped
2024-08-19T23:31:54.9495817Z Color values were clamped
2024-08-19T23:31:54.9495909Z Color values were clamped

The new Color behavior expects the range to be within [0, 1] but we are passing it values of [0, 255].

More info on the crash: the crash was due to infinite recursion. The function tried to compute (recursively) unique color ids but each new generated color gets clamped to the same value [1, 1, 1].

To test:

Run the gz-sensors segmentation camera integration test:

./build/gz-sensors9/bin/INTEGRATION_segmentation_camera 

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: Ian Chen <ichen@openrobotics.org>
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Aug 19, 2024
@iche033 iche033 changed the title Fix segmentation camera color id computation with new clamping behavior (ogre2) Fix segmentation camera color id computation with new math::Color clamping behavior (ogre2) Aug 20, 2024
@iche033 iche033 merged commit f9e5a8d into main Aug 20, 2024
9 of 10 checks passed
@iche033 iche033 deleted the seg_cam_color branch August 20, 2024 16:45
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