Node types reference

Composite nodes

Composites have one or more children. They control the flow of execution across those children and return a final status.

Node Behavior When to use
Sequence Runs children left-to-right. Returns FAILURE on the first child that fails; SUCCESS only if all succeed. Mandatory ordered steps: "check battery, then move, then report".
Selector Runs children left-to-right. Returns SUCCESS on the first child that succeeds; FAILURE only if all fail. Fallback strategies: "try GPS, fall back to wheel odometry, fall back to 'I am lost'".
Parallel Ticks all children every tick. Success policy is configurable (default: succeed when N of M succeed). Concurrent sensing: "look at the camera, the lidar, and the IMU at the same time".
RandomSelector Picks one child at random and runs only that one. Behavior variety: "say one of three greetings at random".
RandomSequence Like Sequence but the child order is randomized each run. Stress-testing: shuffle test steps to surface order-dependent bugs.

Example: Patrol selector with battery fallback

Selector
├── IsBatteryAbove (Condition: 20%)
│   └── Wait 5.0
│       └── PatrolRoute (Action)
└── ReturnToCharger (Action)

The robot patrols while the battery is above 20%. The moment the battery check fails, the Selector skips the rest and runs ReturnToCharger instead.

Action nodes

Leaves that do work. They tick a runtime and return when done.

Node Behavior Ports
AlwaysSuccess Returns SUCCESS immediately. Useful as a default leaf in a Selector. —
AlwaysFailure Returns FAILURE immediately. Useful for forcing a fallback path during testing. —
Wait Returns RUNNING until duration seconds have passed, then SUCCESS. duration: float
Log Emits a log message and returns SUCCESS. message: string
MySimpleAction Demo leaf. Replace with your own domain actions (Drive, Grip, Look, etc.). —

Condition nodes

Leaves that read external state and return SUCCESS/FAILURE.

Node Behavior
IsEnable Returns SUCCESS if the system enable flag is set.
IsSystemRunning Returns SUCCESS if the main runtime is in the RUNNING state.

Both of these are stubs. In a real deployment you'd register custom Condition nodes for your domain (e.g. IsDoorOpen, HasLineOfSight, BatteryAbove(20%)). See Define custom node types.

Decorator nodes

Wrap exactly one child and modify its behavior.

Node Behavior Ports
Inverter Flips SUCCESS ↔ FAILURE. RUNNING passes through. —
Repeater Repeats the child count times. Useful for "do this N times then continue". count: int
Delay Returns RUNNING for delay seconds, then ticks the child once. delay: int
UntilSuccess Keeps ticking the child until it returns SUCCESS. —
UntilFailure Keeps ticking the child until it returns FAILURE. —
ForceSuccess Runs the child once, then overwrites the result to SUCCESS regardless. —
ForceFailure Runs the child once, then overwrites the result to FAILURE. —
Timeout Ticks the child but returns FAILURE if it doesn't finish within timeout seconds. timeout: float

Example: Retry a flaky network call 3 times

Sequence
├── Timeout 5.0
│   └── Repeater 3
│       └── HttpGetStatus
└── FallbackLogError

The Timeout caps each attempt at 5 seconds. The Repeater tries up to 3 times. If all three fail, the Sequence falls through to FallbackLogError.

Status values

Every node tick returns one of four statuses:

Status Meaning Visualization
IDLE Not yet ticked or explicitly reset. Gray
RUNNING Still executing; will be ticked again next cycle. Blue
SUCCESS Done, succeeded. Green
FAILURE Done, failed. Red
Note

"Status" in this context is the node's return value, not a lifecycle phase. A node can return SUCCESS once and never run again. See Reactive control patterns for the deeper theory.

← Getting started Import & export →