Decision Module
1.0
ICRA2020 AI Challenge Northwestern Polytechnical University Aoxiang Team Strategy Code
|
Behavior tree composite node inherited from BehaviorNode. More...
#include <behavior_node.h>
Public Member Functions | |
CompositeNode (std::string name, BehaviorType behavior_type, const Blackboard::Ptr &blackboard_ptr) | |
Constructor of CompositeNode. More... | |
virtual | ~CompositeNode ()=default |
virtual void | AddChildren (const BehaviorNode::Ptr &child_node_ptr) |
Add child behavior node to the composite node. More... | |
virtual void | AddChildren (std::initializer_list< BehaviorNode::Ptr > child_node_ptr_list) |
Add a list of child behavior nodes to the composite node. More... | |
virtual BehaviorNode::Ptr | GetChild () |
Get the child behavior node that it is turn to tick. More... | |
std::vector< BehaviorNode::Ptr > & | GetChildren () |
Get the list of child behavior nodes. More... | |
unsigned int | GetChildrenIndex () |
Get the index of the child behavior node that it is turn to tick. More... | |
unsigned int | GetChildrenNum () |
Get the number of child behavior nodes. More... | |
![]() | |
BehaviorNode () | |
BehaviorNode (std::string name, BehaviorType behavior_type, const Blackboard::Ptr &blackboard_ptr) | |
Constructor of BehaviorNode. More... | |
virtual | ~BehaviorNode ()=default |
BehaviorState | Run () |
Run the behavior node. More... | |
virtual void | Reset () |
Reset the behavior node. More... | |
BehaviorType | GetBehaviorType () |
Get the type of the behavior node. More... | |
BehaviorState | GetBehaviorState () |
Get the state of the behavior node. More... | |
std::string | GetName () |
Get the name of the behavior node. More... | |
void | SetParent (BehaviorNode::Ptr parent_node_ptr) |
Set the parent of the behavior node. More... | |
BehaviorNode::Ptr | GetParent () |
Get the parent node of the behavior node. More... | |
unsigned int | GetLevel () |
Get the level of the behavior node. More... | |
void | SetLevel (unsigned int level) |
Set the level of the behavior node. More... | |
Protected Member Functions | |
virtual BehaviorState | Update ()=0 |
Tick the node and update the state of the behavior node. More... | |
virtual void | OnInitialize ()=0 |
Initialize something before starting to tick the node. More... | |
virtual void | OnTerminate (BehaviorState state)=0 |
Recover or reset something After getting the result. More... | |
Protected Attributes | |
std::vector< BehaviorNode::Ptr > | children_node_ptr_ |
the list of child nodes More... | |
unsigned int | children_node_index_ |
the index of child nodes More... | |
![]() | |
std::string | name_ |
Node name. More... | |
BehaviorState | behavior_state_ |
State. More... | |
BehaviorType | behavior_type_ |
Type. More... | |
Blackboard::Ptr | blackboard_ptr_ |
Blackboard. More... | |
BehaviorNode::Ptr | parent_node_ptr_ |
Parent Node Pointer. More... | |
unsigned int | level_ |
Level of the tree. More... | |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< BehaviorNode > | Ptr |
Behavior tree composite node inherited from BehaviorNode.
|
inline |
Constructor of CompositeNode.
name | Name of the behavior node |
behavior_type | Type of the behavior node |
blackboard_ptr | Blackboard of the behavior node |
|
virtualdefault |
|
inlinevirtual |
Add child behavior node to the composite node.
child_node_ptr | The expected child behavior node |
|
inlinevirtual |
Add a list of child behavior nodes to the composite node.
child_node_ptr | A list of the expected child behavior nodes |
|
inlinevirtual |
Get the child behavior node that it is turn to tick.
Reimplemented from roborts_decision::BehaviorNode.
|
inline |
Get the list of child behavior nodes.
|
inline |
Get the index of the child behavior node that it is turn to tick.
|
inline |
Get the number of child behavior nodes.
|
protectedpure virtual |
Initialize something before starting to tick the node.
Implements roborts_decision::BehaviorNode.
Implemented in roborts_decision::ParallelNode, and roborts_decision::SelectorNode.
|
protectedpure virtual |
Recover or reset something After getting the result.
state | Input behavior state |
Implements roborts_decision::BehaviorNode.
Implemented in roborts_decision::ParallelNode, and roborts_decision::SelectorNode.
|
protectedpure virtual |
Tick the node and update the state of the behavior node.
Implements roborts_decision::BehaviorNode.
Implemented in roborts_decision::ParallelNode, and roborts_decision::SelectorNode.
|
protected |
the index of child nodes
|
protected |
the list of child nodes