Class ICP¶
- Defined in File icp.h
Class Documentation¶
-
class
ICP
¶ A class that performs point matching in an ICP like fashion to align a pointcloud with the existing TSDF information.
Note the process is slightly different to traditional ICP:
1) A “mini batch” of points is selected and the transform that gives the minimum least squares error for their alignment is found.
2) The “information” contained in this alignment is estimated and used to fuse this refined transform with the initial guess.
3) The process is repeated with a new mini batch of points until all points in the pointcloud have been used.
This scheme does not really iterate and uses the TSDF distances instead of building a kdtree. Both choices limit the capture region and so so assumes the initial guess is reasonably accurate. However, these limitations allow efficient correspondence estimation and parallelization, allowing efficient real time performance.
Public Functions
-
ICP
(const Config &config)¶ A normal member taking two arguments and returning an integer value.
- Parameters
config
: struct holding all relevant ICP parameters.
-
size_t
runICP
(const Layer<TsdfVoxel> &tsdf_layer, const Pointcloud &points, const Transformation &inital_T_tsdf_sensor, Transformation *refined_T_tsdf_sensor, const unsigned seed = std::chrono::system_clock::now().time_since_epoch().count())¶ Runs the ICP method to align the points with the tsdf_layer.
- Return
- the number of mini batches that were successful.
-
bool
refiningRollPitch
()¶
-
struct
Config
¶ Contains all the information needed to setup the ICP class.
Public Members
-
bool
refine_roll_pitch
= false¶
-
int
mini_batch_size
= 20¶ Number of points used in each alignment step.
To allow simple threading the ICP process is split up into a large number of separate alignments performed on small pointclouds. This parameter dictates how many points are used in each “mini batch”. The result are then combined weighting them by an estimate of the information gained by the alignment.
-
FloatingPoint
min_match_ratio
= 0.8¶ Ratio of points that must lie within the truncation distance of an allocated voxel.
-
FloatingPoint
subsample_keep_ratio
= 0.5¶ Ratio of points used in the ICP matching.
-
FloatingPoint
inital_translation_weighting
= 100.0¶ Weighting applied to the translational component of the initial guess.
Very roughly corresponds to the inverse covariance of the initial guess multiplied by the variance in a measured points accuracy.
-
FloatingPoint
inital_rotation_weighting
= 100.0¶ Weighting applied to the rotational component of the initial guess.
See inital_translation_weighting for further details
-
size_t
num_threads
= std::thread::hardware_concurrency()¶
-
bool
-