IsBlackboardVariableSet Class
Checks whether a blackboard variable holds a value. Returns SUCCESS if the variable has been written to, FAILURE if it does not exist or was only declared by a port or SubTree remap. Wrap it in an Inverter to branch on a variable being unset. More...
Declaration
Included Headers
Base class
| class | BT::SyncActionNode |
Public Member Functions Index
| BT::NodeStatus | tick () override |
Public Static Functions Index
| static BT::PortsList | providedPorts () |
| static BT::KeyValueVector | metadata () |
Description
Checks whether a blackboard variable holds a value. Returns SUCCESS if the variable has been written to, FAILURE if it does not exist or was only declared by a port or SubTree remap. Wrap it in an Inverter to branch on a variable being unset.
The name is resolved the way a {name} port is: through SubTree remaps and _autoremap, and a leading @ reads the root blackboard. A value written as an empty string or 0 counts as set. UnsetBlackboard follows neither SubTree remaps nor @, so inside a SubTree a variable remapped from the parent stays set until the parent unsets it.
A missing or empty variable_name, or one written with braces, is an authoring error and throws BT::RuntimeError, so the Objective fails with the message instead of silently taking the "unset" branch.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| variable_name | input | std::string |
Definition at line 31 of file is_blackboard_variable_set.hpp.
Public Member Functions
tick()
|
Declaration at line 40 of file is_blackboard_variable_set.hpp, definition at line 45 of file is_blackboard_variable_set.cpp.
Public Static Functions
metadata()
| static |
Declaration at line 38 of file is_blackboard_variable_set.hpp, definition at line 32 of file is_blackboard_variable_set.cpp.
providedPorts()
| static |
Declaration at line 36 of file is_blackboard_variable_set.hpp, definition at line 23 of file is_blackboard_variable_set.cpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.