Configuring the gmapping node

The gmapping node is the package to perform SLAM (http://wiki.ros.org/gmapping).

The gmapping node inside this package mainly subscribes and publishes the following topics.

The following are the subscribed topics:

  • tf (tf/tfMessage): The robot transform that relates to Kinect, robot base, and odometry
  • scan (sensor_msgs/LaserScan): The laser scan data that is required to create the map

The following are the published topics:

  • map (nav_msgs/OccupancyGrid): Publishes the occupancy grid map data
  • map_metadata (nav_msgs/MapMetaData): Basic information about the occupancy grid

The gmapping node is highly configurable, using various parameters. The gmapping node parameters are defined inside the chefbot_bringup/launch/include/gmapping.launch.xml file. The following is a code snippet of this file and its uses:

<launch> 
  <arg name="scan_topic" default="scan" /> 
 
<!-- Starting gmapping node --> 
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen"> 
 
<!-- Frame of mobile base --> 
    <param name="base_frame" value="base_footprint"/> 
    <param name="odom_frame" value="odom"/> 
<!-- The interval of map updation, reducing this value will speed of map generation but increase computation load --> 
    <param name="map_update_interval" value="5.0"/> 
<!-- Maximum usable range of laser/kinect --> 
    <param name="maxUrange" value="6.0"/> 
<!-- Maximum range of sensor, max range should be > maxUrange --> 
    <param name="maxRange" value="8.0"/> 
    <param name="sigma" value="0.05"/> 
    <param name="kernelSize" value="1"/> 
</node> 
</launch> 

By fine tuning these parameters, we improve the accuracy of the gmapping node.

The main gmapping launch file is given next. It is placed in chefbot_bringup/launch/includes/gmapping_demo.launch. This launch file launches the openni_launch file and the depth_to_laserscan node to convert the depth image to the laser scan. After launching the Kinect nodes, it launches the gmapping node and the move_base configurations:

<launch> 
<!-- Launches 3D sensor nodes --> 
  <include file="$(find chefbot_bringup)/launch/3dsensor.launch"> 
    <arg name="rgb_processing" value="false" /> 
    <arg name="depth_registration" value="false" /> 
    <arg name="depth_processing" value="false" /> 
    <arg name="scan_topic" value="/scan" /> 
  </include> 
 
<!-- Start gmapping nodes and its configurations --> 
  <include file="$(find chefbot_bringup)/launch/includes/gmapping.launch.xml"/> 
 
<!-- Start move_base node and its configuration --> 
  <include file="$(find chefbot_bringup)/launch/includes/move_base.launch.xml"/> 
</launch> 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.197.212