Added warning when requesting a path before beeing localized

This commit is contained in:
matlabbe
2016-08-31 12:43:54 -04:00
parent 79b51311bc
commit 2fb71445da
+4
View File
@@ -3487,6 +3487,10 @@ bool Rtabmap::computePath(int targetNode, bool global)
_path[oi++].second = t * iter->second; _path[oi++].second = t * iter->second;
} }
} }
else if(currentNode == 0)
{
UWARN("We should be localized before planning.");
}
} }
UINFO("Total planning time = %fs (%d nodes, %f m long)", totalTimer.ticks(), (int)_path.size(), graph::computePathLength(_path)); UINFO("Total planning time = %fs (%d nodes, %f m long)", totalTimer.ticks(), (int)_path.size(), graph::computePathLength(_path));