From ca9e303174778ee69f81aa91f626a22f1777a5de Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Sat, 14 Sep 2024 16:36:09 -0700 Subject: [PATCH] Update path.py --- donkeycar/parts/path.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/donkeycar/parts/path.py b/donkeycar/parts/path.py index c0bd4985c..83735f821 100644 --- a/donkeycar/parts/path.py +++ b/donkeycar/parts/path.py @@ -364,17 +364,17 @@ def nearest_waypoints(self, path, x, y, look_ahead=1, look_behind=1, from_pt=0, """ if path is None or len(path) < 2: logging.error("path is none; cannot calculate nearest points") - return None, None + return None, None, None if look_ahead < 0: logging.error("look_ahead must be a non-negative number") - return None, None + return None, None, None if look_behind < 0: logging.error("look_behind must be a non-negative number") - return None, None + return None, None, None if (look_ahead + look_behind) > len(path): logging.error("the path is not long enough to supply the waypoints") - return None, None + return None, None, None _pt, i, _distance = self.nearest_pt(path, x, y, from_pt, num_pts)