12#include <pcl/registration/anderson_acceleration.h>
13#include <pcl/registration/icp.h>
14#include <pcl/search/kdtree.h>
15#include <pcl/search/search.h>
60template <
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
65 shared_ptr<FastRobustIterativeClosestPoint<PointSource, PointTarget, Scalar>>;
103 [[nodiscard]] std::size_t
137 using Matrix4d = Eigen::Matrix<double, 4, 4>;
138 using Matrix3Xd = Eigen::Matrix<double, 3, Eigen::Dynamic>;
139 using VectorXd = Eigen::VectorXd;
140 using Vector3d = Eigen::Vector3d;
144 convertGuessToCentered(
const Matrix4& guess,
145 const Vector3d& source_mean,
146 const Vector3d& target_mean)
const;
149 convertCenteredToActual(
const Matrix4d& transform,
150 const Vector3d& source_mean,
151 const Vector3d& target_mean)
const;
154 updateCorrespondences(
const Matrix4d& transform,
155 const Matrix3Xd& source,
156 const Matrix3Xd& target,
158 Matrix3Xd& matched_targets,
163 computeEnergy(
const VectorXd& residuals,
double nu)
const;
166 computeWeights(
const VectorXd& residuals,
double nu)
const;
169 computeWeightedRigidTransform(
const Matrix3Xd& source,
170 const Matrix3Xd& target,
171 const VectorXd& weights)
const;
176 int neighbors)
const;
179 matrixLog(
const Matrix4d& transform)
const;
182 bool use_anderson_ =
false;
183 std::size_t anderson_history_ = 5;
184 double nu_begin_ratio_ = 3.0;
185 double nu_end_ratio_ = 1.0 / (3.0 * std::sqrt(3.0));
186 double nu_decay_ratio_ = 0.5;
188 static constexpr double same_threshold_ = 1e-6;
190 AndersonAccelerationType anderson_;
196#include <pcl/registration/impl/fricp.hpp>
FastRobustIterativeClosestPoint implements the FRICP variant described in "Fast and Robust Iterative ...
typename Registration< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
bool getUseAndersonAcceleration() const
void computeTransformation(PointCloudSource &output, const Matrix4 &guess) override
Abstract transformation computation method with initial guess.
void setDynamicWelschEndRatio(double ratio)
Set the final Welsch scale ratio used in dynamic robust weighting.
void setRobustFunction(RobustFunction f)
void setDynamicWelschDecay(double ratio)
Set the multiplicative decay applied to the dynamic Welsch scale.
shared_ptr< FastRobustIterativeClosestPoint< PointSource, PointTarget, Scalar > > Ptr
typename Registration< PointSource, PointTarget, Scalar >::PointCloudSource PointCloudSource
void setUseAndersonAcceleration(bool enabled)
Enable or disable Anderson acceleration in the FRICP optimization loop.
FastRobustIterativeClosestPoint()
void setAndersonHistorySize(std::size_t history)
Set the history size used by Anderson acceleration.
std::size_t getAndersonHistorySize() const
RobustFunction getRobustFunction() const
shared_ptr< const FastRobustIterativeClosestPoint< PointSource, PointTarget, Scalar > > ConstPtr
void setDynamicWelschBeginRatio(double ratio)
Set the initial Welsch scale ratio used in dynamic robust weighting.
IterativeClosestPoint provides a base implementation of the Iterative Closest Point algorithm.
typename Registration< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
typename Registration< PointSource, PointTarget, Scalar >::PointCloudTarget PointCloudTarget
typename Registration< PointSource, PointTarget, Scalar >::PointCloudSource PointCloudSource
PointCloud represents the base class in PCL for storing collections of 3D points.
Lightweight Anderson acceleration helper used to speed up fixed-point iterations in FRICP.
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Defines all the PCL and non-PCL macros used.