mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Memory: Fixed all recent memory immunized when lastGlobalLoopClosure is 0. Notify plan failed (instead of success) when the target node id is not found.
This commit is contained in:
@@ -3243,8 +3243,7 @@ bool Rtabmap::computePath(int targetNode, bool global)
|
||||
setUserData(0, cv::Mat(1, int(goalStr.size()+1), CV_8SC1, (void *)goalStr.c_str()).clone());
|
||||
}
|
||||
updateGoalIndex();
|
||||
|
||||
return true;
|
||||
return _path.size() || _pathStatus > 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3450,6 +3449,8 @@ void Rtabmap::updateGoalIndex()
|
||||
}
|
||||
}
|
||||
// for the current index, only keep the newest virtual link
|
||||
// This will make sure that the path is still connected even
|
||||
// if the new signature is removed (e.g., because of a small displacement)
|
||||
UASSERT(_pathCurrentIndex < _path.size());
|
||||
const Signature * currentIndexS = _memory->getSignature(_path[_pathCurrentIndex].first);
|
||||
UASSERT(currentIndexS != 0);
|
||||
|
||||
Reference in New Issue
Block a user