|
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
| 2 | +<root |
| 3 | + BTCPP_format="4" |
| 4 | + main_tree_to_execute="Segment Point Cloud from Clicked Point" |
| 5 | +> |
| 6 | + <!--//////////--> |
| 7 | + <BehaviorTree |
| 8 | + ID="Segment Point Cloud from Clicked Point" |
| 9 | + _description="Captures a point cloud and requests the user to click an object in the image to be segmented. The point cloud is then filtered to only include the selected object." |
| 10 | + _favorite="true" |
| 11 | + > |
| 12 | + <Control ID="Sequence"> |
| 13 | + <Action ID="ClearSnapshot" /> |
| 14 | + <Action |
| 15 | + ID="GetImage" |
| 16 | + topic_name="/wrist_camera/color" |
| 17 | + timeout_sec="5.000000" |
| 18 | + message_out="{image}" |
| 19 | + /> |
| 20 | + <Action |
| 21 | + ID="GetPointsFromUser" |
| 22 | + point_prompts="Select the object to be segmented;" |
| 23 | + point_names="Point1;" |
| 24 | + view_name="/wrist_camera/color" |
| 25 | + pixel_coords="{pixel_coords}" |
| 26 | + /> |
| 27 | + <Action |
| 28 | + ID="GetMasks2DFromPointQuery" |
| 29 | + image="{image}" |
| 30 | + pixel_coords="{pixel_coords}" |
| 31 | + masks2d="{masks2d}" |
| 32 | + decoder_model_path="models/decoder.onnx" |
| 33 | + encoder_model_path="models/sam2_hiera_large_encoder.onnx" |
| 34 | + model_package="lab_sim" |
| 35 | + /> |
| 36 | + <Action |
| 37 | + ID="GetPointCloud" |
| 38 | + topic_name="/wrist_camera/points" |
| 39 | + timeout_sec="5.000000" |
| 40 | + message_out="{point_cloud}" |
| 41 | + /> |
| 42 | + <Action |
| 43 | + ID="GetCameraInfo" |
| 44 | + topic_name="/wrist_camera/camera_info" |
| 45 | + message_out="{camera_info}" |
| 46 | + timeout_sec="5.000000" |
| 47 | + /> |
| 48 | + <Action |
| 49 | + ID="GetMasks3DFromMasks2D" |
| 50 | + camera_info="{camera_info}" |
| 51 | + masks2d="{masks2d}" |
| 52 | + point_cloud="{point_cloud}" |
| 53 | + masks3d="{masks3d}" |
| 54 | + /> |
| 55 | + <Decorator |
| 56 | + ID="ForEach" |
| 57 | + vector_in="{masks3d}" |
| 58 | + out="{mask3d}" |
| 59 | + index="{index}" |
| 60 | + > |
| 61 | + <Action |
| 62 | + ID="GetPointCloudFromMask3D" |
| 63 | + point_cloud="{point_cloud}" |
| 64 | + mask3d="{mask3d}" |
| 65 | + point_cloud_fragment="{point_cloud_fragment}" |
| 66 | + /> |
| 67 | + </Decorator> |
| 68 | + <Action |
| 69 | + ID="SendPointCloudToUI" |
| 70 | + point_cloud="{point_cloud_fragment}" |
| 71 | + pcd_topic="/pcd_pointcloud_captures" |
| 72 | + /> |
| 73 | + <Action |
| 74 | + ID="PublishPointCloud" |
| 75 | + point_cloud="{point_cloud_fragment}" |
| 76 | + point_cloud_topic="/my_point_cloud" |
| 77 | + /> |
| 78 | + <Action ID="SwitchUIPrimaryView" primary_view_name="Visualization" /> |
| 79 | + </Control> |
| 80 | + </BehaviorTree> |
| 81 | + <TreeNodesModel> |
| 82 | + <SubTree ID="Segment Point Cloud from Clicked Point"> |
| 83 | + <MetadataFields> |
| 84 | + <Metadata runnable="true" /> |
| 85 | + </MetadataFields> |
| 86 | + </SubTree> |
| 87 | + </TreeNodesModel> |
| 88 | +</root> |
0 commit comments