Protected public rtabmap methods with a mutex (to be safe to call when rtabmap thread is started)

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@734 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2013-01-15 16:43:40 +00:00
parent 0452aec181
commit 1041ddd8a5
3 changed files with 61 additions and 43 deletions

View File

@@ -85,18 +85,24 @@ public:
const std::string & getWorkingDir() const {return _wDir;}
int getLoopClosureId() const;
int getRetrievedId() const;
int getLastLocationId() const;
int getLastLocationId();
float getLcHypValue() const {return _lastLcHypothesisValue;}
std::list<int> getWM() const; // working memory
std::set<int> getSTM() const; // short-term memory
int getWMSize() const; // working memory size
int getSTMSize() const; // short-term memory size
std::map<int, int> getWeights() const;
int getTotalMemSize() const;
std::list<int> getWM(); // working memory
std::set<int> getSTM(); // short-term memory
int getWMSize(); // working memory size
int getSTMSize(); // short-term memory size
std::map<int, int> getWeights();
int getTotalMemSize();
double getLastProcessTime() const {return _lastProcessTime;};
void setTimeThreshold(float maxTimeAllowed); // in ms
void generateGraph(const std::string & path) const;
void generateGraph(const std::string & path);
void resetMemory(bool dbOverwritten = false);
void dumpPrediction();
void dumpData();
void updateParameters(const ParametersMap & parameters);
void setWorkingDirectory(std::string path);
void adjustLikelihood(std::map<int, float> & likelihood) const;
std::pair<int, float> selectHypothesis(const std::map<int, float> & posterior,
@@ -110,18 +116,14 @@ private:
virtual void mainLoopKill();
virtual void mainLoopBegin();
void process();
void resetMemory(bool dbOverwritten = false);
void addImage(const Image & image);
void getImage(Image & image);
void setupLogFiles(bool overwrite = false);
void flushStatisticLogs();
void releaseAllStrategies();
void pushNewState(State newState, const ParametersMap & parameters = ParametersMap());
void dumpPrediction() const;
void dumpData();
void generateLocalGraph(const std::string & path, int id, int margin);
void parseParameters(const ParametersMap & parameters);
void setWorkingDirectory(std::string path);
void setDataBufferSize(int size);
private:
@@ -154,6 +156,8 @@ private:
UMutex _imageMutex;
USemaphore _imageAdded;
UMutex _threadMutex;
// Abstract classes containing all loop closure
// strategies for a type of signature or configuration.
EpipolarGeometry * _epipolarGeometry;