mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
RtabmapThread: changed state stack for a queue to process events in FIFO order (instead of FILO). Tango: Added detector type parameter (FREAK is now the default with 400 features).
This commit is contained in:
@@ -40,7 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/Parameters.h"
|
||||
#include "rtabmap/core/OdometryEvent.h"
|
||||
|
||||
#include <stack>
|
||||
#include <queue>
|
||||
|
||||
class UTimer;
|
||||
|
||||
@@ -106,8 +106,8 @@ private:
|
||||
|
||||
private:
|
||||
UMutex _stateMutex;
|
||||
std::stack<State> _state;
|
||||
std::stack<ParametersMap> _stateParam;
|
||||
std::queue<State> _state;
|
||||
std::queue<ParametersMap> _stateParam;
|
||||
|
||||
std::list<OdometryEvent> _dataBuffer;
|
||||
UMutex _dataMutex;
|
||||
|
||||
@@ -466,7 +466,7 @@ void Memory::parseParameters(const ParametersMap & parameters)
|
||||
}
|
||||
if(detectorStrategy!=Feature2D::kFeatureUndef)
|
||||
{
|
||||
UDEBUG("new detector strategy %d", int(detectorStrategy));
|
||||
UWARN("new detector strategy %d", int(detectorStrategy));
|
||||
if(_feature2D)
|
||||
{
|
||||
delete _feature2D;
|
||||
|
||||
@@ -195,9 +195,9 @@ void RtabmapThread::mainLoop()
|
||||
{
|
||||
if(!_state.empty() && !_stateParam.empty())
|
||||
{
|
||||
state = _state.top();
|
||||
state = _state.front();
|
||||
_state.pop();
|
||||
parameters = _stateParam.top();
|
||||
parameters = _stateParam.front();
|
||||
_stateParam.pop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user