Decision Module
1.0
ICRA2020 AI Challenge Northwestern Polytechnical University Aoxiang Team Strategy Code
|
Behavior tree selector node inherited from CompositeNode. More...
#include <behavior_node.h>
Public Member Functions | |
SelectorNode (std::string name, const Blackboard::Ptr &blackboard_ptr) | |
Constructor of SelectorNode. More... | |
virtual | ~SelectorNode ()=default |
virtual void | AddChildren (std::initializer_list< std::shared_ptr< AbstractCommonStrategy >> child_node_ptr_list) |
![]() | |
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 | |
void | SetChildrenIndex (unsigned int children_node_index) |
Set the index of the child node to tick. More... | |
virtual void | OnInitialize () |
Initialize something before starting to tick the node. More... | |
virtual BehaviorState | Update () |
Tick the node and update the state of the behavior node. More... | |
std::shared_ptr< AbstractCommonStrategy > | GetAction () |
bool | HasActionOnGoing () |
void | ExitThisAction () |
std::shared_ptr< AbstractCommonStrategy > | ChooseActionToExecute () |
void | OnTerminate (BehaviorState state) |
Recover or reset something After getting the result. More... | |
Private Attributes | |
std::shared_ptr< AbstractCommonStrategy > | ptr_selector_node_ |
std::vector< std::shared_ptr< AbstractCommonStrategy > > | children_node_ptr_vector_ |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< BehaviorNode > | Ptr |
![]() | |
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... | |
Behavior tree selector node inherited from CompositeNode.
|
inline |
Constructor of SelectorNode.
name | Name of the behavior node |
blackboard_ptr | Blackboard of the behavior node |
|
virtualdefault |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotectedvirtual |
Initialize something before starting to tick the node.
Implements roborts_decision::CompositeNode.
|
protectedvirtual |
Recover or reset something After getting the result.
state | Input behavior state |
Implements roborts_decision::CompositeNode.
|
protected |
Set the index of the child node to tick.
children_node_index | The expected index of the child node to tick |
|
protectedvirtual |
Tick the node and update the state of the behavior node.
Implements roborts_decision::CompositeNode.
|
private |
|
private |