Package Summary
This package contains a ROS wrapper for OpenSlam's Gmapping. The gmapping package provides laser-based SLAM (Simultaneous Localization and Mapping), as a ROS node called slam_gmapping. Using slam_gmapping, you can create a 2-D occupancy grid map (like a building floorplan) from laser and pose data collected by a mobile robot.
- Maintainer status: maintained
- Maintainer: Vincent Rabaud <vincent.rabaud AT gmail DOT com>
- Author: Brian Gerkey
- License: CreativeCommons-by-nc-sa-2.0
- Source: git https://github.com/ros-perception/slam_gmapping.git (branch: hydro-devel)
Contents
External Documentation
This is mostly a third party package; the underlying GMapping library is externally documented. Look there for details on many of the parameters listed below.
Hardware Requirements
To use slam_gmapping, you need a mobile robot that provides odometry data and is equipped with a horizontally-mounted, fixed, laser range-finder. The slam_gmapping node will attempt to transform each incoming scan into the odom (odometry) tf frame. See the "Required tf transforms" for more on required transforms.
Example
To make a map from a robot with a laser publishing scans on the base_scan topic:
rosrun gmapping slam_gmapping scan:=base_scan
Nodes
slam_gmapping
The slam_gmapping node takes in sensor_msgs/LaserScan messages and builds a map (nav_msgs/OccupancyGrid). The map can be retrieved via a ROS topic or service.Subscribed Topics
tf (tf/tfMessage)- Transforms necessary to relate frames for laser, base, and odometry (see below)
- Laser scans to create the map from
Published Topics
map_metadata (nav_msgs/MapMetaData)- Get the map data from this topic, which is latched, and updated periodically.
- Get the map data from this topic, which is latched, and updated periodically
- Estimate of the entropy of the distribution over the robot's pose (a higher value indicates greater uncertainty). New in 1.1.0.
Services
dynamic_map (nav_msgs/GetMap)- Call this service to get the map data
Parameters
~inverted_laser (string, default: "false")- (REMOVED in 1.1.1; transform data is used instead) Is the laser right side up (scans are ordered CCW), or upside down (scans are ordered CW)?
- Process 1 out of every this many scans (set it to a higher number to skip more scans)
- The frame attached to the mobile base.
- The frame attached to the map.
- The frame attached to the odometry system.
- How long (in seconds) between updates to the map. Lowering this number updates the occupancy grid more often, at the expense of greater computational load.
- The maximum usable range of the laser. A beam is cropped to this value.
- The sigma used by the greedy endpoint matching
- The kernel in which to look for a correspondence
- The optimization step in translation
- The optimization step in rotation
- The number of iterations of the scanmatcher
- The sigma of a beam used for likelihood computation
- Gain to be used while evaluating the likelihood, for smoothing the resampling effects
- Number of beams to skip in each scan. Take only every (n+1)th laser ray for computing a match (0 = take all rays)
- Minimum score for considering the outcome of the scan matching good. Can avoid jumping pose estimates in large open spaces when using laser scanners with limited range (e.g. 5m). Scores go up to 600+, try 50 for example when experiencing jumping estimate issues.
- Odometry error in translation as a function of translation (rho/rho)
- Odometry error in translation as a function of rotation (rho/theta)
- Odometry error in rotation as a function of translation (theta/rho)
- Odometry error in rotation as a function of rotation (theta/theta)
- Process a scan each time the robot translates this far
- Process a scan each time the robot rotates this far
- Process a scan if the last scan processed is older than the update time in seconds. A value less than zero will turn time based updates off.
- The Neff based resampling threshold
- Number of particles in the filter
- Initial map size (in metres)
- Initial map size (in metres)
- Initial map size (in metres)
- Initial map size (in metres)
- Resolution of the map (in metres per occupancy grid block)
- Translational sampling range for the likelihood
- Translational sampling step for the likelihood
- Angular sampling range for the likelihood
- Angular sampling step for the likelihood
- How long (in seconds) between transform publications.
- Threshold on gmapping's occupancy values. Cells with greater occupancy are considered occupied (i.e., set to 100 in the resulting sensor_msgs/LaserScan). New in 1.1.0.
- The maximum range of the sensor. If regions with no obstacles within the range of the sensor should appear as free space in the map, set maxUrange < maximum range of the real sensor <= maxRange.
Required tf Transforms
→ base_link- usually a fixed value, broadcast periodically by a robot_state_publisher, or a tf static_transform_publisher.
- usually provided by the odometry system (e.g., the driver for the mobile base)