<?xml version="1.0"?>
<root main_tree_to_execute="robotTree">
    <BehaviorTree ID="robotTree">
        <ReactiveSequence>
            <Inverter>
                <Condition ID="InAreaTest" area="{unsafeArea}" pose="{actorPos}"/>
            </Inverter>
            <IfThenElse>
                <Condition ID="InAreaTest" area="{warningArea}" pose="{actorPos}"/>
                <Action ID="SetRobotVelocity" velocity="0.1"/>
                <Action ID="SetRobotVelocity" velocity="1"/>
            </IfThenElse>
            <Fallback>
                <InterruptableSequence>
                    <Action ID="GenerateXYPose" area="{negativeYTable}" pose="{target}"/>
                    <Action ID="OffsetPose" input="{target}" offset="0,0,1.1" orientation="0,0,1,0" output="{target}"/>
                    <Action ID="RobotMove" target="{target}"/>
                    <Action ID="RandomFailure" failure_chance="0.15"/>
                    <Action ID="GenerateXYPose" area="{positiveYTable}" pose="{target}"/>
                    <Action ID="OffsetPose" input="{target}" offset="0,0,1.1" orientation="0,0,1,0" output="{target}"/>
                    <Action ID="RobotMove" target="{target}"/>
                    <Action ID="RandomFailure" failure_chance="0.05"/>
                </InterruptableSequence>
                <Action ID="SetCalledTo" state="true"/>
            </Fallback>
        </ReactiveSequence>
    </BehaviorTree>
</root>

