Skip to content

Add TryCatch control node - #25

Draft
kronk-bot[bot] wants to merge 1 commit into
mainfrom
feat/20169-try-catch-control-node
Draft

Add TryCatch control node#25
kronk-bot[bot] wants to merge 1 commit into
mainfrom
feat/20169-try-catch-control-node

Conversation

@kronk-bot

@kronk-bot kronk-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

BehaviorTree.CPP 4.7 in the PickNik fork predates upstream's TryCatch control 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 FAILURE regardless 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 -a
  • cmake --build /tmp/btcpp-20169-green --parallel 4 --target behaviortree_cpp_test
  • ctest --test-dir /tmp/btcpp-20169-green --output-on-failure (1/1 passed)

After merge, apt_build_farm must point behaviortree_cpp at the new commit before MoveIt Pro can consume the package.

Closes PickNikRobotics/moveit_pro#20169

Backport the upstream TryCatch implementation and tests, including parse-time child-count validation and catch-on-halt support.
@kronk-bot

kronk-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Author

@coderabbitai full review

@kronk-bot

kronk-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

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