diff --git a/rb_ws/src/buggy/scripts/auton/trajectory.py b/rb_ws/src/buggy/scripts/auton/trajectory.py index 2106625..ddb924f 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)