Closed dmytrozabolotnii closed 1 month ago
I added a check whether the waypoints list is empty or contains only one waypoint. Tried to implement stopping of the vehicle as well.
Stopping the vehicle and general vehicle control can be implemented through one function, but in general the solution is correct, closing the issue.
Check the warnings ROS provides for your own code when you run it, and fix them if possible.
It is possible that you receive empty waypoints list in path_callback (or with only 1 waypoint inside), your callback should be prepared for this edge case:
https://github.com/helenasokk/autoware_mini_practice_solutions/blob/d191e7f912968fcd7ef6e481fe63b5dcb4eba077/nodes/control/pure_pursuit_follower.py#L30-L34
In this case, it is not desirable behavior to not process callback if we don't receive a path (or receive an empty path). For example, if your car had a path to follow, but then it received an empty path to follow it will continue to move with the same controls as the last published message, when it should stop and your controller should account for this.
https://github.com/helenasokk/autoware_mini_practice_solutions/blob/d191e7f912968fcd7ef6e481fe63b5dcb4eba077/nodes/control/pure_pursuit_follower.py#L45-L46
Great job otherwise!