Skip to content

Commit ca4a3f5

Browse files
authored
Merge pull request #1 from PickNikRobotics/add-custom-pick-and-place-example
Add pick and place example using custom MTC example behavior
2 parents 1e42730 + 0a553e9 commit ca4a3f5

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/lab_sim/config/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ objectives:
4343
- "moveit_studio::behaviors::ServoBehaviorsLoader"
4444
- "moveit_studio::behaviors::VisionBehaviorsLoader"
4545
- "picknik_registration::PicknikRegistrationBehaviorsLoader"
46+
- "example_behaviors::ExampleBehaviorsLoader"
4647
# Specify source folder for objectives
4748
# [Required]
4849
objective_library_paths:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<root BTCPP_format="4" main_tree_to_execute="Pick And Place Example">
3+
<!-- ////////// -->
4+
<BehaviorTree ID="Pick And Place Example" _description="Pick and place example objective" _favorite="true" _hardcoded="false">
5+
<Control ID="Sequence" name="Pick and Place">
6+
<SubTree ID="Open Gripper"/>
7+
<Control ID="Sequence" name="Pick">
8+
<Action ID="CreateStampedPose" reference_frame="world" position_xyz="0.01;.75;0.515" orientation_xyzw="0;1;0;0" stamped_pose="{pick_pose}"/>
9+
<Action ID="InitializeMTCTask" task_id="pick_task" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" task="{mtc_pick_task}"/>
10+
<Action ID="SetupMTCCurrentState" task="{mtc_pick_task}"/>
11+
<Action ID="SetupMtcPickFromPose" grasp_pose="{pick_pose}" task="{mtc_pick_task}"/>
12+
<Action ID="PlanMTCTask" task="{mtc_pick_task}" solution="{mtc_pick_solution}"/>
13+
<Action ID="ExecuteMTCTask" solution="{mtc_pick_solution}"/>
14+
</Control>
15+
<Control ID="Sequence" name="Place">
16+
<Action ID="InitializeMTCTask" task_id="place_task" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" task="{mtc_place_task}"/>
17+
<Action ID="SetupMTCCurrentState" task="{mtc_place_task}"/>
18+
<Action ID="CreateStampedPose" reference_frame="world" position_xyz="0.01;.75;0.5.15" orientation_xyzw="0;1;0;0" stamped_pose="{place_pose}"/>
19+
<Action ID="SetupMtcPlaceFromPose" place_pose="{place_pose}" task="{mtc_place_task}"/>
20+
<Action ID="PlanMTCTask" task="{mtc_place_task}" solution="{mtc_place_solution}"/>
21+
<Action ID="ExecuteMTCTask" solution="{mtc_place_solution}"/>
22+
</Control>
23+
</Control>
24+
</BehaviorTree>
25+
</root>

0 commit comments

Comments
 (0)