Skip to content

Instantly share code, notes, and snippets.

@curds01
Created February 5, 2019 16:27
Show Gist options
  • Save curds01/025c125fdeef5fd7dc31076d6d4ee145 to your computer and use it in GitHub Desktop.
Save curds01/025c125fdeef5fd7dc31076d6d4ee145 to your computer and use it in GitHub Desktop.
Variant of pedModelSwap with delayed start for left-to-right agents.
<?xml version="1.0"?>
<BFSM>
<GoalSet id="0">
<Goal id="0" type="AABB" min_x="-2" max_x="2" min_y="-10" max_y="-5" weight="1.0" />
<Goal id="1" type="AABB" min_x="-10" min_y="-2" max_x="-5" max_y="2" />
</GoalSet>
<State name="MoveDown" speedPolicy="min" final="0" >
<GoalSelector type="explicit" goal_set="0" goal="0" />
<VelComponent type="goal" weight="1.0" />
</State>
<State name="GoalReachedDown" speedPolicy="min" final="1" >
<GoalSelector type="identity" />
<VelComponent type="zero" />
</State>
<Transition order="1" from="MoveDown" to="GoalReachedDown">
<Condition type="goal_reached" distance="0.25" />
</Transition>
<State name="WaitLeft" speedPolicy="min" final="0" >
<GoalSelector type="identity" />
<VelComponent type="zero" />
</State>
<State name="MoveLeft" speedPolicy="min" final="0" >
<GoalSelector type="explicit" goal_set="0" goal="1" />
<VelComponent type="goal" weight="1.0" />
</State>
<State name="GoalReachedLeft" speedPolicy="min" final="1" >
<GoalSelector type="identity" />
<VelComponent type="zero" />
</State>
<Transition order="1" from="MoveLeft" to="GoalReachedLeft">
<Condition type="goal_reached" distance="0.25" />
</Transition>
<Transition order="1" from"WaitLeft" to "MoveLeft">
<Condition type="timer" dist="c" value="3" />
</Transition>
</BFSM>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment