Avoid false positives in path recovery
This commit is contained in:
1 parent
ebf325f48b
commit
777018d24b
3 files changed
+9
-24
No files matched your search
+1
-5
@@ -137,13 +137,9 @@ def _recover_invalid_path(g, now=None):
|
||||
g.navigation_retry_at = 0.0
|
||||
if now >= g.get('path_validation_at', 0.0):
|
||||
g.path_validation_at = now + PATH_VALIDATION_INTERVAL
|
||||
start = utils.pint(g.pos)
|
||||
skip_first_edge = (not g.get('on_ground', True) or
|
||||
bool(g.get('y_v')))
|
||||
try:
|
||||
valid, invalid_node = path.Pathfinder(g).path_prefix_is_valid(
|
||||
start, route, steps=2,
|
||||
skip_start_edge=skip_first_edge)
|
||||
route, steps=2)
|
||||
except path.AStarTimeout:
|
||||
valid, invalid_node = True, None
|
||||
if not valid:
|
||||
|
||||
Reference in new issue
Block a user