BehaviorTree
Core Library to create and execute Behavior Trees
Loading...
Searching...
No Matches
BT::TestNodeConfig Struct Reference
Collaboration diagram for BT::TestNodeConfig:

Public Attributes

NodeStatus return_status = NodeStatus::SUCCESS
 
std::string success_script
 script to execute when complete_func() returns SUCCESS
 
std::string failure_script
 script to execute when complete_func() returns FAILURE
 
std::string post_script
 script to execute when actions is completed
 
std::chrono::milliseconds async_delay = std::chrono::milliseconds(0)
 if async_delay > 0, this action become asynchronous and wait this amount of time
 
std::function< NodeStatus(void)> complete_func
 
std::string return_status_script
 

Member Data Documentation

◆ complete_func

std::function<NodeStatus(void)> BT::TestNodeConfig::complete_func

Function invoked when the action is completed. If not specified, the node will use return_status_script when present, otherwise it will return [return_status].

◆ return_status

NodeStatus BT::TestNodeConfig::return_status = NodeStatus::SUCCESS

Status to return when the action is completed. If return_status_script is also set, the script takes precedence.

◆ return_status_script

std::string BT::TestNodeConfig::return_status_script

Optional script to compute the completion status dynamically.

This script is evaluated when the TestNode completes, after any async_delay has elapsed, using the current blackboard state. The result must resolve to the same set of statuses supported by return_status, except IDLE which is always rejected. When set, this takes precedence over return_status.

NOTE: kept last to preserve the byte offsets of the fields above.


The documentation for this struct was generated from the following file: