mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Added Debug log in incremental FLANN stuff (to track a crashing bug)
This commit is contained in:
@@ -252,12 +252,13 @@ protected:
|
||||
*/
|
||||
void buildIndexImpl()
|
||||
{
|
||||
UDEBUG("");
|
||||
// Create a permutable array of indices to the input vectors.
|
||||
std::vector<int> ind(size_);
|
||||
for (size_t i = 0; i < size_; ++i) {
|
||||
ind[i] = int(i);
|
||||
}
|
||||
|
||||
UDEBUG("");
|
||||
mean_ = new DistanceType[veclen_];
|
||||
var_ = new DistanceType[veclen_];
|
||||
|
||||
@@ -268,8 +269,10 @@ protected:
|
||||
std::random_shuffle(ind.begin(), ind.end());
|
||||
tree_roots_[i] = divideTree(&ind[0], int(size_) );
|
||||
}
|
||||
UDEBUG("");
|
||||
delete[] mean_;
|
||||
delete[] var_;
|
||||
UDEBUG("");
|
||||
}
|
||||
|
||||
void freeIndex()
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "rtflann/util/result_set.h"
|
||||
#include "rtflann/util/dynamic_bitset.h"
|
||||
#include "rtflann/util/saving.h"
|
||||
#include "rtabmap/utilite/ULogger.h"
|
||||
|
||||
namespace rtflann
|
||||
{
|
||||
@@ -124,12 +125,15 @@ public:
|
||||
*/
|
||||
virtual void buildIndex()
|
||||
{
|
||||
UDEBUG("");
|
||||
freeIndex();
|
||||
UDEBUG("");
|
||||
cleanRemovedPoints();
|
||||
UDEBUG("");
|
||||
|
||||
// building index
|
||||
buildIndexImpl();
|
||||
|
||||
UDEBUG("");
|
||||
size_at_build_ = size_;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user