Skip to content

Commit 8b20a02

Browse files
committed
Fixed for Control team
1 parent 684c018 commit 8b20a02

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

GEMstack/onboard/planning/parallel_parking.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# TODO: Pass constant to settings or config, double-check value rho (turning radius)
2525
def reeds_shepp_path(start_pose, final_pose, step_size=0.1, rho=3.657):# 3.657
2626
path = reeds_shepp.path_sample(start_pose, final_pose, rho, step_size)
27-
waypoints = [(x, y, yaw) for x, y, yaw in path]
27+
waypoints = [(x, y, yaw) for x, y, yaw, *_ in path]
2828
#waypoints = np.array(waypoints_for_obstacles_check)[:,:2]
2929
return waypoints
3030

@@ -383,7 +383,13 @@ def __init__(self, routefn : str, vehicle_interface : GEMInterface, frame : str
383383

384384
# TODO: Replace with real parked cars
385385
# Slot 1 (2.69, -2.44, 0.0, (2.44, 4.88)), Slot 2 (7.57, -2.44, 0.0, (2.44, 4.88)), Slot 3 (12.45, -2.44, 0.0, (2.44, 4.88)),Slot 4 (17.33, -2.44, 0.0, (2.44, 4.88)), Slot 5 (22.11, -2.44, 0.0, (2.44, 4.88))
386-
self.parked_cars = [(2.69, -2.44, 0.0, (1.7, 3.2)),(7.57, -2.44, 0.0, (1.7, 3.2)),(12.45, -2.44, 0.0, (1.7, 3.2))]
386+
387+
# Forward only
388+
# self.parked_cars = [(2.69, -2.44, 0.0, (1.7, 3.2)),(7.57, -2.44, 0.0, (1.7, 3.2)),(12.45, -2.44, 0.0, (1.7, 3.2))]
389+
390+
# With reverse control
391+
self.parked_cars = [(2.69, -2.44, 0.0, (1.7, 3.2)),(7.57, -2.44, 0.0, (1.7, 3.2)),(12.45, -2.44, 0.0, (1.7, 3.2)),(22.11, -2.44, 0.0, (2.44, 4.88))]
392+
387393
self.objects_to_avoid_collisions = self.static_horizontal_curb + self.static_obstacles_vertical_curb + self.parked_cars
388394
self.all_parking_spots_in_parking_lot = all_parking_spots_in_parking_lot(self.static_horizontal_curb, self.compact_parking_spot_size, yaw_of_parked_cars=0.0, shift_from_center_to_rear_axis = 2.56/2)
389395
self.available_parking_spots = available_parking_spots(self.all_parking_spots_in_parking_lot, self.parked_cars, self.compact_parking_spot_size, yaw_of_parked_cars=0.0, shift_from_center_to_rear_axis = 2.56/2)

0 commit comments

Comments
 (0)