BlockUntilParameterIsTrue Class
Block (return RUNNING) until a blackboard entry evaluates as true, then return SUCCESS. More...
Declaration
class moveit_pro::behaviors::BlockUntilParameterIsTrue { ... }
#include <block_until_parameter_is_true.hpp>
Base class
| class | BT::StatefulActionNode |
|
Public Constructors Index
Public Member Functions Index
Private Member Functions Index
Private Member Attributes Index
Public Static Functions Index
Description
Block (return RUNNING) until a blackboard entry evaluates as true, then return SUCCESS.
Reads the blackboard entry named in the parameter_name input port on every tick. The behavior succeeds the first tick the entry reads as true; until then it returns RUNNING. The parameter is referenced by literal name (e.g. parameter_name="my_flag"), not as a {blackboard pointer}, because the entry is resolved dynamically by name.
Use under a Parallel control to gate one branch on a flag set by another branch — typically a coarse "phase complete" handshake between cooperating subtrees.
Cycle time is bounded by the BT executor's tick period, which is generally indistinguishable from event-driven for orchestration purposes.
| Data Port Name | Port Type | Object Type |
|---|
| parameter_name | input | std::string |
Outcomes:
- Entry missing or registered but not yet written → RUNNING. The writer may legitimately not have run yet; the behavior keeps polling.
- Entry present and reads as true → SUCCESS. Accepted forms:
- Native bool true (setOutput<bool>(...) from a C++ behavior).
- Native int non-zero (setOutput<int>(...); e.g. 1).
- String "true" or "1" as written by XML <SetBlackboard value="true"/> (XML attribute values are always strings, even when they look numeric).
- Entry present and reads as false → RUNNING. The corresponding false forms: native bool false, native int 0, string "false" or "0".
- Entry present but cannot be interpreted as bool → FAILURE + error log. Examples: a string like "yes" that is not parseable by BT.CPP's bool converter, or an entry whose stored type is neither bool, int, nor string. Surfacing these as FAILURE makes configuration mistakes (typos, wrong-type writers) immediately diagnosable rather than silently parking the gate forever.
Definition at line 52 of file block_until_parameter_is_true.hpp.
Public Constructors
BlockUntilParameterIsTrue()
| moveit_pro::behaviors::BlockUntilParameterIsTrue::BlockUntilParameterIsTrue (const std::string & name, const BT::NodeConfiguration & config) |
|
Public Member Functions
onHalted()
| void moveit_pro::behaviors::BlockUntilParameterIsTrue::onHalted () |
|
onRunning()
| BT::NodeStatus moveit_pro::behaviors::BlockUntilParameterIsTrue::onRunning () |
|
onStart()
| BT::NodeStatus moveit_pro::behaviors::BlockUntilParameterIsTrue::onStart () |
|
Private Member Functions
evaluateGate()
| BT::NodeStatus moveit_pro::behaviors::BlockUntilParameterIsTrue::evaluateGate () |
|
Evaluate the watched blackboard entry. SUCCESS if it reads as true; RUNNING if it reads as false, is absent, or has been registered but not yet written; FAILURE if it exists but cannot be interpreted as bool.
Declaration at line 73 of file block_until_parameter_is_true.hpp, definition at line 89 of file block_until_parameter_is_true.cpp.
Private Member Attributes
parameter_name_
| std::string moveit_pro::behaviors::BlockUntilParameterIsTrue::parameter_name_ |
|
Public Static Functions
metadata()
| BT::KeyValueVector moveit_pro::behaviors::BlockUntilParameterIsTrue::metadata () |
|
static
|
providedPorts()
| BT::PortsList moveit_pro::behaviors::BlockUntilParameterIsTrue::providedPorts () |
|
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.