iterative closest points
CEV ICP algorithm library
|
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 . | |
icp::ICPDriver::ICPDriver | ( | std::unique_ptr< ICP > | icp | ) |
Constructs a new ICPDriver using the given ICP method.
icp | The ICP method to use. |
Definition at line 5 of file driver.cpp.
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.
a | The source point cloud. |
b | The destination point cloud. |
t | The initial guess for the transformation. |
Definition at line 9 of file driver.cpp.
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
.
absolute_cost_tolerance | The absolute cost tolerance. |
Definition at line 106 of file driver.cpp.
void icp::ICPDriver::set_max_iterations | ( | uint64_t | max_iterations | ) |
Sets the maximum number of iterations to run.
max_iterations | The maximum number of iterations to run. |
Definition at line 93 of file driver.cpp.
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.
min_iterations | The minimum number of iterations to run. |
Definition at line 88 of file driver.cpp.
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
.
relative_cost_tolerance | The relative cost tolerance. |
Definition at line 102 of file driver.cpp.
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.
stop_cost | The cost at which to stop ICP. |
Definition at line 98 of file driver.cpp.
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.
time_limit | The time limit. |
Definition at line 115 of file driver.cpp.
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.
angle_tolerance | The 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_tolerance | The 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.