Skip to content

Commit

Permalink
Added typings
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Jun 26, 2024
1 parent c043e33 commit 4dbd5b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rb_ws/src/buggy/scripts/auton/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 4dbd5b0

Please sign in to comment.