Go to the documentation of this file.
15 #include <mrpt/core/exceptions.h>
16 #include <mrpt/core/round.h>
17 #include <mrpt/version.h>
25 mrpt::system::COutputLogger::setLoggerName(
"Matcher_Point2Plane");
35 const mrpt::maps::CMetricMap& pcGlobalMap,
36 const mrpt::maps::CPointsMap& pcLocal,
37 const mrpt::poses::CPose3D& localPose,
MatchState& ms,
48 out.potential_pairings += pcLocal.size();
51 if (pcGlobalMap.isEmpty() || pcLocal.empty())
return;
57 if (!pcGlobalMap.boundingBox().intersection(
58 {tl.localMin, tl.localMax},
63 out.paired_pt2pl.reserve(
out.paired_pt2pl.size() + pcLocal.size() / 10);
69 const auto& lxs = pcLocal.getPointsBufferRef_x();
70 const auto& lys = pcLocal.getPointsBufferRef_y();
71 const auto& lzs = pcLocal.getPointsBufferRef_z();
73 for (
size_t i = 0; i < tl.
x_locals.size(); i++)
75 const size_t localIdx = tl.
idxs.has_value() ? (*tl.
idxs)[i] : i;
99 auto& p =
out.paired_pt2pl.emplace_back();
100 p.pt_local = {lxs[localIdx], lys[localIdx], lzs[localIdx]};
101 p.pl_global = np.
pairing->pl_global;
void initialize(const mrpt::containers::yaml ¶ms) override
void checkAllParametersAreRealized() const
double bounding_box_intersection_check_epsilon_
bool allowMatchAlreadyMatchedPoints_
float distance
Absolute value of plane-point distance, if a pairing is found:
#define DECLARE_PARAMETER_REQ(__yaml, __variable)
void initialize(const mrpt::containers::yaml ¶ms) override
uint64_t localPointsSampleSeed_
void implMatchOneLayer(const mrpt::maps::CMetricMap &pcGlobal, const mrpt::maps::CPointsMap &pcLocal, const mrpt::poses::CPose3D &localPose, MatchState &ms, const layer_name_t &globalName, const layer_name_t &localName, Pairings &out) const override
IMPLEMENTS_MRPT_OBJECT(QualityEvaluator_RangeImageSimilarity, QualityEvaluator, mp2p_icp) using namespace mp2p_icp
std::map< layer_name_t, DenseOrSparseBitField > point_layers
std::optional< point_plane_pair_t > pairing
Found pairing:
uint64_t maxLocalPointsPerLayer_
pointcloud_bitfield_t localPairedBitField
virtual NearestPlaneResult nn_search_pt2pl(const mrpt::math::TPoint3Df &point, const float max_search_distance) const =0
Calculate eigenvectors and eigenvalues from a set of points.
static TransformedLocalPointCloud transform_local_to_global(const mrpt::maps::CPointsMap &pcLocal, const mrpt::poses::CPose3D &localPose, const std::size_t maxLocalPoints=0, const uint64_t localPointsSampleSeed=0)
Pointcloud matcher: point to plane-fit of nearby points.
const mp2p_icp::NearestPlaneCapable * MapToNP(const mrpt::maps::CMetricMap &map, bool throwIfNotImplemented)
mp2p_icp
Author(s):
autogenerated on Thu Dec 26 2024 03:48:12