Home | Tutorials | Wiki | Issues
Ask Your Question

Hokuyo Senser not working

asked 2017-10-11 17:25:02 -0500

Ash_100 gravatar image

updated 2017-10-12 09:19:29 -0500


I am using ROS kinetic and Gazebo 7.8.1 I want to connect Hokuyo sensor to Turtlebot. I can see a box representing Hokuyo sensor on the Turtlebot but the sensor is not scanning the world.

Here is my specification

**kobuki_hexagons_kinect_hokuyo.urdf.xacro file**

<?xml version="1.0"?>
  <robot name="turtlebot" xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:include filename="$(find turtlebot_description)/urdf/turtlebot_common_library.urdf.xacro" />

      <xacro:include filename="$(find kobuki_description)/urdf/kobuki.urdf.xacro" />
      <xacro:include filename="$(find turtlebot_description)/urdf/stacks/hexagons.urdf.xacro"/>
      <xacro:include filename="$(find turtlebot_description)/urdf/sensors/hokuyo.urdf.xacro"/>

      <stack_hexagons parent="base_link"/>
      <sensor_hokuyo  parent="base_link"/>

  **hokuyo.urdf.xacro file**

<?xml version="1.0"?>
<robot name="sensor_hokuyo" xmlns:xacro="http://ros.org/wiki/xacro">
  <xacro:include filename="$(find turtlebot_description)/urdf/turtlebot_gazebo_brass.urdf.xacro"/>
  <xacro:include filename="$(find turtlebot_description)/urdf/turtlebot_properties.urdf.xacro"/>

          <xacro:macro name="sensor_hokuyo" params="parent">
            <joint name="laser" type="fixed">
              <origin xyz="0.15 0.0 0.360" rpy="3.14159 0.0 0.0" />
              <parent link="${parent}" />
              <child link="base_laser_link" />

            <link name="base_laser_link">
                      <box size="0.05 0.05 0.05"/> 
                  <material name="Green"/> 

                <mass value="0.000001" />
                <origin xyz="0 0 0" rpy="0 0 0"/>
                <inertia ixx="0.0001" ixy="0.0" ixz="0.0"
                  iyy="0.0001" iyz="0.0"
                  izz="0.0001" />

            <!-- Set up laser gazebo details -->
            <hokuyo_laser />

 **turtlebot_gazebo_brass.urdf.xacro file**

<xacro:macro name="hokuyo_laser">
    <gazebo reference="base_laser_link">
      <sensor type="ray" name="laser">
        <pose>0 0 0 0 0 0</pose>
        <plugin name="hokuyo_node" filename="libgazebo_ros_laser.so">
edit retag flag offensive close merge delete


Do you use the standard description package of the Turtlebot?

wentz gravatar imagewentz ( 2017-10-13 08:02:00 -0500 )edit

Please say more about what do you mean from the standard description of the Turtlebot. I am using the launch files provided with turtlebot_gazebo package (obviously with some modifications to add hokuyo sensor).

Ash_100 gravatar imageAsh_100 ( 2017-10-13 08:35:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-10-13 03:50:22 -0500

Hi. Have you tried in terminal "rostopic list" to see if /hokuyo_laser is present?

edit flag offensive delete link more


Yes, /hokuyo_laser is present. However, Gazebo crashes when I select the topic on RViZ.

Ash_100 gravatar imageAsh_100 ( 2017-10-16 08:39:41 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-10-11 17:25:02 -0500

Seen: 35 times

Last updated: Oct 12