<?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>
            <Control ID="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}"/>
                <Control ID="WeightedRandom" weights="90,10">
                    <Sequence>
                        <Action ID="OffsetPose" input="-0.68,0,1.215" offset="0,0,0" orientation="0,-0.707,0,0.707" output="{target}"/>
                        <Action ID="RobotMove" target="{target}"/>
                    </Sequence>
                    <Sequence>
                        <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="SetCalledTo" state="true"/>
                    </Sequence>
                </Control>
            </Control>
        </ReactiveSequence>
    </BehaviorTree>
</root>

