<?xml version="1.0"?>
<root main_tree_to_execute="actorTree">
    <BehaviorTree ID="actorTree">
        <Sequence>
            <Control ID="WeightedRandom" weights="95,5">
                <Sequence>
                    <SubTree ID="WorkOnBench"/>
                    <SubTree ID="DepositToShelf"/>
                </Sequence>
                <Sequence>
                    <Action ID="GenerateXYPose" area="{unsafeArea}" pose="{actorTarget}"/>
                    <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="{actorTarget}"/>
                </Sequence>
            </Control>
            <Condition ID="IsCalled"/>
            <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="1,0.5,0,0,0,0,1"/>
            <Action ID="ActorAnimation" animation_name="standing_extend_arm"/>
            <Action ID="ActorAnimation" animation_name="standing_retract_arm"/>
            <Action ID="SetCalledTo" state="false"/>
        </Sequence>
    </BehaviorTree>
    <BehaviorTree ID="DepositToShelf">
        <Sequence>
            <WeightedRandom weights="1,1,1">
                <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="5.5,0,0,0.707,0,0,-0.707"/>
                <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="6.5,0,0,0.707,0,0,-0.707"/>
                <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="7.5,0,0,0.707,0,0,-0.707"/>
            </WeightedRandom>
            <WeightedRandom weights="1,1">
                <Sequence>
                    <Action ID="ActorAnimation" animation_name="standing_extend_arm"/>
                    <Action ID="ActorAnimation" animation_name="standing_retract_arm"/>
                </Sequence>
                <Sequence>
                    <Action ID="ActorAnimation" animation_name="standing_to_low"/>
                    <Action ID="ActorAnimation" animation_name="low_inspect"/>
                    <Action ID="ActorAnimation" animation_name="low_put_back"/>
                    <Action ID="ActorAnimation" animation_name="low_to_standing"/>
                </Sequence>
            </WeightedRandom>
        </Sequence>
    </BehaviorTree>
    <BehaviorTree ID="WorkOnBench">
        <Sequence>
            <Action ID="ActorMovement" animation_distance="1.5" animation_name="standing_walk" target="6.5,6,0,0.707,0,0,0.707"/>
            <Action ID="ActorAnimation" animation_name="standing_extend_arm"/>
            <Action ID="ActorAnimation" animation_name="standing_retract_arm"/>
        </Sequence>
    </BehaviorTree>
</root>

