31 #include "rtabmap/core/rtabmap_core_export.h"
33 #include <opencv2/core/core.hpp>
34 #include <opencv2/features2d/features2d.hpp>
35 #include <opencv2/imgproc/imgproc.hpp>
43 #define RTABMAP_STATS(PREFIX, NAME, UNIT) \
45 static std::string k##PREFIX##NAME() {return #PREFIX "/" #NAME "/" #UNIT;} \
47 class Dummy##PREFIX##NAME { \
49 Dummy##PREFIX##NAME() {if(!_defaultDataInitialized)_defaultData.insert(std::pair<std::string, float>(#PREFIX "/" #NAME "/" #UNIT, 0.0f));} \
51 Dummy##PREFIX##NAME dummy##PREFIX##NAME
119 RTABMAP_STATS(Proximity, Space_detections_added_icp_global,);
219 static const std::map<std::string, float> & defaultData();
220 static std::string serializeData(
const std::map<std::string, float> &
data);
221 static std::map<std::string, float> deserializeData(
const std::string &
data);
228 void addStatistic(
const std::string &
name,
float value);
245 void setPoses(
const std::map<int, Transform> & poses) {_poses = poses;}
246 void setConstraints(
const std::multimap<int, Link> & constraints) {_constraints = constraints;}
251 void setWeights(
const std::map<int, int> & weights) {_weights = weights;}
252 void setPosterior(
const std::map<int, float> & posterior) {_posterior = posterior;}
253 void setLikelihood(
const std::map<int, float> & likelihood) {_likelihood = likelihood;}
254 void setRawLikelihood(
const std::map<int, float> & rawLikelihood) {_rawLikelihood = rawLikelihood;}
255 void setLocalPath(
const std::vector<int> & localPath) {_localPath=localPath;}
257 void setReducedIds(
const std::map<int, int> & reducedIds) {_reducedIds = reducedIds;}
270 double stamp()
const {
return _stamp;}
275 const std::map<int, Transform> &
poses()
const {
return _poses;}
276 const std::multimap<int, Link> &
constraints()
const {
return _constraints;}
280 const std::map<int, std::string> &
labels()
const {
return _labels;}
281 const std::map<int, int> &
weights()
const {
return _weights;}
282 const std::map<int, float> &
posterior()
const {
return _posterior;}
283 const std::map<int, float> &
likelihood()
const {
return _likelihood;}
285 const std::vector<int> &
localPath()
const {
return _localPath;}
287 const std::map<int, int> &
reducedIds()
const {
return _reducedIds;}
288 const std::vector<int> &
wmState()
const {
return _wmState;}
289 const std::map<int, Transform> &
odomCachePoses()
const {
return _odomCachePoses;}
292 const std::map<std::string, float> &
data()
const {
return _data;}