Skip to content

Commit

Permalink
(roseus_bt) Fix tutorial SubTreePlus port remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Affonso-Gui committed Feb 16, 2023
1 parent cc30486 commit bff5b60
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
15 changes: 9 additions & 6 deletions roseus_bt/sample/models/t05_subtrees.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Action ID="InitWithBroom" name="Initialize Task"/>
<Action ID="setCoords" name="setBottleCoords" coords="${bottle_coords}"/>
<Sequence>
<SubTreePlus ID="PourTask" coords="bottle_coords"/>
<SubTreePlus ID="PourTask" coords="${bottle_coords}"/>
<SubTreePlus ID="SweepTask"/>
</Sequence>
</SequenceStar>
Expand All @@ -30,14 +30,18 @@
<Condition ID="atSpot" spot="broom-front"/>
<Action ID="MoveTo" spot="broom-front"/>
</Fallback>
<Timeout msec="5000">
<Action ID="SweepFloor"/>
</Timeout>
<ForceSuccess>
<Timeout msec="5000">
<Action ID="SweepFloor"/>
</Timeout>
</ForceSuccess>
</Sequence>
</BehaviorTree>
<!-- ////////// -->
<TreeNodesModel>
<SubTreePlus ID="PourTask"/>
<SubTreePlus ID="PourTask">
<input_port name="coords" type="geometry_msgs/Pose"/>
</SubTreePlus>
<SubTreePlus ID="SweepTask"/>

<Action ID="InitWithBroom" server_name="/t05_subtrees/init"/>
Expand All @@ -60,4 +64,3 @@
</TreeNodesModel>
<!-- ////////// -->
</root>

4 changes: 2 additions & 2 deletions roseus_bt/sample/models/t06_reactive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Condition ID="CheckTrue" value="${needs_drink}" name="NeedsDrink"/>
<SubTreePlus ID="SweepTask"/>
</ReactiveFallback>
<SubTreePlus ID="PourTask" coords="bottle_coords"/>
<SubTreePlus ID="PourTask" coords="${bottle_coords}"/>
</Sequence>
</SequenceStar>
</BehaviorTree>
Expand Down Expand Up @@ -40,7 +40,7 @@
<!-- ////////// -->
<TreeNodesModel>
<SubTreePlus ID="PourTask">
<input_port default="bottle_coords" name="coords" type=""/>
<input_port default="bottle_coords" name="coords" type="geometry_msgs/Pose"/>
</SubTreePlus>
<SubTreePlus ID="SweepTask"/>

Expand Down
4 changes: 2 additions & 2 deletions roseus_bt/sample/models/t07_xacro.xml.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<xacro:include filename="$(find roseus_bt)/sample/models/t07_xacro_sweep_task.xml.xacro"
ns="sweep_task"/>

<xacro:property name="namespace" value="/t07_xacro"/>
<xacro:property name="namespace" value="/t05_subtrees"/>

<!-- ////////// -->
<BehaviorTree ID="BehaviorTree">
<SequenceStar name="InitSequence">
<Action ID="InitWithBroom" name="Initialize Task"/>
<Action ID="setCoords" name="setBottleCoords" coords="$${bottle_coords}"/>
<Sequence>
<SubTreePlus ID="PourTask" coords="bottle_coords"/>
<SubTreePlus ID="PourTask" coords="$${bottle_coords}"/>
<SubTreePlus ID="SweepTask"/>
</Sequence>
</SequenceStar>
Expand Down
8 changes: 5 additions & 3 deletions roseus_bt/sample/models/t07_xacro_sweep_task.xml.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<Condition ID="atSpot" spot="broom-front"/>
<Action ID="MoveTo" spot="broom-front"/>
</Fallback>
<Timeout msec="5000">
<Action ID="SweepFloor"/>
</Timeout>
<ForceSuccess>
<Timeout msec="5000">
<Action ID="SweepFloor"/>
</Timeout>
</ForceSuccess>
</Sequence>
</BehaviorTree>
</xacro:macro>
Expand Down

0 comments on commit bff5b60

Please sign in to comment.