-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Feature request
Feature description
Implement a nav2_util helper function that conputes the distance from the robot's pose to a given path to compute tracking error.
The method should have an optional argument with the closest path point's index, if already known. If not given, the method should find that closest point itself. Once found, the method should interpolate the path's poses to find an accurate point to increase its resolution to increase the computed distance's accuracy (Steve edit: which can be obtained from the RPP controller's interpolation logic).
This method could be used in controller_server to provide additional feedback.
It could also be used in a BT condition node to check the path tracking accuracy.
It can also be used in plugins in DWB/MPPI to bound the divergence from the path if required given VDA5050 requirements or other path tracking requirements. It could be made as part of the FollowPath request to server's algorithms.
- Create utility with testing
- Expose in Controller Server for feedback on the task status Path distance feature #5387
- Create BT node to compute it and make decisions based off of it potentially Path trackin conditon node #5602
- Create plugins for MPPI/DWB to heavily penalize divergences beyond the requirement (possibly even a penalty proportional to the divergence?)
- Create costmap layer to use the max deviation to carve out a tunnel where the plans/controls may go through to stay in bounds Tracking error layer #5605
- Optional: Expose to the controller request API the path tracking error allowable rather than making it a static parameterization, so that different requests or areas can have different requirements. Not all plugins will use / respond to this (RPP just follows the path; graceful computes its own curves based on the path) but others may. The ones that wouldn't consider this would also largely be direct path following plugins anyway. We could create costmap layers that take in the requested bounds and put cost boundaries in the local costmap around the path at the extents to hard-prevent these algorithms from exceeding it (less fail).
Implementation considerations
Searching for the nearest point could have different startegies with different pros and cons:
- Choose the overall nearest point on the path (global minimum)
- May jump forward/backward if path is looping
- Choose the first nearest point, starting from the start of the path (first local minimum)
- May jump backward if path is looping
- Choose the first nearest point, starting from the point found in the last call, or a point given by the user (iterative local minimum)
- More consistent
- Require tracking of the last point found and resetting it when appropriate. Does not allow moving backwards on the path.
Related to
See discussion in #4931 (comment)