12#include <pcl/registration/anderson_acceleration.h>
13#include <pcl/registration/icp.h>
14#include <pcl/search/search.h>
59template <
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
64 shared_ptr<FastRobustIterativeClosestPoint<PointSource, PointTarget, Scalar>>;
102 [[nodiscard]] std::size_t
136 using Matrix4d = Eigen::Matrix<double, 4, 4>;
137 using Matrix3Xd = Eigen::Matrix<double, 3, Eigen::Dynamic>;
138 using VectorXd = Eigen::VectorXd;
139 using Vector3d = Eigen::Vector3d;
143 convertGuessToCentered(
const Matrix4& guess,
144 const Vector3d& source_mean,
145 const Vector3d& target_mean)
const;
148 convertCenteredToActual(
const Matrix4d& transform,
149 const Vector3d& source_mean,
150 const Vector3d& target_mean)
const;
153 updateCorrespondences(
const Matrix4d& transform,
154 const Matrix3Xd& source,
155 const Matrix3Xd& target,
157 Matrix3Xd& matched_targets,
162 computeEnergy(
const VectorXd& residuals,
double nu)
const;
165 computeWeights(
const VectorXd& residuals,
double nu)
const;
168 computeWeightedRigidTransform(
const Matrix3Xd& source,
169 const Matrix3Xd& target,
170 const VectorXd& weights)
const;
175 int neighbors)
const;
178 matrixLog(
const Matrix4d& transform)
const;
181 bool use_anderson_ =
false;
182 std::size_t anderson_history_ = 5;
183 double nu_begin_ratio_ = 3.0;
184 double nu_end_ratio_ = 1.0 / (3.0 * std::sqrt(3.0));
185 double nu_decay_ratio_ = 0.5;
187 static constexpr double same_threshold_ = 1e-6;
189 AndersonAccelerationType anderson_;
195#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.