The sections below describe the API of this package which allows ICP-based SLAM in 2D (x,y,phi).

The SLAM algorithm is a simple incremental map building using ICP to align 2D laser scans to the map, which can be either a point map or an occupancy grid map. [For now, only point maps]

Using this technique allows building small to mid-sized maps, as long as errors do not grow excessively before closing any long loop. Building larger maps requires more advanced SLAM techniques. However, this simple icp-slam algorithm is an efficient and well-tested method which suffices for many practical situations.

Further documentation

The ROS node mrpt_icp_slam_2d is a wrapper for the C++ class mrpt::slam::CMetricMapBuilderICP, part of MRPT. Thus, check out the documentation of that class for further details.

This node has been designed to provide an interface similar to that of slam_gmapping for the convenience of users which already knew that package.

For the convention on coordinate frames see ROS REP 105: "Coordinate Frames for Mobile Platforms".

Hardware Requirements

Using mrpt_icp_slam_2d requires a horizontally-mounted, fixed, laser range-finder. Odometry is optional.

The mrpt_icp_slam_2d node will attempt to transform each incoming scan into the odom (odometry) tf frame. See the "Required tf transforms" for more on required transforms.


In order to use mrpt_icp_slam_2d package it is necessary to install the last MRPT build and themrpt_navigation(see also the tutorial) .


The following video presents the example of icp SLAM both in Rviz and MRPT GUI:

The example of usage icp SLAM in online regime:

roslaunch mrpt_icp_slam_2d icp_slam.launch

The example of usage icp SLAM from .rawlog file:

roslaunch mrpt_icp_slam_2d icp_slam_rawlog.launch



The mrpt_icp_slam_2d node takes in sensor_msgs/LaserScan messages and builds a point-cloud map (sensor_msgs/PointCloud) or/and gridmap (nav_msgs/OccupancyGrid) . The map can be retrieved via a ROS topic.

Subscribed Topics

tf (tf/tfMessage)
  • Transforms necessary to relate frames for laser, base, and odometry (see below)
scan (sensor_msgs/LaserScan)
  • Laser scans to create the map from

Published Topics

PointCloudMap (sensor_msgs/PointCloud)
  • Get the point-cloud map data from this topic, which is latched, and updated periodically
map (nav_msgs/OccupancyGrid)
  • Occupancy grid map topic
robot_pose (geometry_msgs/PoseStamped)
  • Estimate of the robot pose


~global_frame_id (string, default: "map")
  • the frame attached to the map
~base_frame_id (string, default: "base_link")
  • The frame attached to the mobile base
~odom_frame_id (string, default: "odom")
  • The frame attached to the odometry system
~sensor_source (string, default: "scan")
  • The name of topics with 2d laser scans(the name of topic should contaion word "scan")
~ini_filename (string, default: None)
  • The path to the ini file with MRPT settings for icp SLAM (see tutorial folder)
~rawlog_filename (string, default: None)
  • The path to rawlog file(if the rawlog file is not exists the SLAM starts in online regime)
~rawlog_play_delay (float, default: 0.1)
  • Delay for replay SLAM from rawlog file.

Required tf Transforms

<the frame attached to incoming scans>base_link base_linkodom
  • The robot odometry, provided by the odometry system (e.g., the driver for the mobile base)

Provided tf Transforms

  • The current estimate of the robot's pose within the map frame

Wiki: mrpt_icp_slam_2d (last edited 2016-08-22 08:29:08 by VladislavTananaev)