Closed geopimik closed 4 months ago
Modified the code to take the index of the min trget velocities and set the target velocity https://github.com/AnishShr/autoware_mini_practice/blob/ee48ca45ee8627b7ee1e289695781ef9c0606b4b/practice_6/nodes/planning/local/simple_local_planner.py#L212-L214
git commit: https://github.com/AnishShr/autoware_mini_practice/commit/ee48ca45ee8627b7ee1e289695781ef9c0606b4b
ok
I would not do it here: https://github.com/AnishShr/autoware_mini_practice/blob/d925e1e517a6656f8355264a1323ff155cd0e166/practice_6/nodes/planning/local/simple_local_planner.py#L212
I would select min target velocity with
np.argmin
and then check it.With the current solution, you may have two cars in front of you. One has just passed you, but both drive faster than
lane_target_velocity
. You would set their target velocities to be equal, and then np.argmin would return the random one (the one with smaller index), and it might not be the closest car, causing a smaller target velocity.