struct mrpt::slam::TDataAssociationResults

The results from mrpt::slam::data_association_independent_predictions()

#include <mrpt/slam/data_association.h>

struct TDataAssociationResults
{
    //
fields

    std::map<observation_index_t, prediction_index_t> associations;
    double distance {0};
    mrpt::math::CMatrixDouble indiv_distances;
    mrpt::math::CMatrixBool indiv_compatibility;
    std::vector<uint32_t> indiv_compatibility_counts;
    size_t nNodesExploredInJCBB {0};

    // construction

    TDataAssociationResults();

    //
methods

    void clear();
};

Fields

std::map<observation_index_t, prediction_index_t> associations

For each observation (with row index IDX_obs in the input “Z_observations”), its association in the predictions, as the row index in the “Y_predictions_mean” input (or it’s mapping to a custom ID, if it was provided).

Note that not all observations may have an associated prediction. An observation with index “IDX_obs” corresponds to the prediction number “associations[IDX_obs]”, or it may not correspond to anyone if it’s not present in the std::map (Tip: Use associations.find(IDX_obs)!= associations.end()) The types observation_index_t and prediction_index_t are just used for clarity, use normal size_t’s.

double distance {0}

The Joint Mahalanobis distance or matching likelihood of the best associations found.

mrpt::math::CMatrixDouble indiv_distances

Individual mahalanobis distances (or matching likelihood, depending on the selected metric) between predictions (row indices) & observations (column indices).

Indices are for the appearing order in the arguments “Y_predictions_mean” & “Z_observations”, they are NOT landmark IDs.

mrpt::math::CMatrixBool indiv_compatibility

The result of a chi2 test for compatibility using mahalanobis distance - Indices are like in “indiv_distances”.

std::vector<uint32_t> indiv_compatibility_counts

The sum of each column of indiv_compatibility, that is, the number of compatible pairings for each observation.

size_t nNodesExploredInJCBB {0}

Only for the JCBB method,the number of recursive calls expent in the algorithm.