From 6bfe02ee16c7a941063e911f68833d796c6aff83 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Thu, 9 Mar 2023 00:44:39 +0100 Subject: [PATCH] Reorder pose method --- path-to-traj.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/path-to-traj.py b/path-to-traj.py index c7c5804..a96fc31 100755 --- a/path-to-traj.py +++ b/path-to-traj.py @@ -133,6 +133,9 @@ class BicycleCar: self.acc = 0 self.braking = False + def pose(self): + return [self.x, self.y, self.h, self.wa, self.sp, self.acc] + def ed(self, pose): """Euclidean distance from self to pose in 2D.""" return ed(self.pose(), pose) @@ -162,8 +165,6 @@ class BicycleCar: t = abs(self.sp / self.acc) return self.sp * t + 1/2 * self.acc * t**2 - def pose(self): - return [self.x, self.y, self.h, self.wa, self.sp, self.acc] def poses_to(self, pose): """Return tuple of poses toward pose. -- 2.39.2