Data association

Overview

// typedefs

typedef size_t mrpt::slam::observation_index_t;
typedef size_t mrpt::slam::prediction_index_t;

// enums

enum mrpt::slam::TDataAssociationMethod;
enum mrpt::slam::TDataAssociationMetric;

// structs

struct mrpt::slam::TDataAssociationResults;

// global functions

void mrpt::slam::data_association_full_covariance(
    const mrpt::math::CMatrixDouble& Z_observations_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_cov,
    TDataAssociationResults& results,
    const TDataAssociationMethod method = assocJCBB,
    const TDataAssociationMetric metric = metricMaha,
    const double chi2quantile = 0.99,
    const bool DAT_ASOC_USE_KDTREE = true,
    const std::vector<prediction_index_t>& predictions_IDs = std::vector<prediction_index_t>(),
    const TDataAssociationMetric compatibilityTestMetric = metricMaha,
    const double log_ML_compat_test_threshold = 0.0
    );

void mrpt::slam::data_association_full_covariance(
    const mrpt::math::CMatrixDouble& Z_observations_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_cov,
    TDataAssociationResults& results,
    const std::vector<bool>& angular_components,
    const TDataAssociationMethod method = assocJCBB,
    const TDataAssociationMetric metric = metricMaha,
    const double chi2quantile = 0.99,
    const bool use_kd_tree = true,
    const std::vector<prediction_index_t>& predictions_IDs = std::vector<prediction_index_t>(),
    const TDataAssociationMetric compatibilityTestMetric = metricMaha,
    const double log_ML_compat_test_threshold = 0.0
    );

void mrpt::slam::data_association_independent_predictions(
    const mrpt::math::CMatrixDouble& Z_observations_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_cov,
    TDataAssociationResults& results,
    const TDataAssociationMethod method = assocJCBB,
    const TDataAssociationMetric metric = metricMaha,
    const double chi2quantile = 0.99,
    const bool DAT_ASOC_USE_KDTREE = true,
    const std::vector<prediction_index_t>& predictions_IDs = std::vector<prediction_index_t>(),
    const TDataAssociationMetric compatibilityTestMetric = metricMaha,
    const double log_ML_compat_test_threshold = 0.0
    );

Typedefs

typedef size_t mrpt::slam::observation_index_t

Used in mrpt::slam::TDataAssociationResults.

typedef size_t mrpt::slam::prediction_index_t

Used in mrpt::slam::TDataAssociationResults.

Global Functions

void mrpt::slam::data_association_full_covariance(
    const mrpt::math::CMatrixDouble& Z_observations_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_cov,
    TDataAssociationResults& results,
    const TDataAssociationMethod method = assocJCBB,
    const TDataAssociationMetric metric = metricMaha,
    const double chi2quantile = 0.99,
    const bool DAT_ASOC_USE_KDTREE = true,
    const std::vector<prediction_index_t>& predictions_IDs = std::vector<prediction_index_t>(),
    const TDataAssociationMetric compatibilityTestMetric = metricMaha,
    const double log_ML_compat_test_threshold = 0.0
    )

Computes the data-association between the prediction of a set of landmarks and their observations, all of them with covariance matrices - Generic version with prediction full cross-covariances.

Implemented methods include (see TDataAssociation)

  • NN: Nearest-neighbor

  • JCBB: Joint Compatibility Branch & Bound [9]

With both a Mahalanobis-distance or Matching-likelihood metric. For a comparison of both methods, see paper [5]

Individual compatibility is decided with a chi2 test of the squared Mahalanobis distance with O degrees of freedom (or with the matching likelihood, see compatibilityTestMetric). JCBB additionally requires each hypothesis to be jointly compatible: the joint squared Mahalanobis distance of its K pairings must pass a chi2 test with K*O degrees of freedom, with the same chi2quantile.

Parameters:

Z_observations_mean

[IN] An MxO matrix with the M observations, each row containing the observation “mean”.

Y_predictions_mean

[IN] An NxO matrix with the N predictions, each row containing the mean of one prediction.

Y_predictions_cov

[IN] An N*OxN*O matrix with the full covariance matrix of all the N predictions. It must include the observation noise, i.e. it is the innovation covariance.

results

[OUT] The output data association hypothesis, and other useful information.

method

[IN, optional] The selected method to make the associations.

chi2quantile

[IN, optional] The threshold for considering a match between two close Gaussians for two landmarks, in the range [0,1]. It is used to call mrpt::math::chi2inv

DAT_ASOC_USE_KDTREE

[IN, optional] Build a KD-tree to speed-up the evaluation of individual compatibility (IC). It’s perhaps more efficient to disable it for a small number of features. (default=true).

predictions_IDs

[IN, optional] (default:none) An N-vector. If provided, the resulting associations in “results.associations” will not contain prediction indices “i”, but “predictions_IDs[i]”.

See also:

data_association_independent_predictions

void mrpt::slam::data_association_independent_predictions(
    const mrpt::math::CMatrixDouble& Z_observations_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_mean,
    const mrpt::math::CMatrixDouble& Y_predictions_cov,
    TDataAssociationResults& results,
    const TDataAssociationMethod method = assocJCBB,
    const TDataAssociationMetric metric = metricMaha,
    const double chi2quantile = 0.99,
    const bool DAT_ASOC_USE_KDTREE = true,
    const std::vector<prediction_index_t>& predictions_IDs = std::vector<prediction_index_t>(),
    const TDataAssociationMetric compatibilityTestMetric = metricMaha,
    const double log_ML_compat_test_threshold = 0.0
    )

Computes the data-association between the prediction of a set of landmarks and their observations, all of them with covariance matrices - Generic version with NO prediction cross-covariances.

Implemented methods include (see TDataAssociation)

  • NN: Nearest-neighbor

  • JCBB: Joint Compatibility Branch & Bound [9]

With both a Mahalanobis-distance or Matching-likelihood metric. For a comparison of both methods, see paper [5] :

Parameters:

Z_observations_mean

[IN] An MxO matrix with the M observations, each row containing the observation “mean”.

Y_predictions_mean

[IN] An NxO matrix with the N predictions, each row containing the mean of one prediction.

Y_predictions_cov

[IN] An N*OxO matrix: A vertical stack of N covariance matrix, one for each of the N prediction.

results

[OUT] The output data association hypothesis, and other useful information.

method

[IN, optional] The selected method to make the associations.

chi2quantile

[IN, optional] The threshold for considering a match between two close Gaussians for two landmarks, in the range [0,1]. It is used to call mrpt::math::chi2inv

DAT_ASOC_USE_KDTREE

[IN, optional] Build a KD-tree to speed-up the evaluation of individual compatibility (IC). It’s perhaps more efficient to disable it for a small number of features. (default=true).

predictions_IDs

[IN, optional] (default:none) An N-vector. If provided, the resulting associations in “results.associations” will not contain prediction indices “i”, but “predictions_IDs[i]”.

See also:

data_association_full_covariance