From 4dbd5b0a5e26dd2659f87d0ee70c8712983976ef Mon Sep 17 00:00:00 2001 From: Mehul Goel Date: Wed, 26 Jun 2024 16:48:10 -0700 Subject: [PATCH] Added typings --- rb_ws/src/buggy/scripts/auton/trajectory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rb_ws/src/buggy/scripts/auton/trajectory.py b/rb_ws/src/buggy/scripts/auton/trajectory.py index 2106625d..ddb924f8 100755 --- a/rb_ws/src/buggy/scripts/auton/trajectory.py +++ b/rb_ws/src/buggy/scripts/auton/trajectory.py @@ -349,14 +349,14 @@ def get_closest_index_on_path( + start_index ) - def pack(self): + def pack(self) -> TrajectoryMsg: traj = TrajectoryMsg() traj.easting = self.positions[:, 0] traj.northing = self.positions[:, 1] traj.time = time.time() return traj - def unpack(trajMsg : TrajectoryMsg): + def unpack(trajMsg : TrajectoryMsg) -> Trajectory: pos = np.array([trajMsg.easting, trajMsg.northing]).transpose(1, 0) return Trajectory(positions=pos)