class mp2p_icp::Matcher_Point2Line

Overview

Pointcloud matcher: point to plane-fit of nearby points

Finds point-to-line pairings between local point layers and points fitting a line in layers of the global input metric map. More…

#include <Matcher_Point2Line.h>

class Matcher_Point2Line: public mp2p_icp::Matcher_Points_Base
{
public:
    // fields

    std::map<std::string, std::map<std::string, double>> weight_pt2pt_layers;
    bool allowMatchAlreadyMatchedPoints_ = false;
    bool allowMatchAlreadyMatchedGlobalPoints_ = false;
    std::optional<std::size_t> kdtree_leaf_max_points_;

    // methods

    virtual void initialize(const mrpt::containers::yaml& params);
};

Inherited Members

public:
    // structs

    struct TransformedLocalPointCloud;

    // fields

    uint32_t runUpToIteration = 0;

    // methods

    virtual void initialize(const mrpt::containers::yaml& params);

    virtual bool match(
        const metric_map_t& pcGlobal,
        const metric_map_t& pcLocal,
        const mrpt::poses::CPose3D& localPose,
        const MatchContext& mc,
        MatchState& ms,
        Pairings& out
        ) const;

    virtual void initialize(const mrpt::containers::yaml& params);

Detailed Documentation

Pointcloud matcher: point to plane-fit of nearby points

Finds point-to-line pairings between local point layers and points fitting a line in layers of the global input metric map.

By default, each local point layer is matched against the layer with the same name in the global map, unless especified otherwise in the base class member weight_pt2pt_layers. Refer to example configuration YAML files for example configurations.

Fields

std::map<std::string, std::map<std::string, double>> weight_pt2pt_layers

Weights for each potential Local->Global point layer matching. If empty, the output Pairings::point_weights will left empty (=all points have equal weight). Note: this field can be loaded from a configuration file via initializeLayerWeights().

Map is: w[“globalLayer”][“localLayer”]=weight;

bool allowMatchAlreadyMatchedPoints_ = false

Whether to allow matching local points that have been already matched by a former Matcher instance in the pipeline.

bool allowMatchAlreadyMatchedGlobalPoints_ = false

If false, global map points can be paired exclusively against one local point.

std::optional<std::size_t> kdtree_leaf_max_points_

Maximum number of points per tree node. Not set: nanoflann default.

Methods

virtual void initialize(const mrpt::containers::yaml& params)

Parameters :

  • distanceThreshold : Inliers distance threshold [meters][mandatory]
  • knn : Number of neighbors to look for [mandatory]
  • minimumLinePoints : Minimum number of found points [mandatory]
  • lineEigenThreshold : maximum e0/e2 and e1/e2 ratio [mandatory]

Where [e0, e1, e2] are the smallest to largest eigenvalues of the Gaussian covariance fitting the knn closest global points for each local point.

Plus: the parameters of Matcher_Points_Base::initialize()