From 5483490aa3ef0fc8521447dd49a4de9f890830ec Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Sun, 15 Sep 2024 15:34:59 -0500 Subject: [PATCH] Update path.py (#1198) --- 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)