Closed geopimik closed 7 months ago
There is slight inefficiency. When distance_to_goal
is smaller than distance
- no waypoints are added any more, but still the above "for" loop calculates all the distances for the rest of the waypoints.
https://github.com/jaak-peterson/autoware_mini_practice/blob/8136687018f903b9cee09250bd1b6d785b69cf3b/practice_4/nodes/planning/global/lanelet2_global_planner.py#L139-L143
You are not assigning the speed to goal_waypoint
and it results it to be 0. We could argue here if that is correct or not, but currently we will leave speed handling and stopping at path end for the local planner. So here you should add also the speed, otherwise it will slow down to very low speed already being far away of the last waypoint, simply because there are no intermediate waypoints on the map.
Not asking you to correct it now, but just a comment. There are four for loops all together in the lanelet_to_waypoints
function. Oviously there has to be a more compact and simpler way to do it!
It seems to work, but especially this line is way too complicated! https://github.com/jaak-peterson/autoware_mini_practice/blob/d5e11e765d962cfe8e2896618da3ddcb2e42be6b/practice_4/nodes/planning/global/lanelet2_global_planner.py#L115
Next time could brake down to smaller pieces or add some explanations.
Currently, you have not implemented the last task from the practice 4 - Sync the goal point location with the path ending location!