Skip to content
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

Remove redundant collision checks in the Smac Planners to optimize performance (backport #4857) #4858

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 15, 2025

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:

…rformance (#4857)

* initial prototype to resolve smac planner issue

Signed-off-by: Steve Macenski <[email protected]>

* fix test

Signed-off-by: Steve Macenski <[email protected]>

* initial prototype for coarse to fine checking for smac: incomplete

Signed-off-by: Steve Macenski <[email protected]>

* completed initial prototype; for testing and benchmarking now

Signed-off-by: Steve Macenski <[email protected]>

* fix typo

Signed-off-by: Steve Macenski <[email protected]>

* adding bounds checking for coarse

Signed-off-by: Steve Macenski <[email protected]>

* fix test

Signed-off-by: Steve Macenski <[email protected]>

* remove coarse to fine checks

Signed-off-by: Steve Macenski <[email protected]>

---------

Signed-off-by: Steve Macenski <[email protected]>
(cherry picked from commit 5ff8cc7)
Copy link
Contributor Author

mergify bot commented Jan 15, 2025

@mergify[bot], all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @jazzy, but it must be in main
to have these changes reflected into new distributions.

@SteveMacenski SteveMacenski merged commit 9a5689e into jazzy Jan 15, 2025
7 of 8 checks passed
@SteveMacenski SteveMacenski deleted the mergify/bp/jazzy/pr-4857 branch January 15, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant