mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
RTAB-Map : added localLoopClosureId for VSLAM use...
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@877 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -74,7 +74,7 @@ public:
|
||||
int getTotalMemSize() const;
|
||||
double getLastProcessTime() const {return _lastProcessTime;};
|
||||
std::multimap<int, cv::KeyPoint> getWords(int locationId) const;
|
||||
std::map<int, int> getNeighbors(int nodeId, int margin, bool lookInLTM = false) const;
|
||||
std::map<int, int> getNeighbors(int nodeId, int margin, bool lookInLTM = false) const;// <Id,Margin> including nodeId
|
||||
bool isInSTM(int locationId) const;
|
||||
const Statistics & getStatistics() const;
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ public:
|
||||
void setExtended(bool extended) {_extended = extended;}
|
||||
void setRefImageId(int refImageId) {_refImageId = refImageId;}
|
||||
void setLoopClosureId(int loopClosureId) {_loopClosureId = loopClosureId;}
|
||||
void setLocalLoopClosureId(int localLoopClosureId) {_localLoopClosureId = localLoopClosureId;}
|
||||
void setRefImage(const cv::Mat & image);
|
||||
void setLoopImage(const cv::Mat & image);
|
||||
void setWeights(const std::map<int, int> & weights) {_weights = weights;}
|
||||
@@ -102,6 +103,7 @@ public:
|
||||
bool extended() const {return _extended;}
|
||||
int refImageId() const {return _refImageId;}
|
||||
int loopClosureId() const {return _loopClosureId;}
|
||||
int localLoopClosureId() const {return _localLoopClosureId;}
|
||||
const cv::Mat & refImage() const {return _refImage;}
|
||||
const cv::Mat & loopImage() const {return _loopImage;}
|
||||
const std::map<int, int> & weights() const {return _weights;}
|
||||
@@ -118,6 +120,7 @@ private:
|
||||
|
||||
int _refImageId;
|
||||
int _loopClosureId;
|
||||
int _localLoopClosureId; // Note: used by VSLAM
|
||||
|
||||
// extended data start here...
|
||||
cv::Mat _refImage;
|
||||
|
||||
@@ -1618,7 +1618,7 @@ bool Memory::addLoopClosureLink(int oldId, int newId)
|
||||
|
||||
void Memory::dumpMemory(std::string directory) const
|
||||
{
|
||||
ULOGGER_DEBUG("");
|
||||
UINFO("Dumping memory to directory \"%s\"", directory.c_str());
|
||||
this->dumpDictionary((directory+"DumpMemoryWordRef.txt").c_str(), (directory+"DumpMemoryWordDesc.txt").c_str());
|
||||
this->dumpSignatures((directory + "DumpMemorySign.txt").c_str());
|
||||
this->dumpMemoryTree((directory + "DumpMemoryTree.txt").c_str());
|
||||
|
||||
@@ -1237,6 +1237,7 @@ void Rtabmap::process(const cv::Mat & image, int id)
|
||||
|
||||
void Rtabmap::dumpData() const
|
||||
{
|
||||
UDEBUG("");
|
||||
if(_memory)
|
||||
{
|
||||
_memory->dumpMemory(this->getWorkingDir());
|
||||
|
||||
@@ -33,7 +33,8 @@ const std::map<std::string, float> & Statistics::defaultData()
|
||||
Statistics::Statistics() :
|
||||
_extended(0),
|
||||
_refImageId(0),
|
||||
_loopClosureId(0)
|
||||
_loopClosureId(0),
|
||||
_localLoopClosureId(0)
|
||||
{
|
||||
_defaultDataInitialized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user