RTAB-Map 0.24.5
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Statistics.h
1/*
2Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef STATISTICS_H_
29#define STATISTICS_H_
30
31#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
32
33#include <opencv2/core/core.hpp>
34#if CV_MAJOR_VERSION < 5
35#include <opencv2/features2d/features2d.hpp>
36#else
37#include <opencv2/features.hpp>
38#endif
39#include <opencv2/imgproc/imgproc.hpp>
40#include <list>
41#include <vector>
42#include <rtabmap/core/Signature.h>
43#include <rtabmap/core/Link.h>
45
46namespace rtabmap {
47
69#define RTABMAP_STATS(PREFIX, NAME, UNIT) \
70 public: \
71 static std::string k##PREFIX##NAME() {return #PREFIX "/" #NAME "/" #UNIT;} \
72 private: \
73 class Dummy##PREFIX##NAME { \
74 public: \
75 Dummy##PREFIX##NAME() {if(!_defaultDataInitialized)_defaultData.insert(std::pair<std::string, float>(#PREFIX "/" #NAME "/" #UNIT, 0.0f));} \
76 }; \
77 Dummy##PREFIX##NAME dummy##PREFIX##NAME
78
107class RTABMAP_CORE_EXPORT Statistics
108{
109 RTABMAP_STATS(Loop, Id,); // Combined loop or proximity detection
110 RTABMAP_STATS(Loop, RejectedHypothesis,);
111 RTABMAP_STATS(Loop, Localization_delayed,); // Localization mode: localization accepted but not applied yet, waiting for another one (RGBD/MaxOdomCacheSize>0). RejectedHypothesis is also 1.
112 RTABMAP_STATS(Loop, Accepted_hypothesis_id,);
113 RTABMAP_STATS(Loop, Suppressed_hypothesis_id,);
114 RTABMAP_STATS(Loop, Highest_hypothesis_id,);
115 RTABMAP_STATS(Loop, Highest_hypothesis_value,);
116 RTABMAP_STATS(Loop, Vp_hypothesis,);
117 RTABMAP_STATS(Loop, Reactivate_id,);
118 RTABMAP_STATS(Loop, Hypothesis_ratio,);
119 RTABMAP_STATS(Loop, Hypothesis_reactivated,);
120 RTABMAP_STATS(Loop, Map_id,);
121 RTABMAP_STATS(Loop, Visual_words,);
122 RTABMAP_STATS(Loop, Visual_inliers,);
123 RTABMAP_STATS(Loop, Visual_inliers_ratio,);
124 RTABMAP_STATS(Loop, Visual_matches,);
125 RTABMAP_STATS(Loop, Visual_variance,);
126 RTABMAP_STATS(Loop, Distance_since_last_loc, m);
127 RTABMAP_STATS(Loop, Last_id,);
128 RTABMAP_STATS(Loop, Optimization_max_error, m);
129 RTABMAP_STATS(Loop, Optimization_max_error_ratio, );
130 RTABMAP_STATS(Loop, Optimization_max_ang_error, deg);
131 RTABMAP_STATS(Loop, Optimization_max_ang_error_ratio, );
132 RTABMAP_STATS(Loop, Optimization_error, );
133 RTABMAP_STATS(Loop, Optimization_iterations, );
134 RTABMAP_STATS(Loop, Optimization_max_error_from_id, );
135 RTABMAP_STATS(Loop, Optimization_max_error_to_id, );
136 RTABMAP_STATS(Loop, Optimization_max_ang_error_from_id, );
137 RTABMAP_STATS(Loop, Optimization_max_ang_error_to_id, );
138 RTABMAP_STATS(Loop, Optimization_max_error_removed_from_id, );
139 RTABMAP_STATS(Loop, Optimization_max_error_removed_to_id, );
140 RTABMAP_STATS(Loop, Optimization_max_error_removed_count, );
141 RTABMAP_STATS(Loop, Linear_variance,);
142 RTABMAP_STATS(Loop, Angular_variance,);
143 RTABMAP_STATS(Loop, Landmark_detected,);
144 RTABMAP_STATS(Loop, Landmark_detected_node_ref,);
145 RTABMAP_STATS(Loop, Landmark_normal_rejected,);
146 RTABMAP_STATS(Loop, Landmark_normal_error, deg);
147 RTABMAP_STATS(Loop, Visual_inliers_mean_dist,m);
148 RTABMAP_STATS(Loop, Visual_inliers_distribution,);
149 RTABMAP_STATS(Loop, Proximity_links_cleared,);
150 //Odom correction
151 RTABMAP_STATS(Loop, Odom_correction_norm, m);
152 RTABMAP_STATS(Loop, Odom_correction_angle, deg);
153 RTABMAP_STATS(Loop, Odom_correction_x, m);
154 RTABMAP_STATS(Loop, Odom_correction_y, m);
155 RTABMAP_STATS(Loop, Odom_correction_z, m);
156 RTABMAP_STATS(Loop, Odom_correction_roll, deg);
157 RTABMAP_STATS(Loop, Odom_correction_pitch, deg);
158 RTABMAP_STATS(Loop, Odom_correction_yaw, deg);
159 // Map to Odom
160 RTABMAP_STATS(Loop, MapToOdom_norm, m);
161 RTABMAP_STATS(Loop, MapToOdom_angle, deg);
162 RTABMAP_STATS(Loop, MapToOdom_x, m);
163 RTABMAP_STATS(Loop, MapToOdom_y, m);
164 RTABMAP_STATS(Loop, MapToOdom_z, m);
165 RTABMAP_STATS(Loop, MapToOdom_roll, deg);
166 RTABMAP_STATS(Loop, MapToOdom_pitch, deg);
167 RTABMAP_STATS(Loop, MapToOdom_yaw, deg);
168 // Map to Base
169 RTABMAP_STATS(Loop, MapToBase_x, m);
170 RTABMAP_STATS(Loop, MapToBase_y, m);
171 RTABMAP_STATS(Loop, MapToBase_z, m);
172 RTABMAP_STATS(Loop, MapToBase_roll, deg);
173 RTABMAP_STATS(Loop, MapToBase_pitch, deg);
174 RTABMAP_STATS(Loop, MapToBase_yaw, deg);
175 RTABMAP_STATS(Loop, MapToBase_lin_std, m);
176 RTABMAP_STATS(Loop, MapToBase_lin_var, m2);
177
178 RTABMAP_STATS(Proximity, Time_detections,);
179 RTABMAP_STATS(Proximity, Space_last_detection_id,);
180 RTABMAP_STATS(Proximity, Space_paths,);
181 RTABMAP_STATS(Proximity, Space_visual_paths_checked,);
182 RTABMAP_STATS(Proximity, Space_scan_paths_checked,);
183 RTABMAP_STATS(Proximity, Space_detections_added_visually,);
184 RTABMAP_STATS(Proximity, Space_detections_added_icp_multi,);
185 RTABMAP_STATS(Proximity, Space_detections_added_icp_global,);
186
187 RTABMAP_STATS(NeighborLinkRefining, Accepted,);
188 RTABMAP_STATS(NeighborLinkRefining, Inliers,);
189 RTABMAP_STATS(NeighborLinkRefining, ICP_inliers_ratio,);
190 RTABMAP_STATS(NeighborLinkRefining, ICP_rotation, rad);
191 RTABMAP_STATS(NeighborLinkRefining, ICP_translation, m);
192 RTABMAP_STATS(NeighborLinkRefining, ICP_complexity,);
193 RTABMAP_STATS(NeighborLinkRefining, Variance,);
194 RTABMAP_STATS(NeighborLinkRefining, Pts,);
195
196 RTABMAP_STATS(Memory, Working_memory_size,);
197 RTABMAP_STATS(Memory, Working_memory_inter_size,);
198 RTABMAP_STATS(Memory, Short_time_memory_size,);
199 RTABMAP_STATS(Memory, Short_time_memory_inter_size,);
200 RTABMAP_STATS(Memory, Database_memory_used, MB);
201 RTABMAP_STATS(Memory, Signatures_removed,);
202 RTABMAP_STATS(Memory, Immunized_globally,);
203 RTABMAP_STATS(Memory, Immunized_locally,);
204 RTABMAP_STATS(Memory, Immunized_locally_max,);
205 RTABMAP_STATS(Memory, Signatures_retrieved,);
206 RTABMAP_STATS(Memory, Images_buffered,);
207 RTABMAP_STATS(Memory, Rehearsal_sim,);
208 RTABMAP_STATS(Memory, Rehearsal_id,);
209 RTABMAP_STATS(Memory, Rehearsal_merged,);
210 RTABMAP_STATS(Memory, Local_graph_size,);
211 RTABMAP_STATS(Memory, Odom_cache_poses,);
212 RTABMAP_STATS(Memory, Odom_cache_links,);
213 RTABMAP_STATS(Memory, Small_movement,);
214 RTABMAP_STATS(Memory, Fast_movement,);
215 RTABMAP_STATS(Memory, New_landmark,);
216 RTABMAP_STATS(Memory, Odometry_variance_ang,);
217 RTABMAP_STATS(Memory, Odometry_variance_lin,);
218 RTABMAP_STATS(Memory, Distance_travelled, m);
219 RTABMAP_STATS(Memory, RAM_usage, MB);
220 RTABMAP_STATS(Memory, RAM_estimated, MB);
221 RTABMAP_STATS(Memory, Triangulated_points, );
222 RTABMAP_STATS(Memory, Closest_node_distance, m);
223 RTABMAP_STATS(Memory, Closest_node_angle, rad);
224
225 RTABMAP_STATS(Timing, Memory_update, ms);
226 RTABMAP_STATS(Timing, Neighbor_link_refining, ms);
227 RTABMAP_STATS(Timing, Proximity_by_time, ms);
228 RTABMAP_STATS(Timing, Proximity_by_space_search, ms);
229 RTABMAP_STATS(Timing, Proximity_by_space_visual, ms);
230 RTABMAP_STATS(Timing, Proximity_by_space, ms);
231 RTABMAP_STATS(Timing, Cleaning_neighbors, ms);
232 RTABMAP_STATS(Timing, Reactivation, ms);
233 RTABMAP_STATS(Timing, Add_loop_closure_link, ms);
234 RTABMAP_STATS(Timing, Map_optimization, ms);
235 RTABMAP_STATS(Timing, Likelihood_computation, ms);
236 RTABMAP_STATS(Timing, Posterior_computation, ms);
237 RTABMAP_STATS(Timing, Hypotheses_creation, ms);
238 RTABMAP_STATS(Timing, Hypotheses_validation, ms);
239 RTABMAP_STATS(Timing, Statistics_creation, ms);
240 RTABMAP_STATS(Timing, Memory_cleanup, ms);
241 RTABMAP_STATS(Timing, Total, ms);
242 RTABMAP_STATS(Timing, Forgetting, ms);
243 RTABMAP_STATS(Timing, Joining_trash, ms);
244 RTABMAP_STATS(Timing, Emptying_trash, ms);
245 RTABMAP_STATS(Timing, Finalizing_statistics, ms);
246 RTABMAP_STATS(Timing, RAM_estimation, ms);
247
248 RTABMAP_STATS(TimingMem, Pre_update, ms);
249 RTABMAP_STATS(TimingMem, Signature_creation, ms);
250 RTABMAP_STATS(TimingMem, Rehearsal, ms);
251 RTABMAP_STATS(TimingMem, Keypoints_detection, ms);
252 RTABMAP_STATS(TimingMem, Subpixel, ms);
253 RTABMAP_STATS(TimingMem, Stereo_correspondences, ms);
254 RTABMAP_STATS(TimingMem, Descriptors_extraction, ms);
255 RTABMAP_STATS(TimingMem, Rectification, ms);
256 RTABMAP_STATS(TimingMem, Keypoints_3D, ms);
257 RTABMAP_STATS(TimingMem, Keypoints_3D_motion, ms);
258 RTABMAP_STATS(TimingMem, Joining_dictionary_update, ms);
259 RTABMAP_STATS(TimingMem, Add_new_words, ms);
260 RTABMAP_STATS(TimingMem, Compressing_data, ms);
261 RTABMAP_STATS(TimingMem, Post_decimation, ms);
262 RTABMAP_STATS(TimingMem, Scan_filtering, ms);
263 RTABMAP_STATS(TimingMem, Occupancy_grid, ms);
264 RTABMAP_STATS(TimingMem, Markers_detection, ms);
265
266 RTABMAP_STATS(Keypoint, Dictionary_size, words);
267 RTABMAP_STATS(Keypoint, Current_frame, words);
268 RTABMAP_STATS(Keypoint, Indexed_words, words);
269 RTABMAP_STATS(Keypoint, Index_memory_usage, KB);
270
271 RTABMAP_STATS(Gt, Translational_rmse, m);
272 RTABMAP_STATS(Gt, Translational_mean, m);
273 RTABMAP_STATS(Gt, Translational_median, m);
274 RTABMAP_STATS(Gt, Translational_std, m);
275 RTABMAP_STATS(Gt, Translational_min, m);
276 RTABMAP_STATS(Gt, Translational_max, m);
277 RTABMAP_STATS(Gt, Rotational_rmse, deg);
278 RTABMAP_STATS(Gt, Rotational_mean, deg);
279 RTABMAP_STATS(Gt, Rotational_median, deg);
280 RTABMAP_STATS(Gt, Rotational_std, deg);
281 RTABMAP_STATS(Gt, Rotational_min, deg);
282 RTABMAP_STATS(Gt, Rotational_max, deg);
283 RTABMAP_STATS(Gt, Localization_linear_error, m);
284 RTABMAP_STATS(Gt, Localization_angular_error, deg);
285
286public:
295 static const std::map<std::string, float> & defaultData();
296
310 static std::string serializeData(const std::map<std::string, float> & data);
311
324 static std::map<std::string, float> deserializeData(const std::string & data);
325
326public:
336
340 virtual ~Statistics();
341
357 void addStatistic(const std::string & name, float value);
358
359 // setters
360
370 void setExtended(bool extended) {_extended = extended;}
371
376 void setRefImageId(int id) {_refImageId = id;}
377
382 void setRefImageMapId(int id) {_refImageMapId = id;}
383
388 void setLoopClosureId(int id) {_loopClosureId = id;}
389
394 void setLoopClosureMapId(int id) {_loopClosureMapId = id;}
395
400 void setProximityDetectionId(int id) {_proximiyDetectionId = id;}
401
406 void setProximityDetectionMapId(int id) {_proximiyDetectionMapId = id;}
407
412 void setStamp(double stamp) {_stamp = stamp;}
413
421 RTABMAP_DEPRECATED void setLastSignatureData(const Signature & data);
422
433 void addSignatureData(const Signature & data) {uInsert(_signaturesData, std::make_pair(data.id(), data));}
434
439 void setSignaturesData(const std::map<int, Signature> & data) {_signaturesData = data;}
440
449 void setPoses(const std::map<int, Transform> & poses) {_poses = poses;}
450
459 void setConstraints(const std::multimap<int, Link> & constraints) {_constraints = constraints;}
460
470 void setMapCorrection(const Transform & mapCorrection) {_mapCorrection = mapCorrection;}
471
486 void setLoopClosureTransform(const Transform & loopClosureTransform) {_loopClosureTransform = loopClosureTransform;}
487
495 void setLocalizationCovariance(const cv::Mat & covariance) {_localizationCovariance = covariance;}
496
501 void setLabels(const std::map<int, std::string> & labels) {_labels = labels;}
502
507 void setWeights(const std::map<int, int> & weights) {_weights = weights;}
508
514 void setPosterior(const std::map<int, float> & posterior) {_posterior = posterior;}
515
523 void setLikelihood(const std::map<int, float> & likelihood) {_likelihood = likelihood;}
524
529 void setRawLikelihood(const std::map<int, float> & rawLikelihood) {_rawLikelihood = rawLikelihood;}
530
538 void setLocalPath(const std::vector<int> & localPath) {_localPath=localPath;}
539
544 void setCurrentGoalId(int goal) {_currentGoalId=goal;}
545
553 void setReducedIds(const std::map<int, int> & reducedIds) {_reducedIds = reducedIds;}
554
562 void setWmState(const std::vector<int> & state) {_wmState = state;}
563
571 void setOdomCachePoses(const std::map<int, Transform> & poses) {_odomCachePoses = poses;}
572
580 void setOdomCacheConstraints(const std::multimap<int, Link> & constraints) {_odomCacheConstraints = constraints;}
581
582 // getters
583
588 bool extended() const {return _extended;}
589
594 int refImageId() const {return _refImageId;}
595
600 int refImageMapId() const {return _refImageMapId;}
601
606 int loopClosureId() const {return _loopClosureId;}
607
612 int loopClosureMapId() const {return _loopClosureMapId;}
613
618 int proximityDetectionId() const {return _proximiyDetectionId;}
619
624 int proximityDetectionMapId() const {return _proximiyDetectionMapId;}
625
630 double stamp() const {return _stamp;}
631
640 const Signature & getLastSignatureData() const {return _signaturesData.empty()?_dummyEmptyData:_signaturesData.rbegin()->second;}
641
646 const std::map<int, Signature> & getSignaturesData() const {return _signaturesData;}
647
652 const std::map<int, Transform> & poses() const {return _poses;}
653
658 const std::multimap<int, Link> & constraints() const {return _constraints;}
659
667 const Transform & mapCorrection() const {return _mapCorrection;}
668
673 const Transform & loopClosureTransform() const {return _loopClosureTransform;}
674
679 const cv::Mat & localizationCovariance() const {return _localizationCovariance;}
680
685 const std::map<int, std::string> & labels() const {return _labels;}
686
691 const std::map<int, int> & weights() const {return _weights;}
692
697 const std::map<int, float> & posterior() const {return _posterior;}
698
703 const std::map<int, float> & likelihood() const {return _likelihood;}
704
709 const std::map<int, float> & rawLikelihood() const {return _rawLikelihood;}
710
715 const std::vector<int> & localPath() const {return _localPath;}
716
721 int currentGoalId() const {return _currentGoalId;}
722
727 const std::map<int, int> & reducedIds() const {return _reducedIds;}
728
733 const std::vector<int> & wmState() const {return _wmState;}
734
739 const std::map<int, Transform> & odomCachePoses() const {return _odomCachePoses;}
740
745 const std::multimap<int, Link> & odomCacheConstraints() const {return _odomCacheConstraints;}
746
758 const std::map<std::string, float> & data() const {return _data;}
759
760private:
761 bool _extended;
762
763 int _refImageId;
764 int _refImageMapId;
765 int _loopClosureId;
766 int _loopClosureMapId;
767 int _proximiyDetectionId;
768 int _proximiyDetectionMapId;
769 double _stamp;
770
771 std::map<int, Signature> _signaturesData;
772 Signature _dummyEmptyData;
773
774 std::map<int, Transform> _poses;
775 std::multimap<int, Link> _constraints;
776 Transform _mapCorrection;
777 Transform _loopClosureTransform;
778 cv::Mat _localizationCovariance;
779
780 std::map<int, std::string> _labels;
781 std::map<int, int> _weights;
782 std::map<int, float> _posterior;
783 std::map<int, float> _likelihood;
784 std::map<int, float> _rawLikelihood;
785
786 std::vector<int> _localPath;
787 int _currentGoalId;
788
789 std::map<int, int> _reducedIds;
790
791 std::vector<int> _wmState;
792
793 std::map<int, Transform> _odomCachePoses;
794 std::multimap<int, Link> _odomCacheConstraints;
795
805 std::map<std::string, float> _data;
806
807 static std::map<std::string, float> _defaultData;
808 static bool _defaultDataInitialized;
809 // end extended data
810};
811
812}// end namespace rtabmap
813
814#endif /* STATISTICS_H_ */
Wrappers of STL for convenient functions.
void uInsert(std::map< K, V > &map, const std::pair< K, V > &pair)
Definition UStl.h:441
Three-tiered memory management (STM, WM, LTM) for RTAB-Map.
Definition Memory.h:102
Represents a node in RTAB-Map's pose graph.
Definition Signature.h:84
int id() const
Returns the signature ID.
Definition Signature.h:168
Collects and manages runtime statistics for RTAB-Map.
Definition Statistics.h:108
int proximityDetectionId() const
Returns the proximity detection ID.
Definition Statistics.h:618
const std::vector< int > & wmState() const
Returns the working memory state.
Definition Statistics.h:733
void setStamp(double stamp)
Sets the timestamp for these statistics.
Definition Statistics.h:412
static std::map< std::string, float > deserializeData(const std::string &data)
Deserializes a statistics data map from a string.
void setLoopClosureId(int id)
Sets the loop closure detection ID.
Definition Statistics.h:388
int loopClosureMapId() const
Returns the loop closure map ID.
Definition Statistics.h:612
bool extended() const
Returns whether extended statistics mode is enabled.
Definition Statistics.h:588
void setRawLikelihood(const std::map< int, float > &rawLikelihood)
Sets raw likelihood values (before normalization)
Definition Statistics.h:529
double stamp() const
Returns the timestamp.
Definition Statistics.h:630
void addStatistic(const std::string &name, float value)
Adds a statistic value to the data map.
void setProximityDetectionId(int id)
Sets the proximity detection ID.
Definition Statistics.h:400
const std::multimap< int, Link > & constraints() const
Returns the constraint graph.
Definition Statistics.h:658
const Transform & loopClosureTransform() const
Returns the loop closure transform.
Definition Statistics.h:673
void setRefImageMapId(int id)
Sets the reference image map ID.
Definition Statistics.h:382
void setLoopClosureMapId(int id)
Sets the loop closure map ID.
Definition Statistics.h:394
void setLocalPath(const std::vector< int > &localPath)
Sets the local path (sequence of node IDs)
Definition Statistics.h:538
const std::multimap< int, Link > & odomCacheConstraints() const
Returns odometry cache constraints.
Definition Statistics.h:745
int refImageMapId() const
Returns the reference image map ID.
Definition Statistics.h:600
const std::map< int, float > & rawLikelihood() const
Returns raw likelihood values.
Definition Statistics.h:709
int refImageId() const
Returns the reference image ID.
Definition Statistics.h:594
const cv::Mat & localizationCovariance() const
Returns the localization covariance matrix.
Definition Statistics.h:679
const std::map< int, float > & likelihood() const
Returns likelihood values.
Definition Statistics.h:703
void setRefImageId(int id)
Sets the reference image ID (current/last processed signature ID)
Definition Statistics.h:376
void addSignatureData(const Signature &data)
Adds signature data to the statistics.
Definition Statistics.h:433
const Signature & getLastSignatureData() const
Returns the last signature data.
Definition Statistics.h:640
void setProximityDetectionMapId(int id)
Sets the proximity detection map ID.
Definition Statistics.h:406
Statistics()
Default constructor.
void setOdomCachePoses(const std::map< int, Transform > &poses)
Sets odometry cache poses.
Definition Statistics.h:571
void setMapCorrection(const Transform &mapCorrection)
Sets the map correction transform.
Definition Statistics.h:470
int loopClosureId() const
Returns the loop closure detection ID.
Definition Statistics.h:606
void setLocalizationCovariance(const cv::Mat &covariance)
Sets the localization covariance matrix.
Definition Statistics.h:495
const Transform & mapCorrection() const
Returns the map correction transform.
Definition Statistics.h:667
const std::vector< int > & localPath() const
Returns the local path.
Definition Statistics.h:715
void setCurrentGoalId(int goal)
Sets the current goal node ID.
Definition Statistics.h:544
void setLikelihood(const std::map< int, float > &likelihood)
Sets likelihood values for loop closure hypotheses.
Definition Statistics.h:523
const std::map< int, int > & reducedIds() const
Returns the reduced IDs mapping.
Definition Statistics.h:727
const std::map< int, Transform > & odomCachePoses() const
Returns odometry cache poses.
Definition Statistics.h:739
void setPosterior(const std::map< int, float > &posterior)
Sets posterior probabilities for loop closure hypotheses.
Definition Statistics.h:514
static const std::map< std::string, float > & defaultData()
Returns the default statistics data map.
void setWeights(const std::map< int, int > &weights)
Sets node weights.
Definition Statistics.h:507
void setExtended(bool extended)
Sets whether extended statistics mode is enabled.
Definition Statistics.h:370
void setWmState(const std::vector< int > &state)
Sets the working memory state.
Definition Statistics.h:562
void setLabels(const std::map< int, std::string > &labels)
Sets node labels.
Definition Statistics.h:501
const std::map< int, int > & weights() const
Returns node weights.
Definition Statistics.h:691
static std::string serializeData(const std::map< std::string, float > &data)
Serializes a statistics data map to a string.
const std::map< std::string, float > & data() const
Returns the statistics data map.
Definition Statistics.h:758
const std::map< int, Signature > & getSignaturesData() const
Returns all signature data.
Definition Statistics.h:646
void setReducedIds(const std::map< int, int > &reducedIds)
Sets the reduced IDs mapping.
Definition Statistics.h:553
void setLoopClosureTransform(const Transform &loopClosureTransform)
Sets the loop closure transform.
Definition Statistics.h:486
void setConstraints(const std::multimap< int, Link > &constraints)
Sets the constraint graph (links between nodes)
Definition Statistics.h:459
const std::map< int, float > & posterior() const
Returns posterior probabilities.
Definition Statistics.h:697
const std::map< int, Transform > & poses() const
Returns the pose graph.
Definition Statistics.h:652
void setPoses(const std::map< int, Transform > &poses)
Sets the pose graph (node poses)
Definition Statistics.h:449
void setSignaturesData(const std::map< int, Signature > &data)
Sets all signature data at once.
Definition Statistics.h:439
int currentGoalId() const
Returns the current goal node ID.
Definition Statistics.h:721
void setOdomCacheConstraints(const std::multimap< int, Link > &constraints)
Sets odometry cache constraints.
Definition Statistics.h:580
RTABMAP_DEPRECATED void setLastSignatureData(const Signature &data)
Sets the last signature data (deprecated)
int proximityDetectionMapId() const
Returns the proximity detection map ID.
Definition Statistics.h:624
virtual ~Statistics()
Virtual destructor.
const std::map< int, std::string > & labels() const
Returns node labels.
Definition Statistics.h:685
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53