Robotics StackExchange | Archived questions

Has anyone run a camera sensor with L_INT16 format without an error?

I'm trying to create a 16bit mono image to match the output of a real world sensor. Ex:

  <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>

It correctly matches the enumeration type for LINT16 (second entry) but seems to not to be able to "convert/support" it and defaults to RGBINT8: image description

Not sure really where the issue might be coming from as it does appear to be a supported image type used in the thermal cam by default and recognizes the type: https://github.com/search?q=org%3Agazebosim+L_INT16&type=code

So I'm perplexed why it might be throwing the error of:

[Err] [CameraSensor.cc:221] Unsupported pixel format [2]

and was curious if this is regression or just not complete implementation yet. I don't mind "fixing it" and creating a PR if someone has a better Idea where/why it might be failing.

Here are the open issues: https://github.com/gazebosim/gz-sensors/issues/275 https://github.com/gazebosim/gz-sim/issues/1736

Asked by bperseghetti on 2022-09-26 13:26:36 UTC

Comments

Answers

This should be fixed by https://github.com/gazebosim/gz-sensors/pull/276

Asked by azeey on 2022-09-28 13:46:44 UTC

Comments