Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to simulate a Velodyne sensor?

How would you simulate a velodyne sensor or any other 3d laser sensor?

I've tried to use the block laser plugin combined with a horizontal+vertical ray sensor but it looks like the vertical tag is bugged in the 1.9 branch of gazebo. At least, when I put more than 3 samples in the vertical block It takes forever to load on my i7 computer. (I attached parts of my sdf to the question)

I was wondering if anybody has been able to simulate such a 3d laser sensor.

<gazebo reference="laser_frame">
  <sensor name="velodyne" type="ray">
    <always_on>true</always_on>
    <update_rate>5</update_rate>
    <visualize>false</visualize>
    <ray>
      <scan>
        <horizontal>
          <samples>360</samples>
          <resolution>1</resolution>
          <min_angle>-3.14159</min_angle>
          <max_angle>3.14159</max_angle>
        </horizontal>
        <vertical>
          <samples>3</samples>
          <resolution>1</resolution>
          <min_angle>-0.43284</min_angle>
          <max_angle>0.03490</max_angle>
        </vertical>
      </scan>
      <range>
        <min>0.22</min>
        <max>50</max>
        <resolution>0.02</resolution>
      </range>
    </ray>
    <plugin name="laser_controller" filename="libgazebo_ros_block_laser.so">
      <frameName>laser_link</frameName>
      <topicName>scan</topicName>
      <gaussianNoise>0.02</gaussianNoise>
      <updateRate>5</updateRate>
    </plugin>
  </sensor>
</gazebo>

Thanks for sharing your solutions