Skip to content

Conversation

@SteveMacenski
Copy link
Member

@SteveMacenski SteveMacenski commented Jun 26, 2025

This PR implements the feature requested in #5033 to add a boolean parameter that controls whether the RoundRobin behavior tree node wraps around to its first child after the last one fails.

Changes

  • Added wrap_around boolean parameter (default: false) to RoundRobin node
  • When wrap_around=false, node returns FAILURE instead of wrapping to first child
  • Updated XML node definition to include new parameter
  • Existing behavior tree XMLs will use new non-wrap-around behavior by default

Problem Solved

Addresses issue where RoundRobin index can become misaligned with RecoveryNode retry counter when used in recovery sequences. The new default behavior (no wrap-around) ensures each recovery action is performed once and only once.

Fixes #5033

Generated with Claude Code - with a healthy amount of personal editing my myself

…ehavior

- Add boolean wrap_around parameter (default: false) to RoundRobin node
- When wrap_around=false, node returns FAILURE instead of wrapping to first child
- Updated XML node definition to include new parameter
- Existing behavior tree XMLs will use new non-wrap-around behavior by default
- Addresses issue where RoundRobin index can become misaligned with RecoveryNode retry counter

Fixes #5033

Co-authored-by: Steve Macenski <SteveMacenski@users.noreply.github.com>
@SteveMacenski
Copy link
Member Author

SteveMacenski commented Jun 26, 2025

@DylanDeCoeyer-Quimesis please review and test quickly to validate that this resolves your concern :-)

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

codecov bot commented Jun 27, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...behavior_tree/plugins/control/round_robin_node.cpp 87.50% 1 Missing ⚠️
Files with missing lines Coverage Δ
...behavior_tree/plugins/control/round_robin_node.hpp 100.00% <100.00%> (ø)
...behavior_tree/plugins/control/round_robin_node.cpp 95.12% <87.50%> (+0.83%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@SteveMacenski
Copy link
Member Author

@DylanDeCoeyer-Quimesis can you please review?

@SteveMacenski
Copy link
Member Author

@SteveMacenski do a docs PR

claude bot added a commit to ros-navigation/docs.nav2.org that referenced this pull request Dec 11, 2025
- Add wrap_around parameter to RoundRobin configuration documentation  
- Add migration guide entry for the new parameter in Kilted.rst
- Document breaking change: default behavior changed to non-wrap-around
- Include usage examples and reference to configuration guide

Implements documentation for ros-navigation/navigation2#5308

Co-authored-by: Steve Macenski <SteveMacenski@users.noreply.github.com>
SteveMacenski added a commit to ros-navigation/docs.nav2.org that referenced this pull request Dec 11, 2025
…818)

- Add wrap_around parameter to RoundRobin configuration documentation  
- Add migration guide entry for the new parameter in Kilted.rst
- Document breaking change: default behavior changed to non-wrap-around
- Include usage examples and reference to configuration guide

Implements documentation for ros-navigation/navigation2#5308

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@SteveMacenski SteveMacenski merged commit 10ad099 into main Dec 11, 2025
15 checks passed
@SteveMacenski SteveMacenski deleted the claude/issue-5033-20250626_232320 branch December 11, 2025 19:16
pele1410 pushed a commit to Metal-Shark-Sharktech/navigation2 that referenced this pull request Dec 30, 2025
…ehavior (ros-navigation#5308)

* Add wrap_around parameter to RoundRobin node to control wrap-around behavior

- Add boolean wrap_around parameter (default: false) to RoundRobin node
- When wrap_around=false, node returns FAILURE instead of wrapping to first child
- Updated XML node definition to include new parameter
- Existing behavior tree XMLs will use new non-wrap-around behavior by default
- Addresses issue where RoundRobin index can become misaligned with RecoveryNode retry counter

Fixes ros-navigation#5033

Co-authored-by: Steve Macenski <SteveMacenski@users.noreply.github.com>

* Update round_robin_node.hpp

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

* Update round_robin_node.hpp

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

* Fixing BT unit tests

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

* Updating system tests

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

---------

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com>
Lotusymt pushed a commit to Lotusymt/navigation2 that referenced this pull request Jan 16, 2026
…ehavior (ros-navigation#5308)

* Add wrap_around parameter to RoundRobin node to control wrap-around behavior

- Add boolean wrap_around parameter (default: false) to RoundRobin node
- When wrap_around=false, node returns FAILURE instead of wrapping to first child
- Updated XML node definition to include new parameter
- Existing behavior tree XMLs will use new non-wrap-around behavior by default
- Addresses issue where RoundRobin index can become misaligned with RecoveryNode retry counter

Fixes ros-navigation#5033

Co-authored-by: Steve Macenski <SteveMacenski@users.noreply.github.com>

* Update round_robin_node.hpp

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

* Update round_robin_node.hpp

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

* Fixing BT unit tests

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

* Updating system tests

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

---------

Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants