@@ -126,11 +126,13 @@ def planning(self, sx, sy, gx, gy):
126
126
127
127
child_node_A = self .Node (current_A .x + self .motion [i ][0 ],
128
128
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 )
130
131
131
132
child_node_B = self .Node (current_B .x + self .motion [i ][0 ],
132
133
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 )
134
136
135
137
n_id_A = self .calc_grid_index (child_node_A )
136
138
n_id_B = self .calc_grid_index (child_node_B )
@@ -166,12 +168,12 @@ def planning(self, sx, sy, gx, gy):
166
168
# This path is the best until now. record it
167
169
open_set_B [n_id_B ] = child_node_B
168
170
169
- rx , ry = self .calc_final_path_bidir (
171
+ rx , ry = self .calc_final_bidirectional_path (
170
172
meetpointA , meetpointB , closed_set_A , closed_set_B )
171
173
172
174
return rx , ry
173
175
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 ):
175
177
rx_A , ry_A = self .calc_final_path (meetnode_A , closed_set_A )
176
178
rx_B , ry_B = self .calc_final_path (meetnode_B , closed_set_B )
177
179
@@ -299,7 +301,7 @@ def main():
299
301
grid_size = 2.0 # [m]
300
302
robot_radius = 1.0 # [m]
301
303
302
- # set obstable positions
304
+ # set obstacle positions
303
305
ox , oy = [], []
304
306
for i in range (- 10 , 60 ):
305
307
ox .append (i )
0 commit comments