Remove redundant collision checks in the Smac Planners to optimize performance (backport #4857)#4858
Merged
SteveMacenski merged 1 commit intojazzyfrom Jan 15, 2025
Merged
Conversation
…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)
Contributor
Author
SteveMacenski
approved these changes
Jan 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
This is an automatic backport of pull request Remove redundant collision checks in the Smac Planners to optimize performance #4857 done by Mergify.