|
1 | | -<?xml version="1.0" encoding="UTF-8" ?> |
2 | | -<root |
3 | | - BTCPP_format="4" |
4 | | - main_tree_to_execute="ML Auto Grasp Object from Clicked Point" |
5 | | -> |
| 1 | +<?xml version='1.0' encoding='UTF-8'?> |
| 2 | +<root BTCPP_format="4" main_tree_to_execute="ML Auto Grasp Object from Clicked Point"> |
6 | 3 | <!--//////////--> |
7 | | - <BehaviorTree |
8 | | - ID="ML Auto Grasp Object from Clicked Point" |
9 | | - _description="Asks user to click on object to auto grasp and asks for approval before attempting pick." |
10 | | - _favorite="false" |
11 | | - > |
| 4 | + <BehaviorTree ID="ML Auto Grasp Object from Clicked Point" _description="Asks user to click on object to auto grasp and asks for approval before attempting pick." _favorite="false"> |
12 | 5 | <Control ID="Sequence" name="TopLevelSequence"> |
13 | | - <Action |
14 | | - ID="LogMessage" |
15 | | - log_level="warn" |
16 | | - message="There might be some warnings and errors when this Objective runs, as long as the Objective completes successfully, everything worked as intended." |
17 | | - name="Caution about errors" |
18 | | - /> |
19 | | - <SubTree ID="Open Gripper" _collapsed="true" /> |
20 | | - <SubTree |
21 | | - ID="Fuse Multiple Views Subtree" |
22 | | - _collapsed="true" |
23 | | - merged_cloud="{point_cloud}" |
24 | | - waypoint1="Look at Objects - Right" |
25 | | - waypoint2="Look at Objects - Top" |
26 | | - waypoint3="Look at Objects - Left" |
27 | | - name="Scan the scene for a good point cloud" |
28 | | - /> |
29 | | - <SubTree ID="Look at Table" _collapsed="true" /> |
30 | | - <SubTree |
31 | | - ID="Segment Image from Point Subtree" |
32 | | - _collapsed="true" |
33 | | - encoder_model_path="models/sam2_hiera_large_encoder.onnx" |
34 | | - image_topic_name="/wrist_camera/color" |
35 | | - masks_visualization_topic="/masks_visualization" |
36 | | - masks2d="{masks2d}" |
37 | | - model_package="lab_sim" |
38 | | - pixel_coords="{pixel_coords}" |
39 | | - decoder_model_path="models/decoder.onnx" |
40 | | - name="Ask the user to pick an object" |
41 | | - /> |
42 | | - <Action |
43 | | - ID="GetCameraInfo" |
44 | | - message_out="{camera_info}" |
45 | | - timeout_sec="5.000000" |
46 | | - topic_name="/wrist_camera/camera_info" |
47 | | - publisher_timeout_sec="5.000000" |
48 | | - /> |
49 | | - <Action |
50 | | - ID="GetMasks3DFromMasks2D" |
51 | | - camera_info="{camera_info}" |
52 | | - masks2d="{masks2d}" |
53 | | - masks3d="{masks3d}" |
54 | | - point_cloud="{point_cloud}" |
55 | | - name="Project the 2D mask to 3D" |
56 | | - /> |
57 | | - <SubTree |
58 | | - ID="Visualize Segmented Point Cloud" |
59 | | - _collapsed="true" |
60 | | - masks3d="{masks3d}" |
61 | | - point_cloud="{point_cloud}" |
62 | | - /> |
63 | | - <Decorator |
64 | | - ID="ForEachUntilSuccess" |
65 | | - index="{index}" |
66 | | - out="{mask3d}" |
67 | | - vector_in="{masks3d}" |
68 | | - name="Mask out the first cloud that work" |
69 | | - > |
70 | | - <Action |
71 | | - ID="GetPointCloudFromMask3D" |
72 | | - mask3d="{mask3d}" |
73 | | - point_cloud="{point_cloud}" |
74 | | - point_cloud_fragment="{point_cloud_fragment}" |
75 | | - /> |
| 6 | + <Action ID="LogMessage" log_level="warn" message="There might be some warnings and errors when this Objective runs, as long as the Objective completes successfully, everything worked as intended." name="Caution about errors"/> |
| 7 | + <SubTree ID="Open Gripper" _collapsed="true"/> |
| 8 | + <SubTree ID="Fuse Multiple Views Subtree" _collapsed="true" merged_cloud="{point_cloud}" waypoint1="Look at Objects - Right" waypoint2="Look at Objects - Top" waypoint3="Look at Objects - Left" name="Scan the scene for a good point cloud"/> |
| 9 | + <SubTree ID="Look at Table" _collapsed="true"/> |
| 10 | + <SubTree ID="Segment Image from Point Subtree" _collapsed="true" encoder_model_path="models/sam2_hiera_large_encoder.onnx" image_topic_name="/wrist_camera/color" masks_visualization_topic="/masks_visualization" masks2d="{masks2d}" model_package="lab_sim" pixel_coords="{pixel_coords}" decoder_model_path="models/decoder.onnx" name="Ask the user to pick an object"/> |
| 11 | + <Action ID="GetCameraInfo" message_out="{camera_info}" timeout_sec="5.000000" topic_name="/wrist_camera/camera_info" publisher_timeout_sec="5.000000"/> |
| 12 | + <Action ID="GetMasks3DFromMasks2D" camera_info="{camera_info}" masks2d="{masks2d}" masks3d="{masks3d}" point_cloud="{point_cloud}" name="Project the 2D mask to 3D"/> |
| 13 | + <SubTree ID="Visualize Segmented Point Cloud" _collapsed="true" masks3d="{masks3d}" point_cloud="{point_cloud}"/> |
| 14 | + <Decorator ID="ForEachUntilSuccess" index="{index}" out="{mask3d}" vector_in="{masks3d}" name="Mask out the first cloud that work"> |
| 15 | + <Action ID="GetPointCloudFromMask3D" mask3d="{mask3d}" point_cloud="{point_cloud}" point_cloud_fragment="{point_cloud_fragment}"/> |
76 | 16 | </Decorator> |
77 | | - <Action |
78 | | - ID="GetGraspPoseFromPointCloud" |
79 | | - grasps="{grasps}" |
80 | | - number_of_grasps_to_return="10" |
81 | | - point_cloud="{point_cloud_fragment}" |
82 | | - model_package="lab_sim" |
83 | | - model_path="models/l2g.onnx" |
84 | | - /> |
85 | | - <SubTree |
86 | | - ID="Reflect Poses Subtree" |
87 | | - _collapsed="true" |
88 | | - input_poses="{grasps}" |
89 | | - output_poses="{grasps_z_modified}" |
90 | | - name="Add z reflected poses" |
91 | | - reflection_axis="0;0;1;0" |
92 | | - /> |
93 | | - <SubTree |
94 | | - ID="Reflect Poses Subtree" |
95 | | - _collapsed="true" |
96 | | - input_poses="{grasps_z_modified}" |
97 | | - output_poses="{grasps_zy_modified}" |
98 | | - name="Add y reflected poses" |
99 | | - reflection_axis="0;1;0;0" |
100 | | - /> |
101 | | - <SubTree ID="Add Table to Planning Scene" _collapsed="true" /> |
102 | | - <Decorator |
103 | | - ID="ForEachUntilSuccess" |
104 | | - index="{index}" |
105 | | - vector_in="{grasps_zy_modified}" |
106 | | - out="{grasp_pose}" |
107 | | - name="Iterate through grasps and find a good one" |
108 | | - > |
| 17 | + <Action ID="GetGraspPoseFromPointCloud" grasps="{grasps}" number_of_grasps_to_return="10" point_cloud="{point_cloud_fragment}" model_package="lab_sim" model_path="models/l2g.onnx"/> |
| 18 | + <SubTree ID="Reflect Poses Subtree" _collapsed="true" input_poses="{grasps}" output_poses="{grasps_z_modified}" name="Add z reflected poses" reflection_axis="0;0;1;0"/> |
| 19 | + <SubTree ID="Reflect Poses Subtree" _collapsed="true" input_poses="{grasps_z_modified}" output_poses="{grasps_zy_modified}" name="Add y reflected poses" reflection_axis="0;1;0;0"/> |
| 20 | + <SubTree ID="Add Table to Planning Scene" _collapsed="true"/> |
| 21 | + <Decorator ID="ForEachUntilSuccess" index="{index}" vector_in="{grasps_zy_modified}" out="{grasp_pose}" name="Iterate through grasps and find a good one"> |
109 | 22 | <Control ID="Sequence"> |
110 | | - <Action |
111 | | - ID="VisualizePose" |
112 | | - marker_lifetime="0.000000" |
113 | | - marker_name="grasp pose" |
114 | | - marker_size="0.100000" |
115 | | - pose="{grasp_pose}" |
116 | | - /> |
117 | | - <Action |
118 | | - ID="VisualizeMesh" |
119 | | - marker_lifetime="0.000000" |
120 | | - mesh_path="package://lab_sim/objectives/gripper_token.dae" |
121 | | - mesh_pose="{grasp_pose}" |
122 | | - /> |
123 | | - <SubTree |
124 | | - ID="Pick from Pose With Approval" |
125 | | - _collapsed="true" |
126 | | - approach_distance="0.1" |
127 | | - grasp_pose="{grasp_pose}" |
128 | | - retract_xyz="0;0;-0.1" |
129 | | - /> |
| 23 | + <Action ID="VisualizePose" marker_lifetime="0.000000" marker_name="grasp pose" marker_size="0.100000" pose="{grasp_pose}"/> |
| 24 | + <Action ID="VisualizeMesh" marker_lifetime="0.000000" mesh_path="package://lab_sim/objectives/gripper_token.dae" mesh_pose="{grasp_pose}" mesh_name="mesh"/> |
| 25 | + <SubTree ID="Pick from Pose With Approval" _collapsed="true" approach_distance="0.1" grasp_pose="{grasp_pose}" retract_xyz="0;0;-0.1"/> |
130 | 26 | </Control> |
131 | 27 | </Decorator> |
132 | | - <SubTree ID="Reset Planning Scene" _collapsed="true" /> |
| 28 | + <SubTree ID="Reset Planning Scene" _collapsed="true"/> |
133 | 29 | </Control> |
134 | 30 | </BehaviorTree> |
135 | 31 | <TreeNodesModel> |
136 | 32 | <SubTree ID="ML Auto Grasp Object from Clicked Point"> |
137 | 33 | <MetadataFields> |
138 | | - <Metadata runnable="true" /> |
139 | | - <Metadata subcategory="Application - ML (GPU Recommended)" /> |
| 34 | + <Metadata runnable="true"/> |
| 35 | + <Metadata subcategory="Application - ML (GPU Recommended)"/> |
140 | 36 | </MetadataFields> |
141 | 37 | </SubTree> |
142 | 38 | </TreeNodesModel> |
|
0 commit comments