Add noise to Bounding Box Camera

asked 2022-12-06 05:29:39 -0500

samagalhaes gravatar image

Hello,

Is it possible to add noise to bounding box cameras? How can I do it?

Currently, I am adding like so:

<model name="boundingbox_camera">
  <pose>0 0 1.0 0 0.0 0</pose>
  <link name="link">
    <inertial>
      <mass>0.0</mass>
      <inertia>
        <ixx>0.000166667</ixx>
        <iyy>0.000166667</iyy>
        <izz>0.000166667</izz>
      </inertia>
    </inertial>
    <collision name="collision">
      <geometry>
        <box>
          <size>0.1 0.1 0.1</size>
        </box>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <box>
          <size>0.1 0.1 0.1</size>
        </box>
      </geometry>
    </visual>

    <sensor name="full_2d" type="boundingbox_camera">
      <topic>boxes_full_2d</topic>
      <camera>
        <box_type>full_2d</box_type>
        <horizontal_fov>1.047</horizontal_fov>
        <image>
          <width>800</width>
          <height>600</height>
        </image>
        <clip>
          <near>0.1</near>
          <far>10</far>
        </clip>
        <noise>
          <type>gaussian</type>
          <mean>0.9</mean>
          <stddev>0.9</stddev>
        </noise>
        <!--<save enabled="true">
          <path>bounding_box_full_2d_data</path>
        </save>-->
      </camera>
      <always_on>1</always_on>
      <update_rate>30</update_rate>
      <visualize>true</visualize>
    </sensor>
  </link>
</model>

I verified that outputted bounding boxes in the topic do not have any noise (output is always the same).

OBS: I am using Ignition Gazebo (now Gazebo).

Thanks in advance for all the support.

edit retag flag offensive close merge delete