Program Listing for File Matcher_Points_DistanceThreshold.h

Return to documentation for file (mp2p_icp/include/mp2p_icp/Matcher_Points_DistanceThreshold.h)

/*               _
 _ __ ___   ___ | | __ _
| '_ ` _ \ / _ \| |/ _` | Modular Optimization framework for
| | | | | | (_) | | (_| | Localization and mApping (MOLA)
|_| |_| |_|\___/|_|\__,_| https://github.com/MOLAorg/mola

 A repertory of multi primitive-to-primitive (MP2P) ICP algorithms
 and map building tools. mp2p_icp is part of MOLA.

 Copyright (C) 2018-2026 Jose Luis Blanco, University of Almeria,
                         and individual contributors.
 SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once

#include <mp2p_icp/Matcher_Points_Base.h>

namespace mp2p_icp
{
class Matcher_Points_DistanceThreshold : public Matcher_Points_Base
{
    DEFINE_MRPT_OBJECT(Matcher_Points_DistanceThreshold, mp2p_icp)

   public:
    Matcher_Points_DistanceThreshold();

    Matcher_Points_DistanceThreshold(double distThreshold) : Matcher_Points_DistanceThreshold()
    {
        threshold = distThreshold;
    }

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

    double   threshold           = 0.50;  // m
    double   thresholdAngularDeg = 0;  // deg
    uint32_t pairingsPerPoint    = 1;

   private:
    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;
};

}  // namespace mp2p_icp