Add option to override lethal cost in keepout zone#5433
Merged
SteveMacenski merged 4 commits intoros-navigation:mainfrom Aug 12, 2025
Merged
Add option to override lethal cost in keepout zone#5433SteveMacenski merged 4 commits intoros-navigation:mainfrom
SteveMacenski merged 4 commits intoros-navigation:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to override lethal costs in keepout zones, allowing robots to navigate out of forbidden areas when they find themselves inside them. The main change relocates lethal pose checking from the process() method to updateBounds() to improve timing and efficiency.
- Moves lethal pose detection logic from
process()toupdateBounds()method - Changes lethal state tracking variables from unsigned int to double for world coordinates
- Adds early return optimization when new keepout zone data is received
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| keepout_filter.cpp | Relocates lethal pose checking logic and optimizes bound updates for lethal state tracking |
| keepout_filter.hpp | Updates member variable types from unsigned int to double for lethal state coordinates |
Member
|
@mini-1235 can you fix the bot's comment on signed constness? that's a real fix needed |
SteveMacenski
requested changes
Aug 11, 2025
Member
|
@mini-1235 can you pull in main? The CircleCI should pass then |
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
87767af to
74b0c5f
Compare
SteveMacenski
approved these changes
Aug 12, 2025
Codecov Report❌ Patch coverage is
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
bkoensgen
pushed a commit
to bkoensgen/navigation2
that referenced
this pull request
Aug 29, 2025
* Add option to override lethal cost in keepout zone Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Linting Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Base class call Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
silanus23
pushed a commit
to silanus23/navigation2
that referenced
this pull request
Sep 18, 2025
* Add option to override lethal cost in keepout zone Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Linting Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Base class call Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
BCKSELFDRIVEWORLD
pushed a commit
to BCKSELFDRIVEWORLD/navigation2
that referenced
this pull request
Sep 23, 2025
* Add option to override lethal cost in keepout zone Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Linting Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Base class call Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Basic Info
Description of contribution in a few bullet points
As requested in #5410 (comment)
My current implementation will always prioritize map update, if there is a map update, it will skip checking "is_pose_lethal", and check it in the next loop
Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.