|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<root BTCPP_format="4" main_tree_to_execute="AddBottlesToPlanningScene"> |
| 3 | + <BehaviorTree |
| 4 | + ID="AddBottlesToPlanningScene" |
| 5 | + _description="Detects flasks using ML and adds them as collision objects to the planning scene" |
| 6 | + _favorite="false" |
| 7 | + > |
| 8 | + <Control ID="Sequence" name="TopLevelSequence"> |
| 9 | + <SubTree ID="Clear Previous Obstacles" _collapsed="true" /> |
| 10 | + <SubTree |
| 11 | + ID="Move to Waypoint" |
| 12 | + _collapsed="true" |
| 13 | + acceleration_scale_factor="1.0" |
| 14 | + controller_action_server="/joint_trajectory_controller/follow_joint_trajectory" |
| 15 | + controller_names="joint_trajectory_controller" |
| 16 | + joint_group_name="manipulator" |
| 17 | + keep_orientation="false" |
| 18 | + keep_orientation_tolerance="0.05" |
| 19 | + link_padding="0.01" |
| 20 | + seed="0" |
| 21 | + velocity_scale_factor="1.0" |
| 22 | + waypoint_name="Look at Flasks" |
| 23 | + /> |
| 24 | + <SubTree ID="Take Wrist Camera Snapshot" _collapsed="true" /> |
| 25 | + <SubTree |
| 26 | + ID="Segment Image from Text Prompt Subtree" |
| 27 | + _collapsed="true" |
| 28 | + clip_model_path="models/clip.onnx" |
| 29 | + clipseg_model_path="models/clipseg.onnx" |
| 30 | + masks_visualization_topic="/masks_visualization" |
| 31 | + masks2d="{masks2d}" |
| 32 | + model_package="moveit_pro_clipseg" |
| 33 | + prompts="conical flask" |
| 34 | + threshold="0.15" |
| 35 | + image_topic_name="/wrist_camera/color" |
| 36 | + negative_prompts="box" |
| 37 | + erosion_size="10" |
| 38 | + /> |
| 39 | + <Action |
| 40 | + ID="GetPointCloud" |
| 41 | + message_out="{point_cloud}" |
| 42 | + publisher_timeout_sec="5.000000" |
| 43 | + timeout_sec="5.000000" |
| 44 | + topic_name="/wrist_camera/points" |
| 45 | + /> |
| 46 | + <Action |
| 47 | + ID="GetCameraInfo" |
| 48 | + message_out="{camera_info}" |
| 49 | + publisher_timeout_sec="5.000000" |
| 50 | + timeout_sec="5.000000" |
| 51 | + topic_name="/wrist_camera/camera_info" |
| 52 | + /> |
| 53 | + <Action |
| 54 | + ID="FindMaskedObjects" |
| 55 | + base_frame="grasp_link" |
| 56 | + camera_info="{camera_info}" |
| 57 | + detected_shapes="{detected_shapes}" |
| 58 | + face_separation_threshold="0.010000" |
| 59 | + masks2d="{masks2d}" |
| 60 | + minimum_face_area="0.000625" |
| 61 | + plane_inlier_threshold="0.010000" |
| 62 | + point_cloud="{point_cloud}" |
| 63 | + /> |
| 64 | + <Decorator |
| 65 | + ID="ForEach" |
| 66 | + index="{index}" |
| 67 | + out="{out}" |
| 68 | + vector_in="{detected_shapes}" |
| 69 | + > |
| 70 | + <Control ID="Sequence"> |
| 71 | + <Control ID="Sequence"> |
| 72 | + <Action |
| 73 | + ID="UnpackGraspableObjectMessage" |
| 74 | + grasp_info="{grasp_info}" |
| 75 | + graspable_object="{out}" |
| 76 | + object="{object}" |
| 77 | + object_color="{object_color}" |
| 78 | + /> |
| 79 | + <Action |
| 80 | + ID="UnpackCollisionObjectMessage" |
| 81 | + collision_object="{object}" |
| 82 | + header="{header}" |
| 83 | + id="{id}" |
| 84 | + mesh_poses="{mesh_poses}" |
| 85 | + meshes="{meshes}" |
| 86 | + operation="{operation}" |
| 87 | + plane_poses="{plane_poses}" |
| 88 | + planes="{planes}" |
| 89 | + pose="{pose}" |
| 90 | + primitive_poses="{primitive_poses}" |
| 91 | + primitives="{primitives}" |
| 92 | + subframe_names="{subframe_names}" |
| 93 | + subframe_poses="{subframe_poses}" |
| 94 | + type="{type}" |
| 95 | + /> |
| 96 | + <Action |
| 97 | + ID="UnpackPoseMessage" |
| 98 | + orientation="{orientation}" |
| 99 | + pose="{pose}" |
| 100 | + position="{position}" |
| 101 | + /> |
| 102 | + <Action |
| 103 | + ID="UnpackPointMessage" |
| 104 | + point="{position}" |
| 105 | + x="{x}" |
| 106 | + y="{y}" |
| 107 | + z="{z}" |
| 108 | + /> |
| 109 | + </Control> |
| 110 | + <Control ID="Sequence"> |
| 111 | + <Action ID="ResetVector" vector="{vector}" /> |
| 112 | + <Action |
| 113 | + ID="InsertInVector" |
| 114 | + index="0" |
| 115 | + output_vector="{vector}" |
| 116 | + element="{z}" |
| 117 | + input_vector="{vector}" |
| 118 | + /> |
| 119 | + <Action |
| 120 | + ID="InsertInVector" |
| 121 | + index="0" |
| 122 | + output_vector="{vector}" |
| 123 | + element="{y}" |
| 124 | + input_vector="{vector}" |
| 125 | + /> |
| 126 | + <Action |
| 127 | + ID="InsertInVector" |
| 128 | + index="0" |
| 129 | + output_vector="{vector}" |
| 130 | + element="{x}" |
| 131 | + input_vector="{vector}" |
| 132 | + /> |
| 133 | + </Control> |
| 134 | + <Action ID="Script" code="object_id:='bottle'..index" /> |
| 135 | + <SubTree |
| 136 | + ID="AddCollisionBoxInFrontOfEndEffector" |
| 137 | + _collapsed="true" |
| 138 | + dimensions="0.15;0.15;0.15" |
| 139 | + offset="{vector}" |
| 140 | + object_id="{object_id}" |
| 141 | + /> |
| 142 | + </Control> |
| 143 | + </Decorator> |
| 144 | + </Control> |
| 145 | + </BehaviorTree> |
| 146 | + <TreeNodesModel> |
| 147 | + <SubTree ID="AddBottlesToPlanningScene"> |
| 148 | + <MetadataFields> |
| 149 | + <Metadata runnable="true" /> |
| 150 | + <Metadata subcategory="Perception - Planning Scene" /> |
| 151 | + </MetadataFields> |
| 152 | + </SubTree> |
| 153 | + </TreeNodesModel> |
| 154 | +</root> |
0 commit comments