Skip to content

Commit

Permalink
fix: removed wp reset from motion_planning
Browse files Browse the repository at this point in the history
  • Loading branch information
robertik10 committed Mar 20, 2024
1 parent c889ff2 commit 53f6048
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions code/planning/src/local_planner/motion_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,6 @@ def overtake_fallback(self, distance, pose_list, unstuck=False):
currentwp = self.current_wp
normal_x_offset = 2
unstuck_x_offset = 3.5 # could need adjustment with better steering

# if overtake is called by the unstuck routine
# -> reset the current wp to the distance driven backwards
# distance between each waypoint is set to 1
# -> distance is the amount of waypoints we drove
# backwards during unstuck!
if unstuck is True:
if distance > currentwp:
currentwp = 0
else:
distance = distance + 2
# currentwp = currentwp - int(distance)

# else: overtake starts from current wp
selection = pose_list[int(currentwp):int(currentwp) +
int(distance) + 7]
waypoints = self.convert_pose_to_array(selection)
Expand Down

0 comments on commit 53f6048

Please sign in to comment.