Skip to content

Option to Reduce Lethal to High-Cost Navigable To Get Out of Keepout Zones if Wandered In (backport #5187)#5215

Merged
SteveMacenski merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-5187
Jun 1, 2025
Merged

Option to Reduce Lethal to High-Cost Navigable To Get Out of Keepout Zones if Wandered In (backport #5187)#5215
SteveMacenski merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-5187

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jun 1, 2025

This resolves #5139

In it, we check if we're in a lethal keepout zone. If optionally enabled (default off, but on in nav2_params.yaml), we reduce the lethal cost to a very high but navigable cost (252) in order to allow the robot to leave on its own but in a very efficient way.

This cost can be tuned by users to weight the incentives to continue towards the goal (lower cost) with incentives to leave the keepout zone immediately (252 max).

We update the costmap in the full window size during this mode in order to make sure we set all cells as lethal again once exiting the keepout zone (to keep them in update scope).


This is an automatic backport of pull request #5187 done by Mergify.

…Zones if Wandered In (#5187)

* Adding toggle option of keepout zone

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* Default off

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* Join conditions

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* spell check

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* copilot suggestions

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* Update nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp

Co-authored-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* Update nav2_costmap_2d/plugins/costmap_filters/keepout_filter.cpp

Co-authored-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

* Update keepout_filter.cpp

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>

---------

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
(cherry picked from commit eb2235a)
@mergify
Copy link
Contributor Author

mergify bot commented Jun 1, 2025

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

@SteveMacenski SteveMacenski merged commit 0cf045a into kilted Jun 1, 2025
9 of 10 checks passed
@SteveMacenski SteveMacenski deleted the mergify/bp/kilted/pr-5187 branch June 1, 2025 20:26
@mini-1235
Copy link
Collaborator

Is this possible to backport to Jazzy?

@SteveMacenski
Copy link
Member

@mini-1235 I'm sure I tried but it wouldn't do it due to merge conflicts. If you opened one, I'd merge it

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.

2 participants