AnishShr / autoware_mini_practice

Practice Sessions and Labs for the Autonomous Vehicles Project (Autoware mini)
MIT License
0 stars 0 forks source link

Practice 6 - simple_local_planner - handling objects and obstacles and it gets too complex #11

Closed geopimik closed 4 months ago

geopimik commented 5 months ago

There should be enough of having these: https://github.com/AnishShr/autoware_mini_practice/blob/21d92c582d289c5f9fc24b477ca34f7889b10b66/practice_6/nodes/planning/local/simple_local_planner.py#L182-L184

These should not be necessary: https://github.com/AnishShr/autoware_mini_practice/blob/21d92c582d289c5f9fc24b477ca34f7889b10b66/practice_6/nodes/planning/local/simple_local_planner.py#L150-L152

Add from each object closest point to obstacle_distances, its velocity to obstacle_velocities and fill the object_braking_distance depending on the type of object (goal point, or obstacle).

Here I would convert all to arrays using the same name as you do with the last one (why changing name for the first 2 ones - it makes following all the variables much harder): https://github.com/AnishShr/autoware_mini_practice/blob/21d92c582d289c5f9fc24b477ca34f7889b10b66/practice_6/nodes/planning/local/simple_local_planner.py#L215-L218

So I would like you to simplify the usage of these variable names and it means also some code reorganization. And it all should go a bit simpler.

AnishShr commented 5 months ago
  1. removed excess lists
  2. only used 3 lists for distances, velocities and safety braking distances https://github.com/AnishShr/autoware_mini_practice/blob/db7de2e51eb2ac93c232ab33cd755905c6f50521/practice_6/nodes/planning/local/simple_local_planner.py#L149-L151
  3. Simplified the logic to append the detected objects distance, velocity and the brkaing distances which later are converted to numpy arrays https://github.com/AnishShr/autoware_mini_practice/blob/db7de2e51eb2ac93c232ab33cd755905c6f50521/practice_6/nodes/planning/local/simple_local_planner.py#L163-L191
AnishShr commented 5 months ago

latest commit: https://github.com/AnishShr/autoware_mini_practice/commit/7d19ddadcd79e106cadf593cf4e87f63427ab2fd

geopimik commented 4 months ago

OK