Camera sensor fails with L_INT16.
bperseghetti opened this issue · 0 comments
bperseghetti commented
Environment
- OS Version: Ubuntu 22.04
- Binary
- Fortress 6.12.0
Description
- Expected behavior: Camera runs with 16bit mono image.
- Actual behavior: Camera fails to run 16bit mono as L_INT16 and appears to fail and default to use RGB_INT8
Note that when switching the format to 8bit mono as L_INT8 (instead of the 16bit mono as L_INT16) it has no issues, does not throw any errors and displays a true L_INT8 image.
Steps to reproduce
- Run Gazebo sdf model that has camera sensor with:
<format>L_INT16</format>
example:
<sensor name="gray_image" type="camera">
<pose>0 0 0 0 0 0</pose>
<camera>
<horizontal_fov>0.977384</horizontal_fov>
<image>
<width>224</width>
<height>172</height>
<format>L_INT16</format>
</image>
<clip>
<near>0.1</near>
<far>4.0</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
<topic>/royale_camera/gray_image</topic>
</sensor>
Or if desired you can also use this existing model using this world to include the sensors plugin.
Output
[Err] [CameraSensor.cc:221] Unsupported pixel format [2]
And the output image defaults to RGB_INT8
Since this issue appears to touch both gz-sensors and gz-sim I am also including it here, I can close one or other depending on desire of where to have this issue.