@@ -399,7 +399,7 @@ def state_to_object(self, state):
399399 theta = state [2 ]
400400 t = state [3 ]
401401
402- pose = ObjectPose (frame = ObjectFrameEnum .ABSOLUTE_CARTESIAN ,t = t , x = x ,y = y ,z = 0 ,yaw = theta )
402+ pose = ObjectPose (frame = ObjectFrameEnum .CURRENT ,t = t , x = x ,y = y ,z = 0 ,yaw = theta )
403403
404404 temp_obj = PhysicalObject (pose = pose ,
405405 dimensions = self .vehicle .to_object ().dimensions ,
@@ -432,7 +432,7 @@ def __init__(self):
432432 # self.planner = ParkingSolverSecondOrderDubins()
433433 self .planner = ParkingSolverFirstOrderDubins ()
434434
435- self .iterations = settings .get ("planning.astar.iterations" , 20000 )
435+ self .iterations = settings .get ("planning.astar.iterations" , 200 )
436436
437437 def state_inputs (self ):
438438 return ['all' ]
@@ -452,6 +452,7 @@ def vehicle_state_to_second_order(self, vehicle_state: VehicleState) -> Tuple[fl
452452 Returns:
453453 Tuple[float, float]: _description_
454454 """
455+ vehicle_state .pose = vehicle_state .pose .to_frame ()
455456 x = vehicle_state .pose .x
456457 y = vehicle_state .pose .y
457458 theta = vehicle_state .pose .yaw # check that this is correct
@@ -500,7 +501,11 @@ def update(self, state : AllState) -> Route:
500501 # assert goal.frame == ObjectFrameEnum.ABSOLUTE_CARTESIAN
501502 # assert goal.v == 0
502503 # print(f"Goal {goal}")
503- goal_pose = ObjectPose (frame = ObjectFrameEnum .ABSOLUTE_CARTESIAN , t = 0.0 , x = state .mission_plan .goal_x ,y = state .mission_plan .goal_y ,z = 0.0 ,yaw = state .mission_plan .goal_orientation )
504+ goal_pose = ObjectPose (frame = ObjectFrameEnum .CURRENT , t = 15 , x = state .mission_plan .goal_x ,y = state .mission_plan .goal_y ,z = 0 ,yaw = state .mission_plan .goal_orientation )
505+ print ("Checking VALUE: " , state .start_vehicle_pose )
506+ start_pose = state .vehicle .pose .to_frame (ObjectFrameEnum .CURRENT , current_pose = state .vehicle .pose ,start_pose_abs = state .start_vehicle_pose )
507+ start_cur = VehicleState .zero ()
508+ start_cur .pose = start_pose
504509 goal = VehicleState .zero ()
505510 goal .pose = goal_pose
506511 goal .v = 0
@@ -510,7 +515,7 @@ def update(self, state : AllState) -> Route:
510515 # goal_state = self.vehicle_state_to_dynamics(goal)
511516
512517 # Need to parse and create second order dubin car states
513- start_state = self .vehicle_state_to_first_order (vehicle )
518+ start_state = self .vehicle_state_to_first_order (start_cur )
514519 goal_state = self .vehicle_state_to_first_order (goal )
515520
516521 # Update the planner
0 commit comments