diff --git a/f1tenth_gym/envs/track/cubic_spline.py b/f1tenth_gym/envs/track/cubic_spline.py index c14e41c9..fd61e644 100644 --- a/f1tenth_gym/envs/track/cubic_spline.py +++ b/f1tenth_gym/envs/track/cubic_spline.py @@ -114,7 +114,7 @@ def calc_position(self, s: float) -> tuple[Union[float, None], Union[float, None """ return self.spline(s) - def calc_curvature(self, s: float) -> float | None: + def calc_curvature(self, s: float) -> Union[float , None]: """ Calc curvature at the given s. @@ -134,7 +134,7 @@ def calc_curvature(self, s: float) -> float | None: k = (ddy * dx - ddx * dy) / ((dx**2 + dy**2) ** (3 / 2)) return k - def calc_yaw(self, s: float) -> float | None: + def calc_yaw(self, s: float) -> Union[float, None]: """ Calc yaw angle at the given s.