Using fly distance instead of path distance to update the farthest goals

This commit is contained in:
matlabbe
2016-07-08 19:22:48 -04:00
parent 9dfc7801a0
commit 61f6e5ff79

View File

@@ -3787,7 +3787,7 @@ void Rtabmap::updateGoalIndex()
{
if(_localRadius > 0.0f)
{
distanceFromCurrentNode += _path[i-1].second.getDistance(_path[i].second);
distanceFromCurrentNode = _path[_pathCurrentIndex].second.getDistance(_path[i].second);
}
if((goalIndex == _pathCurrentIndex && i == _path.size()-1) ||