Ask Your Question

Gazebo laser plug-in fails to publish scan results in rviz

asked 2016-01-18 13:12:42 -0600

Kishore Kumar gravatar image

updated 2016-01-20 09:14:26 -0600

I have added differential drive plug-in and laser sensor (hokuyo) plug-in to my urdf file. I launched the robot in environment shown below and moved the robot using tele-operation. image description

Then i launched the rviz and did the setup required to view the scan results fron laser plug-in but it failed (refer the pic below).

image description

Following are my terminal result and result for rostopic echo /scan respectively. image description

image description

Where have i gone wrong how to fix this, does the warnings in terminal cause this problem?

Below is my plug-in code


<link name="hokuyo_link">
      <origin xyz="0 0 0" rpy="0 0 0"/>
        <box size="0.1 0.1 0.1"/>
      <origin xyz="0 0 0" rpy="0 0 0"/>
        <box size="0.1 0.1 0.1"/>
      <mass value="1e-5" />
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />

  <joint name="hokuyo_joint" type="fixed">
    <axis xyz="0 1 0" />
    <origin xyz="0 -0.055 0.2" rpy="0 0 0"/>
    <parent link="Base_plate"/>
    <child link="hokuyo_link"/>

laser Controller

<gazebo reference="hokuyo_link">
    <sensor type="gpu_ray" name="hokuyo">
      <pose>0 0 0 0 0 0</pose>
      <plugin name="gpu_laser" filename="">

My RQT result

image description

edit retag flag offensive close merge delete


Have you used RQT to look at the TF graph? Is it complete from the odom frame to the hokuyo_link frame?

jeremya gravatar image jeremya  ( 2016-01-18 14:03:56 -0600 )edit

Yes, it seems to be fine. Please refer it above in my last edit.

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-19 03:11:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-20 11:16:38 -0600

It's rather unusual to only have 0.0 ranges in the scan message. This also pretty much rules out issues due to rays hitting the inside of the laser box geometry and therefore not appearing in the scene.

I'd first test if the situation is different with the standard (not GPU) sensor. I've seen graphics driver related issues with the gpu ray sensor before, so it's a good idea to test for that. For the differences between both you can have a look at hokuyo_utm30lx.urdf.xacro. This macro contains both a gpu and non-gpu script. If the non-gpu sensor works, you're looking at a graphics card/driver compatibility problem.

edit flag offensive delete link more


yes, non-gpu version works fine for me. How to root cause the graphics issue and fix it?

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-21 00:03:35 -0600 )edit

Running OGRE-based rviz and gazebo on non-nvidia cards is problematic since the "dawn of time" :) and there is no general solution. You can try using updated graphics drivers and such, but there's not silver bullet to solve the problem. Search for "gazebo"+ your graphics card type here and on google

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2016-01-21 01:33:14 -0600 )edit

I am using AMD graphics card, does it be the culprit?

Kishore Kumar gravatar image Kishore Kumar  ( 2016-01-21 04:53:53 -0600 )edit

Yes. If you have a dual graphics setup you could try using your other GPU. Otherwise your could try instaling a newer driver or so, but there are no guarantees for improvement.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2016-01-21 08:01:30 -0600 )edit

What would you suggest if the the non-GPU laser didn't work? I'm having an identical problem to this and when I tried to use the non-GPU laser I recived the following error: Controller Spawner couldn't find the expected controller_manager ROS interface.

bob gravatar image bob  ( 2016-06-11 08:48:56 -0600 )edit

Any update running gpu_laser on non-nvidia?

achmad_fathoni gravatar image achmad_fathoni  ( 2018-06-02 02:23:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-01-18 13:12:42 -0600

Seen: 2,256 times

Last updated: Jan 20 '16