Skip to content

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

Merged
SteveMacenski merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-4857
Jan 15, 2025
Merged

Remove redundant collision checks in the Smac Planners to optimize performance (backport #4857)#4858
SteveMacenski merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-4857

Conversation

@mergify
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 <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)
@mergify
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
@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