The tree
Click a node to see what it does. Press + on a SubTree to draw it inline.
Field
Blue half and neutral zone, 2026 game, simplifiedLive log
Every status change. Click one to find its node.Tree XML
BehaviorTree.CPP v4, the same files Arbor opensNodes this robot knows (and their ports)
"Download for Arbor" saves a .zip in Arbor's project layout: bt_project.json, nodes.xml (the node list, with port types and enum values) and trees/. Unzip it and open the folder in Arbor. Your edits stay in this page only.
Things to try
- One node stays orange forever. On Drive, aim, shoot, tick "Camera can't see the target" and run it.
RetryUntilSuccessfulkeeps asking forever. That is the docs' "wrap it in a Timeout" case: compare with Pickup and score. - All green, nothing scored. Run the Real auto, then run it again with "Intake jams". The tree looks the same, but the robot shoots only the 8 fuel it started with. A tree only knows what its nodes check.
- Stuck behind a robot. Tick "Another robot blocks the path". FollowTrajectory fails after 3 s and the whole Sequence fails. In the XML, wrap that FollowTrajectory in
<ForceSuccess>and the auto carries on. - ParallelDeadline. In the Real auto, watch
DriveP1. When the path finishes,IntakeOnEventis halted if it is still waiting. Then try amiddle_wait_msecof 0. - Reactive vs. plain. Change a
SequencetoReactiveSequenceand step through it. Every tick starts again from the first child, and a child that already succeeded is reset when a later one runs. Watch Drive path start over and over: that is why ReactiveSequence is for conditions, not for steps. - Typos are errors. Change
msectomsc, orAIMtoAIMM. The lab refuses to run it and marks the node, the way the robot refuses to load the auto.
The pretend robot
A tiny super state machine, written the way our RobotContainer is. Every condition is in handleStateTransition(); updateLogic() only asks subsystems for states.
handleStateTransition():
switch (wanted):
AIM -> system = aimed ? AIM : AIMING
SHOOT -> system = ready ? SHOOT_FEED
: SHOOT_WAIT
else -> system = wanted
updateLogic():
switch (system):
AIMING, AIM -> shooter AIMING
SHOOT_WAIT -> shooter SHOOT
SHOOT_FEED -> shooter SHOOT, intake SQUEEZE
INTAKE -> intake INTAKE
AUTO -> nothing (the auto
sets subsystems)
Aiming takes 0.8 s and needs the camera, except at the spot right in front of the hub. The flywheel takes 0.6 s to spin up. The robot is never in SHOOT itself, so IsSystemState SHOOT never succeeds. That is why ShootFor uses a Sleep. The AIMING step state is made up for this lab.