gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
74 stars 43 forks source link

Add support for bayer images to get displayed in gazebo gui #528

Closed tejalbarnwal closed 1 year ago

tejalbarnwal commented 1 year ago

🎉 New feature

Closes gz-sensors issue 299

Sub-Tasks

Summary and Related PRs

The functionality reads the user input and renders an RGB image, which is later converted into a single channel 8bit Bayer image using ConvertRGBToBayer() added to Utils.cc inside gz-rendering.

Test it

In order to test this, one can modify camera_sensor.sdf inside gz-sim here. Would have just to replace the part with the following snippet.

<image>
   <width>320</width>
   <height>240</height>
   <format>BAYER_RGGB8</format>
</image>
<clip>
   <near>0.1</near>
   <far>100</far>
</clip>
<save enabled="true">
    <path>path to the folder</path>
</save>

Checklist

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.

codecov[bot] commented 1 year ago

Codecov Report

Merging #528 (61900e0) into gz-gui7 (f81686a) will decrease coverage by 0.06%. The diff coverage is 0.00%.

:exclamation: Current head 61900e0 differs from pull request most recent head 0eb6b5c. Consider uploading reports for the commit 0eb6b5c to get more accurate results

@@             Coverage Diff             @@
##           gz-gui7     #528      +/-   ##
===========================================
- Coverage    69.19%   69.14%   -0.06%     
===========================================
  Files           44       44              
  Lines         4938     4942       +4     
===========================================
  Hits          3417     3417              
- Misses        1521     1525       +4     
Impacted Files Coverage Δ
src/plugins/image_display/ImageDisplay.cc 30.70% <0.00%> (-1.00%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.