1
$\begingroup$

I have added hokuyo laser plug-in to mu urdf file. I successfully launched the robot in gazebo and done required changes to visualize it in rviz. I didn't get any error but the laser scan results are not published.

Fine my results below

Terminal while launching gazebo model in world

enter image description here

Result for rostopic echo /scan

enter image description here

I have also verified the tf of the model in rqt and its fine

Aslo find my urdf file below, can someone help me to fix this?

Link & joint:

<link name="hokuyo_link">
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
    </collision>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
    </visual>
    <inertial>
      <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" />
    </inertial>
  </link>

  <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"/>
  </joint>

Controller:

<gazebo reference="hokuyo_link">
        <sensor type="gpu_ray" name="hokuyo">
          <pose>0 0 0 0 0 0</pose>
          <visualize>false</visualize>
          <update_rate>40</update_rate>
          <ray>
            <scan>
              <horizontal>
                <samples>100</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>
          </ray>
          <plugin name="gpu_laser" filename="libgazebo_ros_gpu_laser.so">
            <topicName>/scan</topicName>
            <frameName>hokuyo_link</frameName>
          </plugin>
        </sensor>
      </gazebo>
$\endgroup$
2
  • $\begingroup$ From your rostopic echo /scan it looks like the results are published, except that they are not correct. Is it possible that the node that is supposed to talk with the hokuyo laser has trouble talking with the actual hardware? $\endgroup$ – Shahbaz Jan 19 '16 at 15:33
  • $\begingroup$ Also, it seems that urg_node is going to replace hokuyo_node. Perhaps, give that a try? $\endgroup$ – Shahbaz Jan 19 '16 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.