Go to the documentation of this file.
47 m_modelCloud(model), m_dataCloud(data)
62 return Matrix4d::Identity();
65 auto start_time = chrono::steady_clock::now();
67 double ret = 0.0, prev_ret = 0.0, prev_prev_ret = 0.0;
71 Vector3d centroid_m = Vector3d::Zero();
72 Vector3d centroid_d = Vector3d::Zero();
83 prev_prev_ret = prev_ret;
99 cout <<
timestamp <<
"ICP Error is " << ret <<
" in iteration " << iteration <<
" / " <<
m_maxIterations <<
" using " << pairs <<
" points." << endl;
111 auto duration = chrono::steady_clock::now() - start_time;
112 cout << setw(6) << (int)(duration.count() / 1e6) <<
" ms, ";
113 cout <<
"Error: " << fixed << setprecision(3) << setw(7) << ret;
116 cout <<
" after " << iteration <<
" Iterations";
121 cout <<
"Result: " << endl <<
m_dataCloud->deltaPose() << endl;
double getEpsilon() const
void setMaxLeafSize(int maxLeafSize)
double m_maxDistanceMatch
int getMaxIterations() const
T alignPoints(SLAMScanPtr scan, Point3 **neighbors, const Vec3 ¢roid_m, const Vec3 ¢roid_d, Mat4 &align) const
Calculates the estimated Transformation to match a Data Pointcloud to a Model Pointcloud.
Transform< double > Transformd
4x4 double precision transformation matrix
void setVerbose(bool verbose)
void setEpsilon(double epsilon)
double getMaxMatchDistance() const
static std::shared_ptr< KDTree > create(SLAMScanPtr scan, int maxLeafSize=20)
Creates a new KDTree from the given Scan.
int getMaxLeafSize() const
static Timestamp timestamp
A global time stamp object for program runtime measurement.
static size_t nearestNeighbors(KDTreePtr tree, SLAMScanPtr scan, Neighbor *neighbors, double maxDistance, Vector3d ¢roid_m, Vector3d ¢roid_d)
Finds the nearest neighbors of all points in a Scan using a pre-generated KDTree.
std::shared_ptr< SLAMScanWrapper > SLAMScanPtr
PointBufferPtr transform(PointBufferPtr pc_in, const Transformd &T)
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
void setMaxMatchDistance(double distance)
void setMaxIterations(int iterations)
Transformd match()
Executes the ICPAlign.
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23