jaak-peterson / autoware_mini_practice

MIT License
0 stars 0 forks source link

Practice 4 - lanelet2_global_planner - sync goal point and path ending #5

Closed geopimik closed 7 months ago

geopimik commented 8 months ago

Currently, you have not implemented the last task from the practice 4 - Sync the goal point location with the path ending location!

  1. Please describe briefly what is your solution
  2. Ipmlement it in the code
geopimik commented 7 months ago

Comments to the implementation

  1. 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

  2. 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.

  3. 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!

geopimik commented 7 months ago

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.