mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Retrieved data are now included in the rtabmap info message
Map transform is only defined with the last loop closure for localization mode: on loop closure between two maps, there is only a TORO link added between the locations (no need to keep the transform between the maps) git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1058 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -82,7 +82,6 @@ public:
|
||||
|
||||
// Load objects
|
||||
void load(VWDictionary * dictionary) const;
|
||||
void load(std::map<int, std::map<int, Transform> > & mapTransforms) const;
|
||||
void loadLastNodes(std::list<Signature *> & signatures) const;
|
||||
void loadSignatures(const std::list<int> & ids, std::list<Signature *> & signatures);
|
||||
void loadWords(const std::set<int> & wordIds, std::list<VisualWord *> & vws);
|
||||
@@ -99,7 +98,6 @@ public:
|
||||
void getLastNodeId(int & id) const;
|
||||
void getLastWordId(int & id) const;
|
||||
void getInvertedIndexNi(int signatureId, int & ni) const;
|
||||
void save(const std::map<int, std::map<int, Transform> > & mapTransforms) const;
|
||||
|
||||
protected:
|
||||
DBDriver(const ParametersMap & parameters = ParametersMap());
|
||||
@@ -118,12 +116,10 @@ private:
|
||||
virtual void saveQuery(const std::list<VisualWord *> & words) const = 0;
|
||||
virtual void updateQuery(const std::list<Signature *> & signatures) const = 0;
|
||||
virtual void updateQuery(const std::list<VisualWord *> & words) const = 0;
|
||||
virtual void saveQuery(const std::map<int, std::map<int, Transform> > & mapTransforms) const = 0;
|
||||
|
||||
|
||||
// Load objects
|
||||
virtual void loadQuery(VWDictionary * dictionary) const = 0;
|
||||
virtual void loadQuery(std::map<int, std::map<int, Transform> > & mapTransforms) const = 0;
|
||||
virtual void loadLastNodesQuery(std::list<Signature *> & signatures) const = 0;
|
||||
virtual void loadSignaturesQuery(const std::list<int> & ids, std::list<Signature *> & signatures) const = 0;
|
||||
virtual void loadWordsQuery(const std::set<int> & wordIds, std::list<VisualWord *> & vws) const = 0;
|
||||
|
||||
@@ -86,8 +86,6 @@ public:
|
||||
const std::set<int> & getWorkingMem() const {return _workingMem;}
|
||||
const std::set<int> & getStMem() const {return _stMem;}
|
||||
int getMaxStMemSize() const {return _maxStMemSize;}
|
||||
Transform getMapTransform(int sourceMapId, int targetMapId) const;
|
||||
void removeMapTransform(int soureId, int targetId);
|
||||
void getPose(int locationId,
|
||||
int targetMapId,
|
||||
Transform & pose,
|
||||
@@ -209,7 +207,6 @@ private:
|
||||
std::map<int, Signature *> _signatures; // TODO : check if a signature is already added? although it is not supposed to occur...
|
||||
std::set<int> _stMem; // id
|
||||
std::set<int> _workingMem; // id,age
|
||||
std::map<int, std::map<int, Transform> > _mapTransforms; // Transform between maps <fromMapId, <toMapId, transform> >
|
||||
|
||||
//Keypoint stuff
|
||||
VWDictionary * _vwd;
|
||||
|
||||
@@ -161,6 +161,7 @@ private:
|
||||
|
||||
std::map<int, Transform> _optimizedPoses;
|
||||
Transform _mapCorrection;
|
||||
Transform _mapTransform;
|
||||
};
|
||||
|
||||
#endif /* RTABMAP_H_ */
|
||||
|
||||
@@ -104,21 +104,16 @@ 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 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 setMapIds(const std::map<int, int> & mapIds) {_mapIds = mapIds;}
|
||||
void setImages(const std::map<int, std::vector<unsigned char> > & images) {_images = images;}
|
||||
void setDepths(const std::map<int, std::vector<unsigned char> > & depths) {_depths = depths;}
|
||||
void setDepth2ds(const std::map<int, std::vector<unsigned char> > & depth2ds) {_depth2ds = depth2ds;}
|
||||
void setDepthConstants(const std::map<int, float> & depthConstants) {_depthConstants = depthConstants;}
|
||||
void setLocalTransforms(const std::map<int, Transform> & localTransforms) {_localTransforms = localTransforms;}
|
||||
|
||||
void setPoses(const std::map<int, Transform> & poses) {_poses = poses;}
|
||||
void setCurrentPose(const Transform & pose) {_currentPose = pose;}
|
||||
void setMapCorrection(const Transform & mapCorrection) {_mapCorrection = mapCorrection;}
|
||||
@@ -133,21 +128,16 @@ 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;}
|
||||
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, int> & getMapIds() const {return _mapIds;}
|
||||
const std::map<int, std::vector<unsigned char> > & getImages() const {return _images;}
|
||||
const std::map<int, std::vector<unsigned char> > & getDepths() const {return _depths;}
|
||||
const std::map<int, std::vector<unsigned char> > & getDepth2ds() const {return _depth2ds;}
|
||||
const std::map<int, float> & getDepthConstants() const {return _depthConstants;}
|
||||
const std::map<int, Transform> & getLocalTransforms() const {return _localTransforms;}
|
||||
|
||||
const std::map<int, Transform> & poses() const {return _poses;}
|
||||
const Transform & currentPose() const {return _currentPose;}
|
||||
const Transform & mapCorrection() const {return _mapCorrection;}
|
||||
@@ -165,25 +155,18 @@ private:
|
||||
bool _extended; // 0 -> only loop closure and last signature ID fields are filled
|
||||
|
||||
int _refImageId;
|
||||
int _refImageMapId;
|
||||
int _loopClosureId;
|
||||
int _loopClosureMapId;
|
||||
int _localLoopClosureId;
|
||||
int _localLoopClosureMapId;
|
||||
|
||||
// extended data start here...
|
||||
std::vector<unsigned char> _refImage;
|
||||
std::vector<unsigned char> _loopImage;
|
||||
std::map<int, int> _mapIds;
|
||||
std::map<int, std::vector<unsigned char> > _images;
|
||||
|
||||
// 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, std::vector<unsigned char> > _depths;
|
||||
std::map<int, std::vector<unsigned char> > _depth2ds;
|
||||
std::map<int, float> _depthConstants;
|
||||
std::map<int, Transform> _localTransforms;
|
||||
|
||||
std::map<int, Transform> _poses;
|
||||
Transform _currentPose;
|
||||
|
||||
Reference in New Issue
Block a user