From 76d5acde3bf775a88fcfb0e5ef37f1f541e92bca Mon Sep 17 00:00:00 2001 From: Benteng Ma Date: Wed, 3 Jul 2024 19:13:16 +0100 Subject: [PATCH] Let's see if this change of CDRequest works. --- .../lasr_skills/vision/get_cropped_image.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/skills/src/lasr_skills/vision/get_cropped_image.py b/skills/src/lasr_skills/vision/get_cropped_image.py index 10cef7508..6730f5855 100755 --- a/skills/src/lasr_skills/vision/get_cropped_image.py +++ b/skills/src/lasr_skills/vision/get_cropped_image.py @@ -44,18 +44,15 @@ def __init__( ) def execute(self, userdata) -> str: - cropped_detection_req: CroppedDetectionRequest = CroppedDetectionRequest( - [ - CDRequest( - method=self.method, - use_mask=self.use_mask, - yolo_model=self.yolo_model, - yolo_model_confidence=self.yolo_model_confidence, - yolo_nms_threshold=self.yolo_nms_threshold, - object_names=[self.object_name], - ) - ] - ) + req = CDRequest() + req.method=self.method + req.use_mask=self.use_mask + req.yolo_model=self.yolo_model + req.yolo_model_confidence=self.yolo_model_confidence + req.yolo_nms_threshold=self.yolo_nms_threshold + req.object_names=[self.object_name] + cropped_detection_req: CroppedDetectionRequest = CroppedDetectionRequest() + cropped_detection_req.requests = [req] try: cropped_detection_resp: CroppedDetectionResponse = self._cropped_detection(