@@ -137,10 +137,10 @@ def neighbors(self, node):
137137 next_state = np .append (next_state , node [5 ] + self .vehicle_sim .T )
138138 next_state = np .round (next_state , 3 )
139139 if self .is_valid_neighbor ([next_state ]):
140- print (f"Accepted: { next_state } " )
140+ # print(f"Accepted: {next_state}")
141141 neighbors .append (tuple (next_state ))
142- else :
143- print (f"Rejected (collision): { next_state } " )
142+ # else:
143+ # print(f"Rejected (collision): {next_state}")
144144 return neighbors
145145
146146 def is_valid_neighbor (self , path ):
@@ -196,8 +196,8 @@ def state_to_polygon(self, state):
196196
197197def generate_action_set ():
198198 return [
199- (1.0 , - 0.3 ), (1.0 , 0.0 ), (1.0 , 0.3 ),
200- (- 1.0 , - 0.3 ), (- 1.0 , 0.0 ), (- 1.0 , 0.3 )
199+ (0.25 , - 0.3 ), (0.25 , 0.0 ), (0.25 , 0.3 ),
200+ (- 0.25 , - 0.3 ), (- 0.25 , 0.0 ), (- 0.25 , 0.3 )
201201 ]
202202
203203# @TODO Need to change the functions here to use VehicleState
@@ -250,6 +250,7 @@ def is_goal_reached(self, current: List[float], goal: List[float]):
250250 # return np.linalg.norm(np.array([current[0], current[1]]) - np.array([goal[0], goal[1]])) < 0.5
251251 pos_dist = np .linalg .norm ([current [0 ] - goal [0 ], current [1 ] - goal [1 ]])
252252 yaw_dist = abs ((current [2 ] - goal [2 ] + np .pi ) % (2 * np .pi ) - np .pi )
253+ print ("Reach The Goal" )
253254 return pos_dist < 0.5 and yaw_dist < 0.3
254255
255256 def heuristic_cost_estimate (self , state_1 , state_2 ):
@@ -314,10 +315,10 @@ def neighbors(self, node):
314315 next_state = np .append (next_state , node [3 ] + self .vehicle_sim .T )
315316 next_state = np .round (next_state , 3 )
316317 if self .is_valid_neighbor ([next_state ]):
317- print (f"Accepted: { next_state } " )
318+ # print(f"Accepted: {next_state}")
318319 neighbors .append (tuple (next_state ))
319- else :
320- print (f"Rejected first order (collision): { next_state } " )
320+ # else:
321+ # print(f"Rejected first order (collision): {next_state}")
321322 return neighbors
322323
323324 def is_valid_neighbor (self , path ):
0 commit comments