There is no need to calculate the routing in current_pose messages callback, it can be calculated once when goal endpoint (so in goal_callback) is received and then pure_pursuit_follower will follow it as in practice 3. Instead current_pose callback can be used only as check when we reach endpoint of the route. Your stopping mechanism also doesn't work because of this because when the vehicle reaches endpoint within set distance, it tries to stop the vehicle, but slow deceleration moves vehicle outside of endpoint range so your current_pose callback creates a path to follow again.
If you are projecting goal point on the lanelet path then simply overwriting the last waypoint with projected goal is insufficient: you need to cut out all waypoints that are further along the path than the projected goal point. One way to do it would be to iterate over all waypoints created by processing the last lanelet in the path, projecting them on the path to find distance from the start and then comparing them to the distance of the projected goal point: if the distance of these waypoints is greater than the distance to goal point they can be discarded and not included in waypoints array.
Don't worry about deadline, deadline was only for initial submission of working solution.
Remove basic print() logging before submitting and don't leave commented out code.
https://github.com/helenasokk/autoware_mini_practice_solutions/blob/0385e208752904a3e9dd6590346920cbcb8df926/nodes/planning/global/lanelet2_global_planner.py#L68
There is no need to calculate the routing in current_pose messages callback, it can be calculated once when goal endpoint (so in goal_callback) is received and then pure_pursuit_follower will follow it as in practice 3. Instead current_pose callback can be used only as check when we reach endpoint of the route. Your stopping mechanism also doesn't work because of this because when the vehicle reaches endpoint within set distance, it tries to stop the vehicle, but slow deceleration moves vehicle outside of endpoint range so your current_pose callback creates a path to follow again.
If you are projecting goal point on the lanelet path then simply overwriting the last waypoint with projected goal is insufficient: you need to cut out all waypoints that are further along the path than the projected goal point. One way to do it would be to iterate over all waypoints created by processing the last lanelet in the path, projecting them on the path to find distance from the start and then comparing them to the distance of the projected goal point: if the distance of these waypoints is greater than the distance to goal point they can be discarded and not included in waypoints array.
Don't worry about deadline, deadline was only for initial submission of working solution.