Fixed minroa gent error

This commit is contained in:
Guillermo 2021-07-30 12:55:36 +02:00 committed by bernat
parent dca7cc3f8d
commit 301445eb35
1 changed files with 7 additions and 3 deletions

View File

@ -85,12 +85,16 @@ def is_within_distance(target_transform, reference_transform, max_distance, angl
if norm_target < 0.001: if norm_target < 0.001:
return True return True
# Further than the max distance
if norm_target > max_distance: if norm_target > max_distance:
return False return False
if angle_interval: # We don't care about the angle, nothing else to check
min_angle = angle_interval[0] if not angle_interval:
max_angle = angle_interval[1] return True
min_angle = angle_interval[0]
max_angle = angle_interval[1]
fwd = reference_transform.get_forward_vector() fwd = reference_transform.get_forward_vector()
forward_vector = np.array([fwd.x, fwd.y]) forward_vector = np.array([fwd.x, fwd.y])