# Configuration file for grid-matching:
# 
# See: http://www.mrpt.org/list-of-mrpt-apps/application-grid-matching/

[grid-match]
featsPerSquareMeter		= 0.012

threshold_max			= 0.20 		// For considering candidate matches
threshold_delta			= 0.09

ransac_prob_good_inliers = 0.9999999999  // Prob. of a good inliers (for the number of iterations).

maxKLd_for_merge        = 0.9		// Merge of close SOG modes

min_ICP_goodness	= 0.30
max_ICP_mahadist	= 10 // The maximum Mahalanobis distance between the initial and final poses in the ICP not to discard the hypothesis (default=10)

ransac_minSetSizeRatio	= 0.15 // 0.20

ransac_mahalanobisDistanceThreshold	= 6		// amRobust method only
ransac_chi2_quantile	= 0.5 				// amModifiedRANSAC method only

save_feat_coors			= 0		// Dump correspondences to grid_feats
debug_save_map_pairs	= 1		// Save the pair of maps with the best correspondences
debug_show_corrs		= 0		// Debug output of graphs


# All the params of the feature detectors/descriptors
# ----------------------------------------------------------
featsType			= 1		// 0: KLT, 1: Harris, 3: SIFT, 4: SURF

// The feature descriptor to use: 0=detector already has descriptor, 
//  1= SIFT, 2=SURF, 4=Spin images, 8=Polar images, 16=log-polar images 
feature_descriptor		= 8

patchSize			= 0   	// Not needed

KLTOptions.min_distance		= 6			// Pixels
KLTOptions.threshold		= 0.20 // 0.00001

harrisOptions.min_distance	= 6			// Pixels
harrisOptions.threshold 	= 0.20

SIFTOptions.implementation	= 3			// Hess

SURFOptions.rotation_invariant	= 1		// 0=64 dims, 1=128dims
SURFOptions.hessianThreshold	= 600
SURFOptions.nOctaves		= 2
SURFOptions.nLayersPerOctave    = 8

SpinImagesOptions.hist_size_distance	= 10 
SpinImagesOptions.hist_size_intensity	= 10 
SpinImagesOptions.radius			= 20

PolarImagesOptions.bins_angle			= 8
PolarImagesOptions.bins_distance		= 6
PolarImagesOptions.radius			= 20

LogPolarImagesOptions.radius			= 20
LogPolarImagesOptions.num_angles		= 8



#        MULTIMETRIC MAP CONFIGURATION
# ---------------------------------------------
[metric_maps]
occupancyGrid_count=1
gasGrid_count=0
landmarksMap_count=0
beaconMap_count=0
pointsMap_count=1


# ====================================================
#   MULTIMETRIC MAP: OccGrid #00
# ====================================================
[metric_maps_pointsMap_00_creationOpts]
disableSaveAs3DObject=0

# Creation Options for OccupancyGridMap 00:
[metric_maps_occupancyGrid_00_creationOpts]
resolution=0.10
disableSaveAs3DObject=0

# Insertion Options for OccupancyGridMap 00:
[metric_maps_occupancyGrid_00_insertOpts]
mapAltitude=0
useMapAltitude=0
maxDistanceInsertion=40
maxOccupancyUpdateCertainty=0.60
considerInvalidRangesAsFreeSpace=1
minLaserScanNoiseStd=0.001
horizontalTolerance=0.9    // In degrees

CFD_features_gaussian_size              = 3
CFD_features_median_size                = 3

