iterative closest points
CEV ICP algorithm library
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
icp::ICPDriver Class Reference

Driver for running ICP to convergence. More...

#include <driver.h>

Classes

struct  ConvergenceState
 The result of running ICPDriver::converge. More...
 

Public Member Functions

 ICPDriver (std::unique_ptr< ICP > icp)
 Constructs a new ICPDriver using the given ICP method.
 
ConvergenceState converge (const std::vector< Vector > &a, const std::vector< Vector > &b, RBTransform t)
 Runs ICP to convergence based on the termination conditions set.
 
void set_min_iterations (uint64_t min_iterations)
 Sets the minimum number of iterations to run.
 
void set_max_iterations (uint64_t max_iterations)
 Sets the maximum number of iterations to run.
 
void set_stop_cost (double stop_cost)
 Sets the cost at which to stop ICP.
 
void set_relative_cost_tolerance (double relative_cost_tolerance)
 Sets the relative cost tolerance.
 
void set_absolute_cost_tolerance (double absolute_cost_tolerance)
 Set the absolute cost tolerance.
 
void set_transform_tolerance (double angle_tolerance, double translation_tolerance)
 Set the transform tolerance.
 
void set_time_limit (std::chrono::duration< double > time_limit)
 Set the time limit for converge.
 

Detailed Description

Driver for running ICP to convergence.

Definition at line 12 of file driver.h.

Constructor & Destructor Documentation

◆ ICPDriver()

icp::ICPDriver::ICPDriver ( std::unique_ptr< ICP icp)

Constructs a new ICPDriver using the given ICP method.

Parameters
icpThe ICP method to use.

Definition at line 5 of file driver.cpp.

Member Function Documentation

◆ converge()

ICPDriver::ConvergenceState icp::ICPDriver::converge ( const std::vector< Vector > &  a,
const std::vector< Vector > &  b,
RBTransform  t 
)

Runs ICP to convergence based on the termination conditions set.

If no conditions are set, ICP will run indefinitely. This is rarely desirable.

Parameters
aThe source point cloud.
bThe destination point cloud.
tThe initial guess for the transformation.
Returns
ConvergenceState

Definition at line 9 of file driver.cpp.

◆ set_absolute_cost_tolerance()

void icp::ICPDriver::set_absolute_cost_tolerance ( double  absolute_cost_tolerance)

Set the absolute cost tolerance.

converge will return when the cost changes by less than this amount, i.e. when |current_cost - prev_cost| < absolute_cost_tolerance.

Parameters
absolute_cost_toleranceThe absolute cost tolerance.

Definition at line 106 of file driver.cpp.

◆ set_max_iterations()

void icp::ICPDriver::set_max_iterations ( uint64_t  max_iterations)

Sets the maximum number of iterations to run.

Parameters
max_iterationsThe maximum number of iterations to run.

Definition at line 93 of file driver.cpp.

◆ set_min_iterations()

void icp::ICPDriver::set_min_iterations ( uint64_t  min_iterations)

Sets the minimum number of iterations to run.

This number of iterations will always be performed.

Parameters
min_iterationsThe minimum number of iterations to run.

Definition at line 88 of file driver.cpp.

◆ set_relative_cost_tolerance()

void icp::ICPDriver::set_relative_cost_tolerance ( double  relative_cost_tolerance)

Sets the relative cost tolerance.

converge will return when the cost changes by less than this fraction of the current cost, i.e. when |current_cost - prev_cost| / < relative_cost_tolerance.

Parameters
relative_cost_toleranceThe relative cost tolerance.

Definition at line 102 of file driver.cpp.

◆ set_stop_cost()

void icp::ICPDriver::set_stop_cost ( double  stop_cost)

Sets the cost at which to stop ICP.

converge will return when a cost below stop_cost is achieved.

Parameters
stop_costThe cost at which to stop ICP.

Definition at line 98 of file driver.cpp.

◆ set_time_limit()

void icp::ICPDriver::set_time_limit ( std::chrono::duration< double >  time_limit)

Set the time limit for converge.

Note that coverge may take slightly longer than this time (up to 1 iteration time) to return.

Parameters
time_limitThe time limit.

Definition at line 115 of file driver.cpp.

◆ set_transform_tolerance()

void icp::ICPDriver::set_transform_tolerance ( double  angle_tolerance,
double  translation_tolerance 
)

Set the transform tolerance.

converge will return when both the angle and translation tolerances are met.

Parameters
angle_toleranceThe angle tolerance in radians. The tolerance is met when the angle of rotation between the current and previous transformation around the axis of rotation is less than angle_tolerance.
translation_toleranceThe translation tolerance in scan units. The tolerance is met when the change in translation is less than translation_tolerance.

Definition at line 110 of file driver.cpp.


The documentation for this class was generated from the following files: