-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add behavior tree #1177
feat: add behavior tree #1177
Conversation
@AtsushiSakai I have completed this task and look forward to your review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds a new behavior tree example for robot mission planning along with corresponding unittests to verify the tree's sequence, selector, and error conditions.
- Added MissionPlanning/BehaviorTree/robot_behavior_case.py with several custom ActionNodes (e.g. for battery check, obstacle avoidance, and performing tasks).
- Created tests in tests/test_behavior_tree.py to validate behavior tree execution and error handling for invalid configurations.
Reviewed Changes
File | Description |
---|---|
MissionPlanning/BehaviorTree/robot_behavior_case.py | Implements a sample behavior tree with custom nodes to simulate robot actions. |
tests/test_behavior_tree.py | Provides a suite of tests for different behavior tree configurations and error cases. |
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. PTAL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds a new Behavior Tree implementation for robot mission planning, introducing various custom action nodes to simulate robot behaviors such as battery monitoring, charging, movement, obstacle detection/avoidance, and task execution.
- Implements custom action nodes in MissionPlanning/BehaviorTree/robot_behavior_case.py
- Registers nodes within a BehaviorTreeFactory to build trees from XML
- Introduces unittests in tests/test_behavior_tree.py to validate sequences, selectors, while-do-else constructs, and node child restrictions
Reviewed Changes
File | Description |
---|---|
MissionPlanning/BehaviorTree/robot_behavior_case.py | Introduces several new action nodes and a function to build and execute a behavior tree from an XML file |
tests/test_behavior_tree.py | Adds comprehensive test cases for behavior tree constructs including sequence, selector, and node child requirements |
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!!
Reference issue
#530
What does this implement/fix?
Add Behavior Tree
Additional information
CheckList