Skip to content

Commit 0937486

Browse files
committed
fix rrt star reeds shepp rewire and test
1 parent 6754027 commit 0937486

File tree

5 files changed

+158
-224
lines changed

5 files changed

+158
-224
lines changed

PathPlanning/RRTDubins/rrt_dubins.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Path planning Sample Code with RRT for car like robot.
2+
Path planning Sample Code with RRT with Dubins path
33
44
author: AtsushiSakai(@Atsushi_twi)
55

PathPlanning/RRTStar/rrt_star.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def choose_parent(self, new_node, near_inds):
100100
for i in near_inds:
101101
near_node = self.node_list[i]
102102
t_node = self.steer(near_node, new_node)
103-
if self.check_collision(t_node, self.obstacle_list):
103+
if t_node and self.check_collision(t_node, self.obstacle_list):
104104
costs.append(self.calc_new_cost(near_node, new_node))
105105
else:
106106
costs.append(float("inf")) # the cost of collision node
@@ -143,6 +143,8 @@ def rewire(self, new_node, near_inds):
143143
for i in near_inds:
144144
near_node = self.node_list[i]
145145
edge_node = self.steer(new_node, near_node)
146+
if not edge_node:
147+
continue
146148
edge_node.cost = self.calc_new_cost(new_node, near_node)
147149

148150
no_collision = self.check_collision(edge_node, self.obstacle_list)

0 commit comments

Comments
 (0)