diff --git a/README.md b/README.md index 3db6d20..32f9ab0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ See [compositional.py](robosuite_models/robots/compositional.py): how to compose | Robot Model | Names | | --- | --- | | `RobotBaseModel` | aloha_mount, b1_base, go2_base | -| `GripperModel` | ability_hands, aloha_gripper, g1_three_finger_gripper, pr2_gripper, schunk_svh_hands, umi_gripper, yumi_gripper, z1_gripper | +| `GripperModel` | arx_gripper,ability_hands, aloha_gripper, g1_three_finger_gripper, pr2_gripper, schunk_svh_hands, umi_gripper, yumi_gripper, z1_gripper | | `ManipulatorModel` | aloha_robot, arx5_robot, g1_robot, h1_robot, pr2_robot, vx330s_robot, yumi_robot, z1_robot | Example code: diff --git a/robosuite_models/assets/grippers/arx_gripper.xml b/robosuite_models/assets/grippers/arx_gripper.xml new file mode 100644 index 0000000..8efaf84 --- /dev/null +++ b/robosuite_models/assets/grippers/arx_gripper.xml @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/robosuite_models/assets/grippers/meshes/arx_gripper/link6.STL b/robosuite_models/assets/grippers/meshes/arx_gripper/link6.STL new file mode 100644 index 0000000..e7c1f63 Binary files /dev/null and b/robosuite_models/assets/grippers/meshes/arx_gripper/link6.STL differ diff --git a/robosuite_models/assets/grippers/meshes/arx_gripper/link7.STL b/robosuite_models/assets/grippers/meshes/arx_gripper/link7.STL new file mode 100644 index 0000000..af58e36 Binary files /dev/null and b/robosuite_models/assets/grippers/meshes/arx_gripper/link7.STL differ diff --git a/robosuite_models/assets/grippers/meshes/arx_gripper/link7_collision.STL b/robosuite_models/assets/grippers/meshes/arx_gripper/link7_collision.STL new file mode 100644 index 0000000..007ad62 Binary files /dev/null and b/robosuite_models/assets/grippers/meshes/arx_gripper/link7_collision.STL differ diff --git a/robosuite_models/assets/grippers/meshes/arx_gripper/link8.STL b/robosuite_models/assets/grippers/meshes/arx_gripper/link8.STL new file mode 100644 index 0000000..a1e7773 Binary files /dev/null and b/robosuite_models/assets/grippers/meshes/arx_gripper/link8.STL differ diff --git a/robosuite_models/assets/grippers/meshes/arx_gripper/link8_collision.STL b/robosuite_models/assets/grippers/meshes/arx_gripper/link8_collision.STL new file mode 100644 index 0000000..ce82f32 Binary files /dev/null and b/robosuite_models/assets/grippers/meshes/arx_gripper/link8_collision.STL differ diff --git a/robosuite_models/robots/grippers/__init__.py b/robosuite_models/robots/grippers/__init__.py index 8839747..b1cc0bf 100644 --- a/robosuite_models/robots/grippers/__init__.py +++ b/robosuite_models/robots/grippers/__init__.py @@ -2,6 +2,7 @@ from .yumi_gripper import YumiLeftGripper, YumiRightGripper from .umi_gripper import UMIGripper from .aloha_gripper import AlohaGripper +from .arx_gripper import ArxGripper from .pr2_gripper import PR2Gripper from .ability_hands import AbilityLeftHand, AbilityRightHand from .schunk_svh_hands import SchunkSvhLeftHand, SchunkSvhRightHand diff --git a/robosuite_models/robots/grippers/arx_gripper.py b/robosuite_models/robots/grippers/arx_gripper.py new file mode 100644 index 0000000..790463e --- /dev/null +++ b/robosuite_models/robots/grippers/arx_gripper.py @@ -0,0 +1,37 @@ +import numpy as np +from robosuite.models.grippers import register_gripper +from robosuite.models.grippers.gripper_model import GripperModel + +from robosuite_models import robosuite_model_path_completion + + +@register_gripper +class ArxGripper(GripperModel): + """ + UMIGripper for the Arx5 arm + Args: + idn (int or str): Number or some other unique identification string for this gripper instance + """ + + def __init__(self, idn=0): + super().__init__(robosuite_model_path_completion("grippers/arx_gripper.xml"), idn=idn) + + def format_action(self, action): + assert len(action) == self.dof + self.current_action = np.clip(self.current_action + np.array([1.0]) * self.speed * np.sign(action), -10.0, 10.0) + return self.current_action + + @property + def init_qpos(self): + return np.array([-0.1, 0.1]) + + @property + def speed(self): + return 2 + + @property + def _important_geoms(self): + return { + "right_fingerpad": ["right_finger_collision", "right_finger_visual"], + "left_fingerpad": ["left_finger_visual", "left_finger_collision"], + } diff --git a/robosuite_models/robots/manipulators/arx5_robot.py b/robosuite_models/robots/manipulators/arx5_robot.py index db9dd3b..d47e371 100644 --- a/robosuite_models/robots/manipulators/arx5_robot.py +++ b/robosuite_models/robots/manipulators/arx5_robot.py @@ -28,7 +28,7 @@ def default_base(self): @property def default_gripper(self): - return {"right": "UMIGripper"} + return {"right": "ArxGripper"} # use ArxGripper @property def default_controller_config(self):