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)