mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Fixed a crash when posterior is empty (on bad signature)
MainWindow: Show in console a neato example with the generated map git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@665 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -1021,7 +1021,8 @@ void Rtabmap::process()
|
||||
refWordsCount = signature->getWords().size();
|
||||
refUniqueWordsCount = uUniqueKeys(signature->getWords()).size();
|
||||
|
||||
float vpHypothesis = posterior.at(Memory::kIdVirtual);
|
||||
// Posterior is empty if a bad signature is detected
|
||||
float vpHypothesis = posterior.size()?posterior.at(Memory::kIdVirtual):0.0f;
|
||||
|
||||
// only prepare statistics if required or when there is a loop closure
|
||||
Statistics * stat = 0;
|
||||
|
||||
Reference in New Issue
Block a user