mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 17:17:47 +08:00
Fixed default nearest neighbor approach for the dictionary when the parameter is not set.
rtabmap_gui parameters panel can be opened without rtabmap parameters set on ROS (only GUI parameters can be changed). Rtabmap: added getStatistics() method for convenience Rtabmap/Memory: added deleteLastLocation() method to remove the last location in the STM. git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@779 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -50,6 +50,7 @@ VWDictionary::VWDictionary(const ParametersMap & parameters) :
|
||||
_lastWordId(0),
|
||||
_nn(0)
|
||||
{
|
||||
this->setNNStrategy((NNStrategy)Parameters::defaultKpNNStrategy(), parameters);
|
||||
this->parseParameters(parameters);
|
||||
}
|
||||
|
||||
@@ -103,7 +104,9 @@ void VWDictionary::parseParameters(const ParametersMap & parameters)
|
||||
{
|
||||
nnStrategy = (NNStrategy)std::atoi((*iter).second.c_str());
|
||||
}
|
||||
|
||||
NNStrategy currentNNStrategy = this->nnStrategy();
|
||||
|
||||
if(!_nn || ( nnStrategy!=kNNUndef && (nnStrategy != currentNNStrategy) ) )
|
||||
{
|
||||
this->setNNStrategy(nnStrategy, parameters);
|
||||
|
||||
Reference in New Issue
Block a user