Gazebo | Ignition | Community
Ask Your Question
0

block_laser z points coordinate problem [closed]

asked 2016-02-26 11:10:59 -0600

Brosseau.F gravatar image

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Brosseau.F
close date 2016-10-21 01:46:14.839761

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-29 05:23:03 -0600

Brosseau.F gravatar image

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_);

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-02-26 11:10:59 -0600

Seen: 228 times

Last updated: Feb 29 '16