Home | Tutorials | Wiki | Issues
Ask Your Question
0

Strange Hokuyo laser range with libgazebo_ros_gpu_laser.so

asked 2015-06-27 19:56:27 -0500

IsaacS gravatar image

In a trial to publish laser output to ROS world, I followed the tutorial and the range of visualized laser on Gazebo is very short while using the same value from the tutorial (min: 0.1 and max: 30.0). ROS topic was published but due to this shortest range nothing could be detected.

image description

<sensor type="gpu_ray" name="head_hokuyo_sensor">
  <pose>0 0 0 0 0 0</pose>
  <visualize>true</visualize>
  <update_rate>40</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-1.570796</min_angle>
        <max_angle>1.570796</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.10</min>
      <max>30.0</max>
      <resolution>0.01</resolution>
    </range>
    <noise>
      <type>gaussian</type>
      <!-- Noise parameters based on published spec for Hokuyo laser
           achieving "+-30mm" accuracy at range < 10m.  A mean of 0.0m and
           stddev of 0.01m will put 99.7% of samples within 0.03m of the true
           reading. -->
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
  <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
    <topicName>/spur/laser/scan</topicName>
    <frameName>/hokuyo_sensor_link</frameName>
  </plugin>
</sensor>

Is this bug or am I doing something wrong?

Btw, cince I switched to libgazebo_ros_laser.so by following this blog with the following config and I got the laser range I wanted, my issue is resolved.

image description

<sensor type="ray" name="laser">
  <pose>0 0 0 0 0 0</pose>
  <visualize>true</visualize>
  <update_rate>40</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-1.570796</min_angle>
        <max_angle>1.570796</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.1</min>
      <max>4.0</max>
      <resolution>0.01</resolution>
    </range>
    <noise>
      <type>Gaussian</type>
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
  <plugin name="hokuyo_node" filename="libgazebo_ros_laser.so">
    <topicName>/spur/laser/scan</topicName>
    <frameName>/hokuyo_sensor_link</frameName>
  </plugin>
</sensor>

Ubuntu 14.04, Gazebo 2.2.5, ROS Indigo

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-04 14:31:24 -0500

vovka gravatar image

Hi, I had the same problem :)

I think the problem is in video drivers, I use default ubuntu video driver nouveau.

Try to add export LIBGL_ALWAYS_SOFTWARE=1 before launching gazebo simulation, or you may add this line to you ~/.bashrc (or similar) file.

look this comment

Ubuntu 14.04, Gazebo 2.2.3, ROS Indigo, GeForce GT 650M

edit flag offensive delete link more

Comments

I can't really upvote but this totally saved me! Also using nouveau drivers.

kotoko gravatar imagekotoko ( 2018-04-05 09:18:47 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-06-27 19:56:27 -0500

Seen: 3,910 times

Last updated: Feb 04 '16