mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 01:57:45 +08:00
Merged pcl_integration branch to trunk
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1014 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <rtabmap/core/Transform.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
@@ -48,17 +49,30 @@ class RTABMAP_EXP Statistics
|
||||
RTABMAP_STATS(Loop, Vp_hypothesis,);
|
||||
RTABMAP_STATS(Loop, ReactivateId,);
|
||||
RTABMAP_STATS(Loop, Hypothesis_ratio,);
|
||||
RTABMAP_STATS(Loop, Hypothesis_reactivated,);
|
||||
|
||||
RTABMAP_STATS(LocalLoop, Scan_matching_success,);
|
||||
RTABMAP_STATS(LocalLoop, Time_closures,);
|
||||
RTABMAP_STATS(LocalLoop, Space_closure_id,);
|
||||
RTABMAP_STATS(LocalLoop, Space_neighbors,);
|
||||
|
||||
RTABMAP_STATS(Memory, Working_memory_size,);
|
||||
RTABMAP_STATS(Memory, Short_time_memory_size,);
|
||||
RTABMAP_STATS(Memory, Signatures_removed,);
|
||||
RTABMAP_STATS(Memory, Signatures_retrieved,);
|
||||
RTABMAP_STATS(Memory, Images_buffered,);
|
||||
RTABMAP_STATS(Memory, Rehearsal_sim,);
|
||||
RTABMAP_STATS(Memory, Rehearsal_merged,);
|
||||
RTABMAP_STATS(Memory, Last_loop_closure,);
|
||||
|
||||
RTABMAP_STATS(Timing, Memory_update, ms);
|
||||
RTABMAP_STATS(Timing, Scan_matching, ms);
|
||||
RTABMAP_STATS(Timing, Local_detection_TIME, ms);
|
||||
RTABMAP_STATS(Timing, Local_detection_SPACE, ms);
|
||||
RTABMAP_STATS(Timing, Cleaning_neighbors, ms);
|
||||
RTABMAP_STATS(Timing, Reactivation, ms);
|
||||
RTABMAP_STATS(Timing, Add_loop_closure_link, ms);
|
||||
RTABMAP_STATS(Timing, Map_optimization, ms);
|
||||
RTABMAP_STATS(Timing, Likelihood_computation, ms);
|
||||
RTABMAP_STATS(Timing, Posterior_computation, ms);
|
||||
RTABMAP_STATS(Timing, Hypotheses_creation, ms);
|
||||
@@ -70,7 +84,9 @@ class RTABMAP_EXP Statistics
|
||||
RTABMAP_STATS(Timing, Joining_trash, ms);
|
||||
RTABMAP_STATS(Timing, Emptying_trash, ms);
|
||||
|
||||
RTABMAP_STATS(, Hypothesis_reactivated,);
|
||||
RTABMAP_STATS(TimingMem, Pre_update, ms);
|
||||
RTABMAP_STATS(TimingMem, Signature_creation, ms);
|
||||
RTABMAP_STATS(TimingMem, Rehearsal, ms);
|
||||
|
||||
RTABMAP_STATS(Keypoint, Dictionary_size, words);
|
||||
RTABMAP_STATS(Keypoint, Response_threshold,);
|
||||
@@ -88,10 +104,25 @@ public:
|
||||
// setters
|
||||
void setExtended(bool extended) {_extended = extended;}
|
||||
void setRefImageId(int refImageId) {_refImageId = refImageId;}
|
||||
void setRefImageMapId(int refImageMapId) {_refImageMapId = refImageMapId;}
|
||||
void setLoopClosureId(int loopClosureId) {_loopClosureId = loopClosureId;}
|
||||
void setLoopClosureMapId(int loopClosureMapId) {_loopClosureMapId = loopClosureMapId;}
|
||||
void setLocalLoopClosureId(int localLoopClosureId) {_localLoopClosureId = localLoopClosureId;}
|
||||
void setRefImage(const cv::Mat & image);
|
||||
void setLoopImage(const cv::Mat & image);
|
||||
void setLocalLoopClosureMapId(int localLoopClosureMapId) {_localLoopClosureMapId = localLoopClosureMapId;}
|
||||
void setRefImage(const std::vector<unsigned char> & image) {_refImage = image;}
|
||||
void setLoopImage(const std::vector<unsigned char> & image) {_loopImage = image;}
|
||||
void setRefDepth(const std::vector<unsigned char> & depth) {_refDepth = depth;}
|
||||
void setRefDepth2D(const std::vector<unsigned char> & depth2d) {_refDepth2d = depth2d;}
|
||||
void setLoopDepth(const std::vector<unsigned char> & depth) {_loopDepth = depth;}
|
||||
void setLoopDepth2D(const std::vector<unsigned char> & depth2d) {_loopDepth2d = depth2d;}
|
||||
void setRefDepthConstant(float depthConstant) {_refDepthConstant = depthConstant;}
|
||||
void setLoopDepthConstant(float depthConstant) {_loopDepthConstant = depthConstant;}
|
||||
void setRefLocalTransform(const Transform & localTransform) {_refLocalTransform = localTransform;}
|
||||
void setLoopLocalTransform(const Transform & localTransform) {_loopLocalTransform = localTransform;}
|
||||
void setPoses(const std::map<int, Transform> & poses) {_poses = poses;}
|
||||
void setCurrentPose(const Transform & pose) {_currentPose = pose;}
|
||||
void setMapCorrection(const Transform & mapCorrection) {_mapCorrection = mapCorrection;}
|
||||
void setLoopClosureTransform(const Transform & loopClosureTransform) {_loopClosureTransform = loopClosureTransform;}
|
||||
void setWeights(const std::map<int, int> & weights) {_weights = weights;}
|
||||
void setPosterior(const std::map<int, float> & posterior) {_posterior = posterior;}
|
||||
void setLikelihood(const std::map<int, float> & likelihood) {_likelihood = likelihood;}
|
||||
@@ -102,10 +133,25 @@ public:
|
||||
// getters
|
||||
bool extended() const {return _extended;}
|
||||
int refImageId() const {return _refImageId;}
|
||||
int refImageMapId() const {return _refImageMapId;}
|
||||
int loopClosureId() const {return _loopClosureId;}
|
||||
int loopClosureMapId() const {return _loopClosureMapId;}
|
||||
int localLoopClosureId() const {return _localLoopClosureId;}
|
||||
const cv::Mat & refImage() const {return _refImage;}
|
||||
const cv::Mat & loopImage() const {return _loopImage;}
|
||||
int localLoopClosureMapId() const {return _localLoopClosureMapId;}
|
||||
const std::vector<unsigned char> & refImage() const {return _refImage;}
|
||||
const std::vector<unsigned char> & loopImage() const {return _loopImage;}
|
||||
const std::vector<unsigned char> & refDepth() const {return _refDepth;}
|
||||
const std::vector<unsigned char> & loopDepth() const {return _loopDepth;}
|
||||
const std::vector<unsigned char> & refDepth2D() const {return _refDepth2d;}
|
||||
const std::vector<unsigned char> & loopDepth2D() const {return _loopDepth2d;}
|
||||
float refDepthConstant() const {return _refDepthConstant;}
|
||||
float loopDepthConstant() const {return _loopDepthConstant;}
|
||||
const Transform & refLocalTransform() const {return _refLocalTransform;}
|
||||
const Transform & loopLocalTransform() const {return _loopLocalTransform;}
|
||||
const std::map<int, Transform> & poses() const {return _poses;}
|
||||
const Transform & currentPose() const {return _currentPose;}
|
||||
const Transform & mapCorrection() const {return _mapCorrection;}
|
||||
const Transform & loopClosureTransform() const {return _loopClosureTransform;}
|
||||
const std::map<int, int> & weights() const {return _weights;}
|
||||
const std::map<int, float> & posterior() const {return _posterior;}
|
||||
const std::map<int, float> & likelihood() const {return _likelihood;}
|
||||
@@ -116,15 +162,33 @@ public:
|
||||
const std::map<std::string, float> & data() const {return _data;}
|
||||
|
||||
private:
|
||||
int _extended; // 0 -> only loop closure and last signature ID fields are filled
|
||||
bool _extended; // 0 -> only loop closure and last signature ID fields are filled
|
||||
|
||||
int _refImageId;
|
||||
int _refImageMapId;
|
||||
int _loopClosureId;
|
||||
int _localLoopClosureId; // Note: used by VSLAM
|
||||
int _loopClosureMapId;
|
||||
int _localLoopClosureId;
|
||||
int _localLoopClosureMapId;
|
||||
|
||||
// extended data start here...
|
||||
cv::Mat _refImage;
|
||||
cv::Mat _loopImage;
|
||||
std::vector<unsigned char> _refImage;
|
||||
std::vector<unsigned char> _loopImage;
|
||||
|
||||
// Metric data
|
||||
std::vector<unsigned char> _refDepth;
|
||||
std::vector<unsigned char> _refDepth2d;
|
||||
std::vector<unsigned char> _loopDepth;
|
||||
std::vector<unsigned char> _loopDepth2d;
|
||||
float _refDepthConstant;
|
||||
float _loopDepthConstant;
|
||||
Transform _refLocalTransform;
|
||||
Transform _loopLocalTransform;
|
||||
|
||||
std::map<int, Transform> _poses;
|
||||
Transform _currentPose;
|
||||
Transform _mapCorrection;
|
||||
Transform _loopClosureTransform;
|
||||
|
||||
std::map<int, int> _weights;
|
||||
std::map<int, float> _posterior;
|
||||
|
||||
Reference in New Issue
Block a user