31#include "rtabmap/core/rtabmap_core_export.h"
33#include <opencv2/core/core.hpp>
39#include "rtabmap/utilite/UEventsHandler.h"
40#include "rtabmap/core/Parameters.h"
50class SparsePrediction;
200 void updatePosterior(
const Memory * memory,
const std::map<int, float> & likelihood);
208 void updateKeepSparse();
211 std::vector<int> _posteriorIds;
212 std::vector<float> _posteriorValues;
213 std::vector<int> _likelihoodIds;
214 std::vector<float> _likelihoodValues;
215 std::vector<float> _priorValues;
217 bayes::PredictionModel * _model;
218 bayes::DensePrediction * _dense;
219 bayes::SparsePrediction * _sparse;
220 std::map<int, std::map<int, int> > _neighborsIndex;
222 bool _fullPredictionUpdate;
223 bool _sparsePrediction;
225 bool _predictionChanged;
Recursive Bayesian filter for loop-closure hypothesis estimation in RTAB-Map.
std::string getPredictionLCStr() const
Returns the loop-closure prediction model as a space-separated string.
float getVirtualPlacePrior() const
Returns the virtual place prior threshold.
BayesFilter(const ParametersMap ¶meters=ParametersMap())
Constructs a Bayes filter with default or custom parameters.
void setPredictionLC(const std::string &prediction)
Sets the loop-closure prediction model from a space-separated string.
cv::Mat generatePrediction(const Memory *memory, const std::vector< int > &ids)
Builds or updates the prediction (transition) matrix for the given signature ids.
const std::vector< int > & getPosteriorIds() const
The locations the posterior is over, ascending by id.
unsigned long getMemoryUsed() const
Estimates memory usage of this object and its internal containers.
virtual void parseParameters(const ParametersMap ¶meters)
Updates internal settings from the parameter map.
bool isPredictionSparse() const
Whether the prediction is being kept in its sparse form rather than as a matrix.
bool computePosterior(const Memory *memory, const std::map< int, float > &likelihood)
Runs one Bayes filter iteration (prediction + update).
const std::vector< float > & getPosteriorValues() const
The probability of each location of getPosteriorIds(), in the same order.
const std::vector< double > & getPredictionLC() const
Returns the loop-closure prediction model as a vector of values.
void reset()
Clears posterior, prediction matrix and cached neighbor indices.
Three-tiered memory management (STM, WM, LTM) for RTAB-Map.
Represents a node in RTAB-Map's pose graph.
std::map< std::string, std::string > ParametersMap
Parameter keys mapped to their values, as used by every configurable class (see Parameters).