Robotics StackExchange | Archived questions

block_laser z points coordinate problem

Hi everybody,

I am trying to simulate a velodyne sensor in Gazebo. There is my world : image description

There is the setting of the sensor:

<gazebo reference="velodyne">
    <sensor type="ray" name="velodyne_sensor">
      <pose>0.0 0.0 0.0 0.0 0 0</pose>
      <visualize>false</visualize>
      <update_rate>5</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>720</samples>
            <min_angle>-3.13</min_angle>
            <max_angle>3.14</max_angle>
          </horizontal>
          <vertical>
            <samples>16</samples>
            <min_angle>-0.13</min_angle>
            <max_angle>0.13</max_angle>
          </vertical>
        </scan>
        <range>
          <min>0.30</min>
          <max>30.0</max>
        </range>
      </ray>
      <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_block_laser.so">
        <topicName>scan_velodyne</topicName>
        <updateRate>5</updateRate>
        <frameName>/velodyne</frameName>
        <alwaysOn>true</alwaysOn>
      </plugin>
    </sensor>
</gazebo>

And there is the problem: image description

The points coordinate in x and y seems correct but the z coordinate is wrong. Seems like it's can not be resolved with a simple rotation.

Thanks in advance

Asked by Brosseau.F on 2016-02-26 12:10:59 UTC

Comments

Answers

image description

Problem solved.

In the gazebo_ros_block_laser.cpp, I changed

point.z = - r * sin(pAngle) + this->GaussianKernel(0,this->gaussian_noise_);

to

point.z = r * sin(pAngle) + this->GaussianKernel(0,this->gaussian_noise_);

Asked by Brosseau.F on 2016-02-29 06:23:03 UTC

Comments