icp-slam
icp-slam builds a metric map (point cloud and/or occupancy grid) from a dataset (rawlog file) by aligning each new laser scan against the map built so far with ICP (Iterative Closest Point). It is a thin wrapper of mrpt::slam::CMetricMapBuilderICP, with ICP from mrpt::slam::CICP. It suits datasets with good odometry and a 2D (or planar 3D) LiDAR, when a simple and fast map is enough (no loop closure).
The companion app icp-slam-live runs the same algorithm on live LiDAR data.
Usage
icp-slam <config_file.ini> [<dataset.rawlog>]
config_file.ini: the configuration file (see below).dataset.rawlog: optional; if given, it overrides therawlog_fileentry of the configuration file.
Example
cd modules/mrpt_data/config_files/icp-slam
icp-slam icp-slam_demo_classic.ini
Other sample configurations in the same directory use Levenberg-Marquardt ICP (icp-slam_demo_LM.ini), grid matching (icp-slam_demo_classic_gridmatch.ini), a voxel map (icp-slam_demo_voxelmap.ini) or an octomap (icp-slam_demo_with_octomap.ini).
Configuration file
[MappingApplication]: the app and the map builder.rawlog_file,rawlog_offset(entries to skip at the beginning).logOutput_dir: output directory. Its previous contents are deleted.LOG_FREQUENCY,SAVE_3D_SCENE,SAVE_POSE_LOG: save a 3D scene and/or the current pose PDF everyLOG_FREQUENCYsteps.SHOW_PROGRESS_3D_REAL_TIME,SHOW_PROGRESS_3D_REAL_TIME_DELAY_MS,SHOW_LASER_SCANS_3D: live 3D view.localizationLinDistance,localizationAngDistance,insertionLinDistance,insertionAngDistance,minICPgoodnessToAccept,matchAgainstTheGridand the rest of mrpt::slam::CMetricMapBuilderICP::TConfigParams.The maps to build (
pointsMap_count,occupancyGrid_count,…), with their options in sections like[MappingApplication_pointsMap_00_insertOpts], as described in mrpt::maps::CMultiMetricMap.alwaysInsertByClass: observation classes inserted into the map at every step.
[ICP]: ICP parameters (mrpt::slam::CICP::TConfigParams), e.g.ICP_algorithm,maxIterations,thresholdDist,thresholdAng_DEG,ALFA,corresponding_points_decimation.
Output
In the logOutput_dir directory:
File |
Contents |
|---|---|
|
The final map as a simple map (poses and observations), e.g. for observations2map or RawLogViewer. |
|
The final metric maps (e.g. point clouds as text, grid maps as images). |
|
Estimated robot path. |
|
Odometry-only robot path. |
|
Processing time per step. |
|
3D scenes of the map being built (if |
|
Pose PDF per step (if |