Closed geopimik closed 5 months ago
Adjusted solution to work in these failure cases.
From all waypoints, a new list of waypoints is created where only the waypoints whose projected distance along the path (using shapely.Linestiring.project) is less than the projected distance to the goal. The projected goal point in the path is then added to the list at the end. This ensures that the goal point will be the last waypoint and the ego vehicle does not go out of the lane as well.
Will review this, once you have finished issue #4
In general good solution. Projecting point on the path and using that to update also the goal point.
There is one tiny inefficiency In the for loop there: https://github.com/AnishShr/autoware_mini_practice/blob/5c8d1539daaad6caef1ba55738b713cf215e0ac0/practice_4/nodes/planning/global/lanelet2_global_planner.py#L89-L95
Once you find out that if d_wp_from_path_start < d_goal_from_path_start:
is not true any more, you don't add more points, but the for loop still goes till the end of waypoints_list
calculating the distances along the path and evaluating the if but It should not be necessary any more.
Once within the loop it finds out the projected distance of a waypioint to be greater than that of the goal poiint, it breaks from the loop. Added this part in the loop. https://github.com/AnishShr/autoware_mini_practice/blob/21d92c582d289c5f9fc24b477ca34f7889b10b66/practice_4/nodes/planning/global/lanelet2_global_planner.py#L92-L100
OK
Your description to last task:
You need to adjust your solution, two examples:
By placing last waypoint quite far away from the path I can create the following situation. Car will drive out of the road. Not acceptable!![image](https://github.com/AnishShr/autoware_mini_practice/assets/33843059/b0313023-cbbc-4094-9071-d76f69b686ee)
Or when placed close to a lanelet beginning, but the lanelet has plenty of points, and you replace just the last one. Again, this global path is not acceptable.![image](https://github.com/AnishShr/autoware_mini_practice/assets/33843059/f016b31e-2f30-4719-b25b-1724e322746c)