-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove redundant collision checks in the Smac Planners to optimize performance #4857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
|
Metrics - using the Nav2 Configuration Guide params and square footprint. Only changes are to enable reeds-shepp and reversing lattice models and primitive interpoliation for worse case, best quality paths. OG - Circular Footprint OG - Square Footprint New - Circular footprint New - Square Footprint Appears to be faster for Circular cases (likely due to stopping re-checks), but slower for non-circular footprints - which was the intent of this work. Further investigation is required, there may be a bug or unexpected performance change. Perhaps worth trying to see if the (a) coarse-to-fine is the problem or the (b) caching of collision states for returning -- and if one or the other is sensible to merge while I work on the other. I'm thinking there's a bug somewhere that fine checks are happening more than they should, its related to cache misses for bringing the costmap back into the equation, static/inlining of functions. |
|
Updated new - Circular: Updated new - Square: Reduced to only remove redundant checking without coarse-to-fine update. Improvement: 2D - 7.5-15%. Hybrid: 13-15%. Lattice: 12-13%. That's a pretty nice imrpovement! |
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Codecov ReportAttention: Patch coverage is
|
…rformance (#4857) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> (cherry picked from commit 5ff8cc7)
…rformance (#4857) (#4858) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> (cherry picked from commit 5ff8cc7) Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
…rformance (ros-navigation#4857) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: RBT22 <rozgonyibalint@gmail.com>
|
Hello @SteveMacenski , we obtained a similar result during the tests conducted on Saha Robotic's Speedy service robots in the field. OG New |
|
I have got to love that determinism 😄 That's about 11.5%! |
…rformance (ros-navigation#4857) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
…rformance (ros-navigation#4857) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
…rformance (ros-navigation#4857) * initial prototype to resolve smac planner issue Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * initial prototype for coarse to fine checking for smac: incomplete Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * completed initial prototype; for testing and benchmarking now Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix typo Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * adding bounds checking for coarse Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * fix test Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * remove coarse to fine checks Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: stevedanomodolor <stevedan.o.omodolor@gmail.com>
This PR introduces a coarse-to-fine collision checking method in Smac Planners.It checks coarsely for node collision when expanded to know if the node is clearly in collision with obstacles by checking its center point for SE2 footprints only (same behavior for circular / radius defined robots). If we're valid, then we queue the node for expansion. Once expanded, then we check the node for collision finely by checking the full SE2 footprint.This reduces substantial numbers of full SE2 footprint checks for non-circular robots while also leaving the behavior for circular robots the same.Edit: removed. These did not speed up performance due to cache misses by moving costmap checks into the main loop in the middle of other operations rather than batch processing them.
Additionally, I store the collision checker's state so that additional queuing of nodes will prevent unnecessary re-checking of collision states. For fine checks, it shouldn't be redone since we only visit nodes once, but it can reduce point-checks in coarse collision checking in dense expansion trees.
TODO: