Skip to content

Commit

Permalink
Update ForEach[Type] -> ForEach
Browse files Browse the repository at this point in the history
  • Loading branch information
dyackzan committed Dec 30, 2024
1 parent 17eb85f commit 06eecdc
Show file tree
Hide file tree
Showing 26 changed files with 32 additions and 104 deletions.
6 changes: 1 addition & 5 deletions src/lab_sim/objectives/pick_first_object_in_vector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
_subtreeOnly="true"
_description=""
>
<Decorator
ID="ForEachPoseStamped"
vector_in="{pose_vector}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{pose_vector}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="LoadObjectiveParameters"
Expand Down
6 changes: 1 addition & 5 deletions src/lab_sim/objectives/place_first_object_in_vector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
_subtreeOnly="true"
_description=""
>
<Decorator
ID="ForEachPoseStamped"
vector_in="{pose_vector}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{pose_vector}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="LoadObjectiveParameters"
Expand Down
2 changes: 1 addition & 1 deletion src/lab_sim/objectives/plan_to_pose.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Action ID="SetupMTCCurrentState" task="{mtc_task}" />
<Action ID="Script" code="pose_ctr := 0" />
<Decorator
ID="ForEachPoseStamped"
ID="ForEach"
vector_in="{target_poses}"
out="{target_pose}"
index="{index}"
Expand Down
2 changes: 1 addition & 1 deletion src/lab_sim/objectives/run_sam2_onnx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
timeout_sec="5.000000"
/>
<Action ID="GetMasks3DFromMasks2D" />
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Action ID="GetPointCloudFromMask3D" point_cloud="{point_cloud}" />
</Decorator>
<Action ID="SendPointCloudToUI" point_cloud="{point_cloud_fragment}" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
<root BTCPP_format="4" main_tree_to_execute="Pick first object in vector">
<!--//////////-->
<BehaviorTree ID="Pick first object in vector">
<Decorator
ID="ForEachPoseStamped"
vector_in="{pose_vector}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{pose_vector}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="LoadObjectiveParameters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
output_poses="{output_poses}"
/>
<!--Flip the direction of the grasp pose-->
<Decorator
ID="ForEachPoseStamped"
vector_in="{output_poses}"
out="{flipped_pose}"
>
<Decorator ID="ForEach" vector_in="{output_poses}" out="{flipped_pose}">
<Action
ID="TransformPose"
output_pose="{corrected_pose}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
_subtreeOnly="true"
_description=""
>
<Decorator
ID="ForEachPoseStamped"
vector_in="{pose_vector}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{pose_vector}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="LoadObjectiveParameters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
_subtreeOnly="true"
_description=""
>
<Decorator
ID="ForEachPoseStamped"
vector_in="{pose_vector}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{pose_vector}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="LoadObjectiveParameters"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
neighbor_radius="0.1"
output_poses="{output_poses}"
/>
<Decorator
ID="ForEachPoseStamped"
vector_in="{output_poses}"
out="{pose}"
>
<Decorator ID="ForEach" vector_in="{output_poses}" out="{pose}">
<Control ID="Sequence">
<Action
ID="TransformPose"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
camera_info="{camera_info}"
masks3d="{masks3d}"
/>
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Control ID="Sequence">
<Action
ID="GetPointCloudFromMask3D"
Expand Down Expand Up @@ -82,11 +82,7 @@
/>
</Decorator>
<Decorator ID="ForceSuccess">
<Decorator
ID="ForEachGraspableObject"
vector_in="{door_objects}"
out="{door_object}"
>
<Decorator ID="ForEach" vector_in="{door_objects}" out="{door_object}">
<Action ID="AlwaysFailure" />
</Decorator>
</Decorator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
camera_info="{camera_info}"
masks3d="{masks3d}"
/>
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Control ID="Sequence">
<Action
ID="GetPointCloudFromMask3D"
Expand Down Expand Up @@ -81,7 +81,7 @@
/>
<Decorator ID="ForceSuccess">
<Decorator
ID="ForEachGraspableObject"
ID="ForEach"
vector_in="{handle_objects}"
out="{handle_object}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
masks3d="{masks3d}"
/>
<Decorator ID="ForceSuccess">
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Action ID="AlwaysFailure" />
</Decorator>
</Decorator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
camera_info="{camera_info}"
masks3d="{masks3d}"
/>
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Control ID="Sequence">
<Action
ID="GetPointCloudFromMask3D"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
neighbor_radius="0.1"
output_poses="{output_poses}"
/>
<Decorator
ID="ForEachPoseStamped"
vector_in="{output_poses}"
out="{pose}"
>
<Decorator ID="ForEach" vector_in="{output_poses}" out="{pose}">
<Control ID="Sequence">
<Action
ID="TransformPose"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@
detected_shapes="{cuboids}"
/>

<!-- Get the first detected cuboid. NOTE: this is a small hack to get ForEachGraspableObject to iterate just once, which returns the first object in the vector. -->
<!-- Get the first detected cuboid. NOTE: this is a small hack to get ForEach to iterate just once, which returns the first object in the vector. -->
<Control ID="Sequence">
<Decorator ID="ForceSuccess">
<Decorator
ID="ForEachGraspableObject"
ID="ForEach"
vector_in="{cuboids}"
out="{cuboid_object}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@
output_poses="{hinge_poses}"
/>
<!--Set up Subframes for MTC-->
<Decorator
ID="ForEachPoseStamped"
vector_in="{grasp_poses}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{grasp_poses}" out="{grasp_pose}">
<Action
ID="GetMoveAlongArcSubframes"
target_grasp_pose="{grasp_pose}"
Expand All @@ -87,7 +83,7 @@
/>
<!--Add the subframes to the Object-->
<Decorator
ID="ForEachObjectSubframe"
ID="ForEach"
vector_in="{move_along_arc_subframes}"
out="{subframe}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
/>
<!-- Add the subframes to the Object-->
<Decorator
ID="ForEachObjectSubframe"
ID="ForEach"
vector_in="{move_along_arc_subframes}"
out="{subframe}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
grasp_and_twist_subframes="{grasp_and_twist_subframes}"
/>
<Decorator
ID="ForEachObjectSubframe"
ID="ForEach"
vector_in="{grasp_and_twist_subframes}"
out="{subframe}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
/>
<!--Add the subframes to the Object-->
<Decorator
ID="ForEachObjectSubframe"
ID="ForEach"
vector_in="{grasp_and_twist_subframes}"
out="{subframe}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@
adjusted_poses="{adjusted_poses}"
/>
</Control>
<Decorator
ID="ForEachPoseStamped"
vector_in="{adjusted_poses}"
out="{grasp_pose}"
>
<Decorator ID="ForEach" vector_in="{adjusted_poses}" out="{grasp_pose}">
<Control ID="Sequence">
<Action
ID="InitializeMTCTask"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
adjusted_poses="{adjusted_poses}"
/>
<Decorator
ID="ForEachPoseStamped"
ID="ForEach"
vector_in="{adjusted_poses}"
out="{grasp_pose}"
>
Expand Down Expand Up @@ -208,7 +208,7 @@
adjusted_poses="{adjusted_poses}"
/>
<Decorator
ID="ForEachPoseStamped"
ID="ForEach"
vector_in="{adjusted_poses}"
out="{grasp_pose}"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
neighbor_radius="0.1"
output_poses="{output_poses}"
/>
<Decorator
ID="ForEachPoseStamped"
vector_in="{output_poses}"
out="{pose}"
>
<Decorator ID="ForEach" vector_in="{output_poses}" out="{pose}">
<Control ID="Sequence">
<Action
ID="TransformPose"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
camera_info="{camera_info}"
masks3d="{masks3d}"
/>
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Control ID="Sequence">
<Action
ID="GetPointCloudFromMask3D"
Expand All @@ -81,11 +81,7 @@
graspable_objects="{graspable_objects}"
/>
<Decorator ID="ForceSuccess">
<Decorator
ID="ForEachGraspableObject"
vector_in="{graspable_objects}"
out="{button}"
>
<Decorator ID="ForEach" vector_in="{graspable_objects}" out="{button}">
<Action ID="AlwaysFailure" />
</Decorator>
</Decorator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
camera_info="{camera_info}"
masks3d="{masks3d}"
/>
<Decorator ID="ForEachMask3D" vector_in="{masks3d}" out="{mask3d}">
<Decorator ID="ForEach" vector_in="{masks3d}" out="{mask3d}">
<Control ID="Sequence">
<Action
ID="GetPointCloudFromMask3D"
Expand All @@ -102,11 +102,7 @@
face_separation_threshold="0.025000"
point_cloud="{point_cloud}"
/>
<Decorator
ID="ForEachGraspableObject"
vector_in="{objects}"
out="{object}"
>
<Decorator ID="ForEach" vector_in="{objects}" out="{object}">
<Control ID="Sequence">
<Action
ID="InitializeMTCTask"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
output_pose="{tag_pose_world}"
/>
<Decorator
ID="ForEachPoseStamped"
ID="ForEach"
vector_in="{adjusted_poses}"
out="{user_grasp_pose}"
>
Expand Down

0 comments on commit 06eecdc

Please sign in to comment.