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

Add support for L8 and L16 image formats in WideAngleCameraSensor #494

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jan 9, 2025

🎉 New feature

Closes #479

Related PR: gazebosim/gz-rendering#1097

Summary

Added L8 and L16 type support.

Test it

You'll first need gazebosim/gz-rendering#1097

Then edit wide_angle_camera.sdf world in gz-sim, and add <format>L8</format> to the //model/link/sensor/camera/image tag, e.g.

diff --git a/examples/worlds/wide_angle_camera.sdf b/examples/worlds/wide_angle_camera.sdf
index 8482ae695..ce9c49c45 100644
--- a/examples/worlds/wide_angle_camera.sdf
+++ b/examples/worlds/wide_angle_camera.sdf
@@ -306,6 +306,7 @@
             <image>
               <width>800</width>
               <height>600</height>
+              <format>L8</format>
             </image>
             <clip>
               <near>0.1</near>

Run the example world to see the wide angle camera image in gray:

wideanglecam_L8

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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>
src/WideAngleCameraSensor.cc Outdated Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested a review from ahcorde January 9, 2025 17:49
@iche033 iche033 merged commit cd283ae into gz-sensors9 Jan 10, 2025
10 checks passed
@iche033 iche033 deleted the wideanglecam_mono branch January 10, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

WideAngleCameraSensor only supports RGB8 format, not L8 as in Classic
2 participants