From c1ada5591bb33da63686cefb78a49d22278369c7 Mon Sep 17 00:00:00 2001 From: Shuaixing Chen Date: Sun, 15 Sep 2024 20:50:43 -0400 Subject: [PATCH 1/2] delete grasp_detection_attr --- .../pyrcareworld/attributes/__init__.py | 1 - .../attributes/grasp_detection_attr.py | 31 ------------------- 2 files changed, 32 deletions(-) delete mode 100644 pyrcareworld/pyrcareworld/attributes/grasp_detection_attr.py diff --git a/pyrcareworld/pyrcareworld/attributes/__init__.py b/pyrcareworld/pyrcareworld/attributes/__init__.py index 0d10f442..548c9c90 100755 --- a/pyrcareworld/pyrcareworld/attributes/__init__.py +++ b/pyrcareworld/pyrcareworld/attributes/__init__.py @@ -46,7 +46,6 @@ # "IntersectAttr": IntersectAttr, "ClothGrasperAttr": ClothGrasperAttr, "SpongeScoreAttr": SpongeScoreAttr, -"GraspDetectionAttr": GraspDetectionAttr, "BathingScoreAttr": BathingScoreAttr, "DressingScoreAttr": DressingScoreAttr, "SpongeAttr": SpongeAttr, diff --git a/pyrcareworld/pyrcareworld/attributes/grasp_detection_attr.py b/pyrcareworld/pyrcareworld/attributes/grasp_detection_attr.py deleted file mode 100644 index 0615ad38..00000000 --- a/pyrcareworld/pyrcareworld/attributes/grasp_detection_attr.py +++ /dev/null @@ -1,31 +0,0 @@ -import pyrcareworld.attributes as attr - -class GraspDetectionAttr(attr.BaseAttr): - def set_target_and_robot(self, target_id, target_name, robot_id, gripper_name, detection_radius, detection_time, is_cloth): - """ - Set the target object and robot for the grasp detection. - - :param target_id: ID of the target object. - :param target_name: Name of the target object. - :param robot_id: ID of the robot. - :param gripper_name: Name of the gripper. - :param detection_radius: Radius for detection. - :param detection_time: Time for detection. - :param is_cloth: Boolean indicating if the target is cloth. - """ - self._send_data("SetTargetAndRobot", target_id, target_name, robot_id, gripper_name, detection_radius, detection_time, is_cloth) - - def start_detection(self): - """ - Start the grasp detection. - """ - self._send_data("StartDetection") - - def get_detection_result(self): - """ - Get the result of the grasp detection. - - :return: Boolean indicating if the grasp was successful. - """ - self.env._step() - return self.data.get("is_grasp_successful", False) From 8dc1c9584e75b5bff8fa26898ea654781d21b749 Mon Sep 17 00:00:00 2001 From: Shuaixing Chen Date: Sun, 15 Sep 2024 22:40:43 -0400 Subject: [PATCH 2/2] Update __init__.py --- pyrcareworld/pyrcareworld/attributes/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyrcareworld/pyrcareworld/attributes/__init__.py b/pyrcareworld/pyrcareworld/attributes/__init__.py index 548c9c90..7a4e16e7 100755 --- a/pyrcareworld/pyrcareworld/attributes/__init__.py +++ b/pyrcareworld/pyrcareworld/attributes/__init__.py @@ -18,7 +18,6 @@ from pyrcareworld.attributes.cloth_grasper_attr import ClothGrasperAttr # from pyrcareworld.attributes.move_detectopm_attr import MovementDetectionAttr # from pyrcareworld.attributes.sponge_attr import SpongeAttr -from pyrcareworld.attributes.grasp_detection_attr import GraspDetectionAttr from pyrcareworld.attributes.bathing_score_attr import BathingScoreAttr from pyrcareworld.attributes.dressing_score_attr import DressingScoreAttr from pyrcareworld.attributes.sponge_attr import SpongeAttr