Skip to content

Commit 38519b5

Browse files
committed
fix requests
1 parent 63a9202 commit 38519b5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

PathPlanning/BidirectionalAStar/bidirectional_a_star.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,13 @@ def planning(self, sx, sy, gx, gy):
126126

127127
child_node_A = self.Node(current_A.x + self.motion[i][0],
128128
current_A.y + self.motion[i][1],
129-
current_A.cost + self.motion[i][2], c_id_A)
129+
current_A.cost + self.motion[i][2],
130+
c_id_A)
130131

131132
child_node_B = self.Node(current_B.x + self.motion[i][0],
132133
current_B.y + self.motion[i][1],
133-
current_B.cost + self.motion[i][2], c_id_B)
134+
current_B.cost + self.motion[i][2],
135+
c_id_B)
134136

135137
n_id_A = self.calc_grid_index(child_node_A)
136138
n_id_B = self.calc_grid_index(child_node_B)
@@ -166,12 +168,12 @@ def planning(self, sx, sy, gx, gy):
166168
# This path is the best until now. record it
167169
open_set_B[n_id_B] = child_node_B
168170

169-
rx, ry = self.calc_final_path_bidir(
171+
rx, ry = self.calc_final_bidirectional_path(
170172
meetpointA, meetpointB, closed_set_A, closed_set_B)
171173

172174
return rx, ry
173175

174-
def calc_final_path_bidir(self, meetnode_A, meetnode_B, closed_set_A, closed_set_B):
176+
def calc_final_bidirectional_path(self, meetnode_A, meetnode_B, closed_set_A, closed_set_B):
175177
rx_A, ry_A = self.calc_final_path(meetnode_A, closed_set_A)
176178
rx_B, ry_B = self.calc_final_path(meetnode_B, closed_set_B)
177179

@@ -299,7 +301,7 @@ def main():
299301
grid_size = 2.0 # [m]
300302
robot_radius = 1.0 # [m]
301303

302-
# set obstable positions
304+
# set obstacle positions
303305
ox, oy = [], []
304306
for i in range(-10, 60):
305307
ox.append(i)

0 commit comments

Comments
 (0)