Description

This code is almost identicle to the gazebo plugin tutorial except there was a slight modification to the turtlebot_gazebo.urdf.xacro after the </xacro:macro> tag closing the Kinect macro.

INTRO

This guide assumes :

  1. ROS is setup properly and configured
  2. Turtle bot is configured properly
  3. The Hokuyo Desciption is configured properly

STEPS

  1. Open up your turtlebot_gazebo.urdf.xacro and add the following after your </xacro:macro> tag
  2. <!-- Hokuyo LIDAR for simulation -->
    <xacro:macro name="hokuyo_laser">
    <gazebo reference="base_laser_link">
    <sensor type="ray" name="laser">
    <pose>0 0 0 0 0 0</pose>
    <visualize>false</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>
    <mean>0.0</mean>
    <stddev>0.01</stddev>
    </noise>
    </ray>
    <plugin name="hokuyo_node" filename="libgazebo_ros_laser.so">
    <topicName>/scan</topicName>
    <frameName>base_laser_link</frameName>
    </plugin>
    </sensor>
    </gazebo>
    </xacro:macro>
    

This was taken from the gazebo plugin tutorial.

  1. This macro will set up the plugin in Gazebo when expanded from the hokuyo.urdf.xacro file. We now add the Hokuyo urdf to the Turtlebot xacro library file in /turtlebot_description/urdf/turtlebot_library.urdf.xacro. Add the following line to the end of the file before the </robot> tag.

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

results matching ""

    No results matching ""