struct mp2p_icp::PairWeights
Overview
Relative weight of points, lines, and planes.
Solvers read these differently, and the difference matters:
Solver_OLAE normalizes them to sum to unity, so only their ratios are meaningful there and any convenient scale will do.
Solver_GaussNewton uses them as given. In a weighted least-squares sum a weight IS an inverse variance: a pairing contributes
w * J^t * Jto the normal equations, and its robust-kernel argument is whitened by the samew. So therew = 1/sigma^2for the assumed residual sigma of that pair type, and the ABSOLUTE scale matters, not just the ratios.
The whitening is what puts every residual type on one scale before the robust kernel compares it against robustKernelScale. Cov-to-cov pairings need no weight for this: their residual is a Mahalanobis norm and is already whitened.
This all becomes load-bearing when one ICP pipeline mixes pair types. A metric point-to-plane residual and a dimensionless cov-to-cov one are not comparable at equal weight: leaving both at 1.0 lets the cov-to-cov block dominate the normal equations by the inverse of its own surface regularization, and leaves the geometric block with a robust kernel that never fires.
#include <PairWeights.h> struct PairWeights { // fields double pt2pt = 1.0; double pt2ln = 1.0; double pt2pl = 1.0; double ln2ln = 1.0; double pl2pl = 1.0; // methods void load_from(const mrpt::containers::yaml& p); void save_to(mrpt::containers::yaml& p) const; void serializeTo(mrpt::serialization::CArchive& out) const; void serializeFrom(mrpt::serialization::CArchive& in); };
Fields
double pt2pt = 1.0
Weight of point-to-point pairs.
double pt2ln = 1.0
Weight of point-to-line pairs.
double pt2pl = 1.0
Weight of point-to-plane pairs.
double ln2ln = 1.0
Weight of line-to-line pairs.
double pl2pl = 1.0
Weight of plane-to-plane pairs.