template class mrpt::graphslam::deciders::CLoopCloserERD

Edge Registration Decider scheme specialized in Loop Closing.

#include <mrpt/graphslam/ERD/CLoopCloserERD.h>

template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf>
class CLoopCloserERD: public mrpt::graphslam::deciders:: CRangeScanEdgeRegistrationDecider< typename mrpt::graphs::CNetworkOfPoses2DInf >
{
public:
    // typedefs

    typedef CRangeScanEdgeRegistrationDecider<GRAPH_T> parent_t;
    typedef typename GRAPH_T::constraint_t constraint_t;
    typedef typename GRAPH_T::constraint_t::type_value pose_t;
    typedef typename GRAPH_T::global_pose_t global_pose_t;
    typedef CLoopCloserERD<GRAPH_T> decider_t;
    typedef typename parent_t::range_ops_t range_ops_t;
    typedef typename parent_t::nodes_to_scans2D_t nodes_to_scans2D_t;
    typedef std::vector<std::vector<uint32_t>> partitions_t;
    typedef typename GRAPH_T::edges_map_t::const_iterator edges_citerator;
    typedef typename GRAPH_T::edges_map_t::iterator edges_iterator;
    typedef typename mrpt::graphs::detail::THypothesis<GRAPH_T> hypot_t;
    typedef std::vector<hypot_t> hypots_t;
    typedef std::vector<hypot_t*> hypotsp_t;
    typedef std::map<std::pair<hypot_t*, hypot_t*>, double> hypotsp_to_consist_t;
    typedef mrpt::graphslam::TUncertaintyPath<GRAPH_T> path_t;
    typedef std::vector<path_t> paths_t;
    typedef mrpt::graphslam::detail::TNodeProps<GRAPH_T> node_props_t;

    // structs

    struct TGenerateHypotsPoolAdParams;
    struct TGetICPEdgeAdParams;
    struct TLaserParams;
    struct TLoopClosureParams;

    // construction

    CLoopCloserERD();

    //
methods

    bool updateState(
        mrpt::obs::CActionCollection::Ptr action,
        mrpt::obs::CSensoryFrame::Ptr observations,
        mrpt::obs::CObservation::Ptr observation
        );

    void setWindowManagerPtr(mrpt::graphslam::CWindowManager* win_manager);
    void notifyOfWindowEvents(const std::map<std::string, bool>& events_occurred);
    void getEdgesStats(std::map<std::string, int>* edge_types_to_num) const;
    void initializeVisuals();
    void updateVisuals();
    void loadParams(const std::string& source_fname);
    void printParams() const;
    void getDescriptiveReport(std::string* report_str) const;
    void getCurrentPartitions(partitions_t& partitions_out) const;
    const partitions_t& getCurrentPartitions() const;
    size_t getDijkstraExecutionThresh() const;
    void setDijkstraExecutionThresh(size_t new_thresh);

    void generateHypotsPool(
        const std::vector<uint32_t>& groupA,
        const std::vector<uint32_t>& groupB,
        hypotsp_t* generated_hypots,
        const TGenerateHypotsPoolAdParams* ad_params = nullptr
        );

    void generatePWConsistenciesMatrix(
        const std::vector<uint32_t>& groupA,
        const std::vector<uint32_t>& groupB,
        const hypotsp_t& hypots_pool,
        mrpt::math::CMatrixDouble* consist_matrix,
        const paths_t* groupA_opt_paths = nullptr,
        const paths_t* groupB_opt_paths = nullptr
        );

    void evalPWConsistenciesMatrix(const mrpt::math::CMatrixDouble& consist_matrix, const hypotsp_t& hypots_pool, hypotsp_t* valid_hypots);
};

Typedefs

typedef CRangeScanEdgeRegistrationDecider<GRAPH_T> parent_t

Edge Registration Decider.

typedef CLoopCloserERD<GRAPH_T> decider_t

self type

Methods

size_t getDijkstraExecutionThresh() const

Return the minimum number of nodes that should exist in the graph prior to running Dijkstra.

void generateHypotsPool(
    const std::vector<uint32_t>& groupA,
    const std::vector<uint32_t>& groupB,
    hypotsp_t* generated_hypots,
    const TGenerateHypotsPoolAdParams* ad_params = nullptr
    )

Generate the hypothesis pool for all the inter-group constraints between two groups of nodes.

Parameters:

groupA

First group to be tested

groupB

Second group to be tested

generated_hypots

Pool of generated hypothesis. Hypotheses are generated in the heap, so the caller is responsible of afterwards calling delete.

void generatePWConsistenciesMatrix(
    const std::vector<uint32_t>& groupA,
    const std::vector<uint32_t>& groupB,
    const hypotsp_t& hypots_pool,
    mrpt::math::CMatrixDouble* consist_matrix,
    const paths_t* groupA_opt_paths = nullptr,
    const paths_t* groupB_opt_paths = nullptr
    )

Compute the pair-wise consistencies Matrix.

Parameters:

groupA

First group to be used

groupB

Second group to be used

hypots_pool

Pool of hypothesis that has been generated between the two groups pram[out] consist_matrix Pointer to Pair-wise consistencies matrix that is to be filled

groupA_opt_paths

Pointer to vector of optimal paths that can be used instead of making queries to the m_node_optimal_paths class vector. See corresponding argument in generatePWConsistencyElement method

groupB_opt_paths

See also:

generatePWConsistencyElement

evalPWConsistenciesMatrix

void evalPWConsistenciesMatrix(
    const mrpt::math::CMatrixDouble& consist_matrix,
    const hypotsp_t& hypots_pool,
    hypotsp_t* valid_hypots
    )

Evalute the consistencies matrix, fill the valid hypotheses.

Call to this method should be made right after generating the consistencies matrix using the generatePWConsistenciesMatrix method

See also:

generatePWConsistenciesMatrix