From 3f276bac9d32387100a7474b27d4a7569edfee02 Mon Sep 17 00:00:00 2001 From: Atsushi Sakai Date: Sat, 15 Dec 2018 18:11:48 +0900 Subject: [PATCH] remove np.matrix --- PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py b/PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py index b3c27825..4f558b22 100644 --- a/PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py +++ b/PathPlanning/ClosedLoopRRTStar/closed_loop_rrt_star_car.py @@ -134,7 +134,7 @@ class RRT(): return False, None, None, None, None, None, None, None def calc_tracking_path(self, path): - path = np.matrix(path[::-1]) + path = np.array(path[::-1]) ds = 0.2 for i in range(10): lx = path[-1, 0] @@ -145,7 +145,7 @@ class RRT(): print("back") ds *= -1 - lstate = np.matrix( + lstate = np.array( [lx + ds * math.cos(lyaw), ly + ds * math.sin(lyaw), lyaw]) # print(lstate) @@ -296,7 +296,7 @@ class RRT(): goalind = node.parent path.append([self.start.x, self.start.y, self.start.yaw]) - path = np.matrix(path[::-1]) + path = np.array(path[::-1]) return path def calc_dist_to_goal(self, x, y):