Add TryCatch control node - #25
Draft
kronk-bot[bot] wants to merge 1 commit into
Draft
Conversation
Backport the upstream TryCatch implementation and tests, including parse-time child-count validation and catch-on-halt support.
Author
|
@coderabbitai full review |
Author
|
@coderabbitai review |
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.
BehaviorTree.CPP 4.7 in the PickNik fork predates upstream's
TryCatchcontrol node, so MoveIt Pro Objectives cannot use the built-in recovery pattern without a custom node.This ports the upstream implementation and follow-up fixes. Children before the final child execute as the try sequence; a failure runs the final catch child, then returns
FAILUREregardless of the catch result.catch_on_halt="true"also invokes best-effort cleanup when a running try branch is halted. XML validation rejects trees with fewer than two children.Upstream sources:
Verification:
pre-commit run -acmake --build /tmp/btcpp-20169-green --parallel 4 --target behaviortree_cpp_testctest --test-dir /tmp/btcpp-20169-green --output-on-failure(1/1 passed)After merge,
apt_build_farmmust pointbehaviortree_cppat the new commit before MoveIt Pro can consume the package.Closes PickNikRobotics/moveit_pro#20169