42#include <pcl/registration/icp.h>
52template <
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
77 using Ptr = shared_ptr<JointIterativeClosestPoint<PointSource, PointTarget, Scalar>>;
79 shared_ptr<const JointIterativeClosestPoint<PointSource, PointTarget, Scalar>>;
132 reg_name_ =
"JointIterativeClosestPoint";
144 PCL_WARN(
"[pcl::%s::setInputSource] Warning; JointIterativeClosestPoint expects "
145 "multiple clouds. Please use addInputSource.\n",
170 PCL_WARN(
"[pcl::%s::setInputTarget] Warning; JointIterativeClosestPoint expects "
171 "multiple clouds. Please use addInputTarget.\n",
248#include <pcl/registration/impl/joint_icp.hpp>
IterativeClosestPoint provides a base implementation of the Iterative Closest Point algorithm.
typename Registration< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
bool use_reciprocal_correspondence_
The correspondence type used for correspondence estimation.
bool need_source_blob_
Checks for whether estimators and rejectors need various data.
pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr convergence_criteria_
void setInputTarget(const PointCloudTargetConstPtr &cloud) override
Provide a pointer to the input target (e.g., the point cloud that we want to align the input source t...
bool source_has_normals_
Internal check whether source dataset has normals or not.
void setInputSource(const PointCloudSourceConstPtr &cloud) override
Provide a pointer to the input source (e.g., the point cloud that we want to align to the target)
bool target_has_normals_
Internal check whether target dataset has normals or not.
JointIterativeClosestPoint extends ICP to multiple frames which share the same transform.
std::vector< PointCloudTargetConstPtr > targets_
typename PointCloudSource::Ptr PointCloudSourcePtr
void clearCorrespondenceEstimations()
Reset my list of correspondence estimation methods.
shared_ptr< const JointIterativeClosestPoint< PointSource, PointTarget, Scalar > > ConstPtr
void addInputSource(const PointCloudSourceConstPtr &cloud)
Add a source cloud to the joint solver.
void determineRequiredBlobData() override
Looks at the Estimators and Rejectors and determines whether their blob-setter methods need to be cal...
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::PointCloudTarget PointCloudTarget
typename KdTree::Ptr KdTreeReciprocalPtr
~JointIterativeClosestPoint() override=default
Empty destructor.
void computeTransformation(PointCloudSource &output, const Matrix4 &guess) override
Rigid transformation computation method with initial guess.
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
PointIndices::Ptr PointIndicesPtr
void clearInputSources()
Reset my list of input sources.
typename PointCloudTarget::Ptr PointCloudTargetPtr
std::vector< PointCloudSourceConstPtr > sources_
typename CorrespondenceEstimation::Ptr CorrespondenceEstimationPtr
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::PointCloudSource PointCloudSource
void addCorrespondenceEstimation(CorrespondenceEstimationPtr ce)
Add a manual correspondence estimator If you choose to do this, you must add one for each input sourc...
PointIndices::ConstPtr PointIndicesConstPtr
JointIterativeClosestPoint()
Empty constructor.
void setInputTarget(const PointCloudTargetConstPtr &) override
Provide a pointer to the input target (e.g., the point cloud that we want to align to the target)
typename CorrespondenceEstimation::ConstPtr CorrespondenceEstimationConstPtr
shared_ptr< JointIterativeClosestPoint< PointSource, PointTarget, Scalar > > Ptr
typename KdTree::Ptr KdTreePtr
std::vector< CorrespondenceEstimationPtr > correspondence_estimations_
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
typename IterativeClosestPoint< PointSource, PointTarget, Scalar >::Matrix4 Matrix4
void clearInputTargets()
Reset my list of input targets.
void setInputSource(const PointCloudSourceConstPtr &) override
Provide a pointer to the input source (e.g., the point cloud that we want to align to the target)
void addInputTarget(const PointCloudTargetConstPtr &cloud)
Add a target cloud to the joint solver.
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
Matrix4 final_transformation_
The final transformation matrix estimated by the registration method after N iterations.
std::function< UpdateVisualizerCallbackSignature > update_visualizer_
Callback function to update intermediate source point cloud position during it's registration to the ...
double corr_dist_threshold_
The maximum distance threshold between two correspondent points in source <-> target.
std::string reg_name_
The registration method name.
Matrix4 transformation_
The transformation matrix estimated by the registration method.
CorrespondenceEstimationPtr correspondence_estimation_
A CorrespondenceEstimation object, used to estimate correspondences between the source and the target...
int nr_iterations_
The number of iterations the internal optimization ran for (used internally).
Matrix4 previous_transformation_
The previous transformation matrix estimated by the registration method (used internally).
bool converged_
Holds internal convergence state, given user parameters.
CorrespondencesPtr correspondences_
The set of correspondences determined at this ICP step.
TransformationEstimationPtr transformation_estimation_
A TransformationEstimation object, used to calculate the 4x4 rigid transformation.
int max_iterations_
The maximum number of iterations the internal optimization should run for.
unsigned int min_number_correspondences_
The minimum number of correspondences that the algorithm needs before attempting to estimate the tran...
double euclidean_fitness_epsilon_
The maximum allowed Euclidean error between two consecutive steps in the ICP loop,...
double inlier_threshold_
The inlier distance threshold for the internal RANSAC outlier rejection loop.
double transformation_epsilon_
The maximum difference between two consecutive transformations in order to consider convergence (user...
std::vector< CorrespondenceRejectorPtr > correspondence_rejectors_
The list of correspondence rejectors to use.
PointCloudTargetConstPtr target_
The input point cloud dataset target.
const std::string & getClassName() const
Abstract class get name method.
Abstract CorrespondenceEstimationBase class.
shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > ConstPtr
shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > Ptr
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
shared_ptr< KdTree< PointT, Tree > > Ptr
shared_ptr< ::pcl::PointIndices > Ptr
shared_ptr< const ::pcl::PointIndices > ConstPtr