Skip to content

Commit

Permalink
Create complex.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Apr 16, 2024
1 parent 3b67872 commit fcdb169
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions app/backend/xml/complex.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<BehaviourTree>
<Root id="Main">
<Selector>
<UseRoot id="Front"/>
<UseRoot id="Behind"/>
<UseRoot id="Left"/>
<UseRoot id="Right"/>
<UseRoot id="Move"/>
</Selector>
</Root>

<Root id="Move">
<Sequence>
<Action:SetWheelDirection direction_type="Forward" wheel_type="Both"/>
<Action:SetAngle angle="90" servo_type="FrontWheels"/>
<Action:SetSpeed speed="60" wheel_type="Both"/>
</Sequence>
</Root>

<Root id="Front">
<Sequence>
<Condition:SuccessOnAverageNearbyScan min_angle="45" max_angle="135" cm="33"/>
<Action:SetWheelDirection direction_type="Backward" wheel_type="Both"/>
<Action:SetAngle angle="180" servo_type="FrontWheels"/>
<Action:SetSpeed speed="60" wheel_type="Both"/>
</Sequence>
</Root>

<Root id="Behind">
<Sequence>
<Condition:SuccessOnAverageNearbyScan min_angle="225" max_angle="315" cm="33"/>
<Action:SetWheelDirection direction_type="Forward" wheel_type="Both"/>
<Action:SetAngle angle="90" servo_type="FrontWheels"/>
<Action:SetSpeed speed="100" wheel_type="Both"/>
</Sequence>
</Root>

<Root id="Left">
<Sequence>
<Condition:SuccessOnAverageNearbyScan min_angle="0" max_angle="45" cm="33"/>
<Condition:SuccessOnAverageNearbyScan min_angle="315" max_angle="360" cm="33"/>
<Action:SetWheelDirection direction_type="Forward" wheel_type="Both"/>
<Action:SetAngle angle="180" servo_type="FrontWheels"/>
<Action:SetSpeed speed="60" wheel_type="Both"/>
</Sequence>
</Root>

<Root id="Right">
<Sequence>
<Condition:SuccessOnAverageNearbyScan min_angle="135" max_angle="225" cm="33"/>
<Action:SetWheelDirection direction_type="Forward" wheel_type="Both"/>
<Action:SetAngle angle="0" servo_type="FrontWheels"/>
<Action:SetSpeed speed="60" wheel_type="Both"/>
</Sequence>
</Root>

</BehaviourTree>

0 comments on commit fcdb169

Please sign in to comment.