mani-skill-nightly 2025.4.4.139__py3-none-any.whl → 2025.4.5.358__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,4 +17,3 @@ from .ur_e import UR10e
17
17
  from .widowx import *
18
18
  from .xarm import XArm7Ability
19
19
  from .xarm6 import *
20
- from .xmate3 import Xmate3Robotiq
@@ -37,29 +37,14 @@ class AllegroHandRight(BaseAgent):
37
37
  },
38
38
  )
39
39
  keyframes = dict(
40
+ palm_side=Keyframe(
41
+ qpos=np.zeros(16),
42
+ pose=sapien.Pose([0, 0, 0.5], q=[1, 0, 0, 0]),
43
+ ),
40
44
  palm_up=Keyframe(
41
- qpos=np.array(
42
- [
43
- 0.0,
44
- 0.0,
45
- 0.0,
46
- 0.0,
47
- 0.0,
48
- 0.0,
49
- 0.0,
50
- 0.0,
51
- 0.0,
52
- 0.0,
53
- 0.0,
54
- 0.0,
55
- 0.0,
56
- 0.0,
57
- 0.0,
58
- 0.0,
59
- ]
60
- ),
45
+ qpos=np.zeros(16),
61
46
  pose=sapien.Pose([0, 0, 0.5], q=[-0.707, 0, 0.707, 0]),
62
- )
47
+ ),
63
48
  )
64
49
 
65
50
  def __init__(self, *args, **kwargs):
@@ -1,7 +1,11 @@
1
1
  from copy import deepcopy
2
2
 
3
+ import numpy as np
4
+ import sapien
5
+ from transforms3d.euler import euler2quat
6
+
3
7
  from mani_skill import PACKAGE_ASSET_DIR
4
- from mani_skill.agents.base_agent import BaseAgent
8
+ from mani_skill.agents.base_agent import BaseAgent, Keyframe
5
9
  from mani_skill.agents.controllers import *
6
10
  from mani_skill.agents.registration import register_agent
7
11
 
@@ -66,6 +70,13 @@ class FloatingInspireHandRight(BaseAgent):
66
70
  "root_z_rot_joint",
67
71
  ]
68
72
 
73
+ keyframes = dict(
74
+ palm_side=Keyframe(
75
+ qpos=np.zeros(20),
76
+ pose=sapien.Pose(p=[0, 0, 0.4], q=euler2quat(0, 0, -np.pi / 2)),
77
+ )
78
+ )
79
+
69
80
  @property
70
81
  def _controller_configs(self):
71
82
  float_pd_joint_pos = PDJointPosControllerConfig(
@@ -29,15 +29,15 @@ class FloatingPandaGripper(BaseAgent):
29
29
  ),
30
30
  )
31
31
  keyframes = dict(
32
+ open_facing_down=Keyframe(
33
+ qpos=[0, 0, 0, 0, np.pi, 0, 0.04, 0.04], pose=sapien.Pose(p=[0, 0, 0.5])
34
+ ),
32
35
  open_facing_up=Keyframe(
33
36
  qpos=[0, 0, 0, 0, 0, 0, 0.04, 0.04], pose=sapien.Pose(p=[0, 0, 0.5])
34
37
  ),
35
38
  open_facing_side=Keyframe(
36
39
  qpos=[0, 0, 0, 0, np.pi / 2, 0, 0.04, 0.04], pose=sapien.Pose(p=[0, 0, 0.5])
37
40
  ),
38
- open_facing_down=Keyframe(
39
- qpos=[0, 0, 0, 0, np.pi, 0, 0.04, 0.04], pose=sapien.Pose(p=[0, 0, 0.5])
40
- ),
41
41
  )
42
42
  root_joint_names = [
43
43
  "root_x_axis_joint",
@@ -2,6 +2,7 @@ from typing import Dict, Union
2
2
 
3
3
  import numpy as np
4
4
  import sapien
5
+ from transforms3d.euler import euler2quat
5
6
 
6
7
  from mani_skill import ASSET_DIR, PACKAGE_ASSET_DIR
7
8
  from mani_skill.agents.base_agent import BaseAgent, DictControllerConfig, Keyframe
@@ -31,6 +32,10 @@ class FloatingRobotiq2F85Gripper(BaseAgent):
31
32
  ),
32
33
  )
33
34
  keyframes = dict(
35
+ open_facing_down=Keyframe(
36
+ qpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
37
+ pose=sapien.Pose(p=np.array([0.0, 0.0, 0.5]), q=euler2quat(np.pi, 0, 0)),
38
+ ),
34
39
  open_facing_up=Keyframe(
35
40
  qpos=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
36
41
  pose=sapien.Pose(p=np.array([0.0, 0.0, 0.5])),
@@ -42,7 +42,7 @@ class Humanoid(BaseAgent):
42
42
  0.0,
43
43
  ]
44
44
  ),
45
- pose=sapien.Pose(p=[0, 0, -0.375]),
45
+ pose=sapien.Pose(p=[0, 0, 1.13]),
46
46
  )
47
47
  )
48
48
 
@@ -4,7 +4,7 @@ import numpy as np
4
4
  import sapien.core as sapien
5
5
  import torch
6
6
 
7
- from mani_skill import PACKAGE_ASSET_DIR
7
+ from mani_skill import ASSET_DIR
8
8
  from mani_skill.agents.base_agent import BaseAgent, Keyframe
9
9
  from mani_skill.agents.controllers import *
10
10
  from mani_skill.agents.registration import register_agent
@@ -12,10 +12,10 @@ from mani_skill.sensors.camera import CameraConfig
12
12
  from mani_skill.utils import sapien_utils
13
13
 
14
14
 
15
- @register_agent()
15
+ @register_agent(asset_download_ids=["xarm6"])
16
16
  class XArm6NoGripper(BaseAgent):
17
17
  uid = "xarm6_nogripper"
18
- urdf_path = f"{PACKAGE_ASSET_DIR}/robots/xarm6/xarm6_nogripper.urdf"
18
+ urdf_path = f"{ASSET_DIR}/robots/xarm6/xarm6_nogripper.urdf"
19
19
 
20
20
  keyframes = dict(
21
21
  rest=Keyframe(
@@ -163,7 +163,7 @@ class OpenCabinetDrawerEnv(BaseEnv):
163
163
  handle_links[-1].append(link)
164
164
  # save the first mesh in the link object that correspond with a handle
165
165
  handle_links_meshes[-1].append(
166
- link.generate_mesh(
166
+ link.generate_visual_mesh(
167
167
  filter=lambda _, render_shape: "handle"
168
168
  in render_shape.name,
169
169
  mesh_name="handle",
@@ -8,7 +8,6 @@ from mani_skill import ASSET_DIR
8
8
  from mani_skill.agents.robots.fetch.fetch import Fetch
9
9
  from mani_skill.agents.robots.panda.panda import Panda
10
10
  from mani_skill.agents.robots.panda.panda_wristcam import PandaWristCam
11
- from mani_skill.agents.robots.xmate3.xmate3 import Xmate3Robotiq
12
11
  from mani_skill.envs.sapien_env import BaseEnv
13
12
  from mani_skill.envs.utils.randomization.pose import random_quaternions
14
13
  from mani_skill.sensors.camera import CameraConfig
@@ -196,13 +195,6 @@ class PickSingleYCBEnv(BaseEnv):
196
195
  )
197
196
  self.agent.reset(qpos)
198
197
  self.agent.robot.set_root_pose(sapien.Pose([-0.615, 0, 0]))
199
- elif self.robot_uids == "xmate3_robotiq":
200
- qpos = np.array([0, 0.6, 0, 1.3, 0, 1.3, -1.57, 0, 0])
201
- qpos[:-2] += self._episode_rng.normal(
202
- 0, self.robot_init_qpos_noise, len(qpos) - 2
203
- )
204
- self.agent.reset(qpos)
205
- self.agent.robot.set_root_pose(sapien.Pose([-0.562, 0, 0]))
206
198
  else:
207
199
  raise NotImplementedError(self.robot_uids)
208
200
 
@@ -138,12 +138,6 @@ def initialize_data_sources():
138
138
  )
139
139
 
140
140
  # Robots
141
- DATA_SOURCES["xmate3_robotiq"] = DataSource(
142
- source_type="robot",
143
- url="https://storage1.ucsd.edu/datasets/ManiSkill2022-assets/xmate3_robotiq.zip",
144
- target_path="robots/xmate3_robotiq",
145
- checksum="ddda102a20eb41e28a0a501702e240e5d7f4084221a44f580e729f08b7c12d1a",
146
- )
147
141
  DATA_SOURCES["ur10e"] = DataSource(
148
142
  source_type="robot",
149
143
  url="https://github.com/haosulab/ManiSkill-UR10e/archive/refs/tags/v0.1.0.zip",
@@ -54,14 +54,32 @@ def get_render_body_meshes(visual_body: sapien.render.RenderBodyComponent):
54
54
 
55
55
  def get_render_shape_meshes(render_shape: sapien.render.RenderShape):
56
56
  meshes = []
57
- if type(render_shape) == sapien.render.RenderShapeTriangleMesh:
57
+ if type(render_shape) == sapien.render.RenderShapeBox:
58
+ mesh = trimesh.creation.box(extents=2 * render_shape.half_size)
59
+ meshes.append(mesh)
60
+ elif type(render_shape) == sapien.render.RenderShapeCapsule:
61
+ mesh = trimesh.creation.capsule(
62
+ height=2 * render_shape.half_length, radius=render_shape.radius
63
+ )
64
+ meshes.append(mesh)
65
+ elif type(render_shape) == sapien.render.RenderShapeCylinder:
66
+ mesh = trimesh.creation.cylinder(
67
+ radius=render_shape.radius, height=2 * render_shape.half_length
68
+ )
69
+ meshes.append(mesh)
70
+ elif type(render_shape) == sapien.render.RenderShapeSphere:
71
+ mesh = trimesh.creation.icosphere(radius=render_shape.radius)
72
+ meshes.append(mesh)
73
+ elif type(render_shape) == sapien.render.RenderShapePlane:
74
+ pass
75
+ elif type(render_shape) == sapien.render.RenderShapeTriangleMesh:
58
76
  for part in render_shape.parts:
59
77
  vertices = part.vertices * render_shape.scale # [n, 3]
60
78
  faces = part.triangles
61
- # faces = render_shape.mesh.indices.reshape(-1, 3) # [m * 3]
62
79
  mesh = trimesh.Trimesh(vertices=vertices, faces=faces)
63
- mesh.apply_transform(render_shape.local_pose.to_transformation_matrix())
64
80
  meshes.append(mesh)
81
+ for mesh in meshes:
82
+ mesh.apply_transform(render_shape.local_pose.to_transformation_matrix())
65
83
  return meshes
66
84
 
67
85
 
@@ -116,27 +116,6 @@ class TableSceneBuilder(SceneBuilder):
116
116
  qpos[:, -2:] = 0.04
117
117
  self.env.agent.reset(qpos)
118
118
  self.env.agent.robot.set_pose(sapien.Pose([-0.615, 0, 0]))
119
- elif self.env.robot_uids == "xmate3_robotiq":
120
- qpos = np.array(
121
- [0, np.pi / 6, 0, np.pi / 3, 0, np.pi / 2, -np.pi / 2, 0, 0]
122
- )
123
- if self.env._enhanced_determinism:
124
- qpos = (
125
- self.env._batched_episode_rng[env_idx].normal(
126
- 0, self.robot_init_qpos_noise, len(qpos)
127
- )
128
- + qpos
129
- )
130
- else:
131
- qpos = (
132
- self.env._episode_rng.normal(
133
- 0, self.robot_init_qpos_noise, (b, len(qpos))
134
- )
135
- + qpos
136
- )
137
- qpos[:, -2:] = 0
138
- self.env.agent.reset(qpos)
139
- self.env.agent.robot.set_pose(sapien.Pose([-0.562, 0, 0]))
140
119
  elif self.env.robot_uids in [
141
120
  "xarm6_allegro_left",
142
121
  "xarm6_allegro_right",
@@ -12,7 +12,11 @@ import torch
12
12
  import trimesh
13
13
 
14
14
  from mani_skill.utils import common, sapien_utils
15
- from mani_skill.utils.geometry.trimesh_utils import get_component_meshes, merge_meshes
15
+ from mani_skill.utils.geometry.trimesh_utils import (
16
+ get_component_meshes,
17
+ get_render_shape_meshes,
18
+ merge_meshes,
19
+ )
16
20
  from mani_skill.utils.structs import ArticulationJoint, BaseStruct, Link, Pose
17
21
  from mani_skill.utils.structs.types import Array
18
22
 
@@ -368,6 +372,57 @@ class Articulation(BaseStruct[physx.PhysxArticulation]):
368
372
  return meshes[0]
369
373
  return meshes
370
374
 
375
+ def get_first_visual_mesh(self, to_world_frame: bool = True) -> trimesh.Trimesh:
376
+ """
377
+ Returns the visual mesh of the first managed articulation object. Note results of this are not cached or optimized at the moment
378
+ so this function can be slow if called too often
379
+ """
380
+ return self.get_visual_meshes(to_world_frame=to_world_frame, first_only=True)
381
+
382
+ def get_visual_meshes(
383
+ self, to_world_frame: bool = True, first_only: bool = False
384
+ ) -> List[trimesh.Trimesh]:
385
+ """
386
+ Returns the visual mesh of each managed articulation object. Note results of this are not cached or optimized at the moment
387
+ so this function can be slow if called too often
388
+ """
389
+ assert (
390
+ not self.merged
391
+ ), "Currently you cannot fetch visual meshes of merged articulations as merged articulations only share a root link"
392
+ if self.scene.gpu_sim_enabled:
393
+ assert (
394
+ self.scene._gpu_sim_initialized
395
+ ), "During GPU simulation link pose data is not accessible until after \
396
+ initialization, and link poses are needed to get the correct visual mesh of an entire articulation"
397
+ else:
398
+ self._objs[0].pose = self._objs[0].pose
399
+ meshes: List[trimesh.Trimesh] = []
400
+ for i, art in enumerate(self._objs):
401
+ art_meshes = []
402
+ for link in art.links:
403
+ render_shapes = []
404
+ rb_comp = link.entity.find_component_by_type(
405
+ sapien.render.RenderBodyComponent
406
+ )
407
+ if rb_comp is not None:
408
+ for render_shape in rb_comp.render_shapes:
409
+ render_shapes += get_render_shape_meshes(render_shape)
410
+ link_mesh = merge_meshes(render_shapes)
411
+ if link_mesh is not None:
412
+ if to_world_frame:
413
+ pose = self.links[link.index].pose[i]
414
+ link_mesh.apply_transform(
415
+ pose.sp.to_transformation_matrix()
416
+ )
417
+ art_meshes.append(link_mesh)
418
+ mesh = merge_meshes(art_meshes)
419
+ meshes.append(mesh)
420
+ if first_only:
421
+ break
422
+ if first_only:
423
+ return meshes[0]
424
+ return meshes
425
+
371
426
  def get_net_contact_impulses(self, link_names: Union[List[str], Tuple[str]]):
372
427
  """Get net contact impulses for several links together. This should be faster compared to using
373
428
  link.get_net_contact_impulses on each link.
@@ -134,13 +134,29 @@ class Link(PhysxRigidBodyComponentStruct[physx.PhysxArticulationLinkComponent]):
134
134
  """
135
135
  all_render_shapes: List[List[sapien.render.RenderShape]] = []
136
136
  for obj in self._objs:
137
- all_render_shapes.append(
138
- obj.entity.find_component_by_type(
139
- sapien.render.RenderBodyComponent
140
- ).render_shapes
137
+ rb_comp = obj.entity.find_component_by_type(
138
+ sapien.render.RenderBodyComponent
141
139
  )
140
+ if rb_comp is not None:
141
+ all_render_shapes.append(rb_comp.render_shapes)
142
142
  return all_render_shapes
143
143
 
144
+ def get_visual_meshes(
145
+ self, to_world_frame: bool = True, first_only: bool = False
146
+ ) -> List[trimesh.Trimesh]:
147
+ """
148
+ Returns the visual mesh of each managed link object. Note results of this are not cached or optimized at the moment
149
+ so this function can be slow if called too often
150
+ """
151
+ merged_meshes = []
152
+ for link, link_render_shapes in zip(self._objs, self.render_shapes):
153
+ meshes = []
154
+ for render_shape in link_render_shapes:
155
+ if filter(link, render_shape):
156
+ meshes.extend(get_render_shape_meshes(render_shape))
157
+ merged_meshes.append(merge_meshes(meshes))
158
+ return merged_meshes
159
+
144
160
  def generate_mesh(
145
161
  self,
146
162
  filter: Callable[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mani-skill-nightly
3
- Version: 2025.4.4.139
3
+ Version: 2025.4.5.358
4
4
  Summary: ManiSkill3: A Unified Benchmark for Generalizable Manipulation Skills
5
5
  Home-page: https://github.com/haosulab/ManiSkill
6
6
  Author: ManiSkill contributors
@@ -14,9 +14,9 @@ mani_skill/agents/controllers/pd_joint_pos_vel.py,sha256=G8SBIa8jM939zGCETY17Rlm
14
14
  mani_skill/agents/controllers/pd_joint_vel.py,sha256=XQK13lsbteeUsztGw0u-DCBgCCv0ChglvncgwxVQCWY,1900
15
15
  mani_skill/agents/controllers/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  mani_skill/agents/controllers/utils/kinematics.py,sha256=f3qQp8iY4npilhjLzCtTbSX-uch0PJ5GtIgrijmRfpY,8038
17
- mani_skill/agents/robots/__init__.py,sha256=4eeznbnCJQi-XkQJz6WfCZbSXq2qBAVqkNzYh9Hm5Qs,624
17
+ mani_skill/agents/robots/__init__.py,sha256=pcKoe2jYpejJNKJycnesfcng2Ytj3Z2w8JDiudHZPb8,590
18
18
  mani_skill/agents/robots/allegro_hand/__init__.py,sha256=PWH6MMv2i5g1xi76_E-YJLtKFLVKxkJgQ96GD_YeQN4,104
19
- mani_skill/agents/robots/allegro_hand/allegro.py,sha256=Uh5z4f7DqbKa6a9MZSUr93oMI6st95HnJLxB5kI7j_E,5213
19
+ mani_skill/agents/robots/allegro_hand/allegro.py,sha256=MnU04fCcvppTGJHdhgvs2OqUKToQtNMXbs2bFM5sXiU,4896
20
20
  mani_skill/agents/robots/allegro_hand/allegro_touch.py,sha256=CMnGIf1JT7jbrM5jc-OHfODeYiwrUp8rzuS9rUMzmK4,5805
21
21
  mani_skill/agents/robots/anymal/__init__.py,sha256=XJeiiZLvMYObl8cTJn4_KWEKKZ6K99N6NpHAEwNTbWY,30
22
22
  mani_skill/agents/robots/anymal/anymal_c.py,sha256=p7DuLDI7yx2_C1Eg2VXpNTAKCQrEPFpo-lUU2rV1DPk,4120
@@ -25,15 +25,15 @@ mani_skill/agents/robots/dclaw/dclaw.py,sha256=G5DqqRl2R8NroNyTaStdofEFW23wWqla2
25
25
  mani_skill/agents/robots/fetch/__init__.py,sha256=q3QA2oGTx-LgdmCbpe3wpj1ifoqhhFDdrMMXC43Nsuc,79
26
26
  mani_skill/agents/robots/fetch/fetch.py,sha256=z6B-HawhvXX59j8xdC9NBt03SrRutDm1qzZ3ABAKSzk,15112
27
27
  mani_skill/agents/robots/floating_inspire_hand/__init__.py,sha256=JmV3QkvW1w8l_NUDdX1aFa55E7WXxnhukD-JLM99bGk,60
28
- mani_skill/agents/robots/floating_inspire_hand/floating_inspire_hand.py,sha256=GI5wO5Rfdm6mcw0x8hs2XCjl-gqQ6IDheGaghEkqK5w,6756
28
+ mani_skill/agents/robots/floating_inspire_hand/floating_inspire_hand.py,sha256=JKPeE04oMQKo1lAZ48fDvZ6669XQc6s1PKftNVme8vk,7017
29
29
  mani_skill/agents/robots/floating_panda_gripper/__init__.py,sha256=AwV0Sml7DmQb6hk4FqbxHdO7_XXHHMhrOZtZRk6d-Po,57
30
- mani_skill/agents/robots/floating_panda_gripper/floating_panda_gripper.py,sha256=0Spwgy0t-3Zc_8JaDS2G6pmkfC81ui_r8PqkWqxbrr8,5071
30
+ mani_skill/agents/robots/floating_panda_gripper/floating_panda_gripper.py,sha256=sUzYnpEGDW_afwldcerl679wC-6HDEq-APNBSY6-WAo,5071
31
31
  mani_skill/agents/robots/floating_robotiq_2f_85_gripper/__init__.py,sha256=bBXRyK4ncX9Zv6R5NXEHD9f6hT9A2PZEsG0n4K76f00,71
32
- mani_skill/agents/robots/floating_robotiq_2f_85_gripper/floating_robotiq_2f_85_gripper.py,sha256=jGHjohi2Cfl-QnKlaaOmXcmUGWneW54UJ3BCQ2Y8dHA,5931
32
+ mani_skill/agents/robots/floating_robotiq_2f_85_gripper/floating_robotiq_2f_85_gripper.py,sha256=dKJg-mzGlpWBuYXr4uisK7VKsP6qjI4IQj0d42P2KXY,6184
33
33
  mani_skill/agents/robots/googlerobot/__init__.py,sha256=a74XGTSr8w3p6llHs01SDniTqTUP8H3QvKYVvyy9a_s,37
34
34
  mani_skill/agents/robots/googlerobot/googlerobot.py,sha256=y4EvHwPhfj0wF6gS7UVv2HpYKos6PpbSY_ZgVnFvDZ0,993
35
35
  mani_skill/agents/robots/humanoid/__init__.py,sha256=fP0TIhokMXDRgduz6BEvloeS6yNB-5_c0wI_cTFOiIU,31
36
- mani_skill/agents/robots/humanoid/humanoid.py,sha256=Q0_uuJnEj1DKwGe-CcB83lkLFkq1vL5-WdyZq5SEf_c,3793
36
+ mani_skill/agents/robots/humanoid/humanoid.py,sha256=5Ad2oO6xO11proFQutvIsqDe5VPBTI5ImPvZaqIN0O4,3791
37
37
  mani_skill/agents/robots/panda/__init__.py,sha256=VnFJLcmPMBjo-mlBpfMo5acYKud_wngRAcf67uiugSk,102
38
38
  mani_skill/agents/robots/panda/panda.py,sha256=QDH8_Gh2UaSDL-xpAvUL6fp5x4zyeVaUv8W2biixbgU,10623
39
39
  mani_skill/agents/robots/panda/panda_stick.py,sha256=ylYvjcgazMfp2k-RPbxkFByH9qyTLD8beDp2ra_WWso,5659
@@ -57,10 +57,8 @@ mani_skill/agents/robots/widowx/widowx.py,sha256=3QpXCvgFDnPYOmrbDGxqVVjSyXzG1FG
57
57
  mani_skill/agents/robots/xarm/__init__.py,sha256=6Mhn4vV4f9XxcK493U5W9VE6yGGgydPbVQLo9iOu8BA,40
58
58
  mani_skill/agents/robots/xarm/xarm7_ability.py,sha256=yj7CUBQpbGVUiT22qweJKTniJE0DxdEyyKj329vr0HY,6106
59
59
  mani_skill/agents/robots/xarm6/__init__.py,sha256=0r19OsKmm1ssKB5Rrie8syWQvpXNooVOv6m-iygrdM0,109
60
- mani_skill/agents/robots/xarm6/xarm6_nogripper.py,sha256=QCOCxEcLsYmO5FeqJPNi05mNiim4pyAO80LLaruYY8Y,7367
60
+ mani_skill/agents/robots/xarm6/xarm6_nogripper.py,sha256=FPhOpWQw5RPsSHLhZ9JWjYeh25GboO4I5_Hn05Ub84Q,7379
61
61
  mani_skill/agents/robots/xarm6/xarm6_robotiq.py,sha256=ofovUnURV8DQQGwWWyTE05h3ByrojV7UNr04_dMi0aE,15514
62
- mani_skill/agents/robots/xmate3/__init__.py,sha256=q6nQrQooKhTNnL2ScImPm2eUVYbh8erHo5U1u6HzeB8,34
63
- mani_skill/agents/robots/xmate3/xmate3.py,sha256=C56RPxQJp-p14Ww0klZlAO1v8-2IoNAUsAcItKpDjlk,7979
64
62
  mani_skill/assets/maniskill2-scene-2.glb,sha256=C5om9o9r6B-fWoauzNfUm2WV5sh8Nf7AvZRlYo1-IXQ,4737204
65
63
  mani_skill/assets/deformable_manipulation/beaker.glb,sha256=MMaoH6OruVSzO8CKuK2AMyaxA5kjsbbDQXyTVycWsPI,18104
66
64
  mani_skill/assets/deformable_manipulation/bottle.glb,sha256=AHWoATBEBeesfbiYNfSB0O0PWhsH0oa2wUBv79w9AVA,36476
@@ -494,7 +492,7 @@ mani_skill/envs/tasks/humanoid/assets/cardboard_box/01.png,sha256=UAzLp_o885YkTu
494
492
  mani_skill/envs/tasks/humanoid/assets/cardboard_box/box.mtl,sha256=E7F4ELdSP2Yd62T_rF_-gN1xa6N6Eo3AqAb17R5TSa8,219
495
493
  mani_skill/envs/tasks/humanoid/assets/cardboard_box/textured.obj,sha256=XQEt4EeMiW4kx4GhNOYk8TPi7lSuS6XTEBQjWSsxKJ0,12723
496
494
  mani_skill/envs/tasks/mobile_manipulation/__init__.py,sha256=GQajIA-t_p_9Hrhkj5-MEEmbGfaIkCYgaDepVUdhJ2Q,98
497
- mani_skill/envs/tasks/mobile_manipulation/open_cabinet_drawer.py,sha256=iaQuQzabAD7XshWMVgrYmLTytp612zrpeF1xCXCOJ_A,15918
495
+ mani_skill/envs/tasks/mobile_manipulation/open_cabinet_drawer.py,sha256=RBSjXseWSulU76gMIkDdAAhghZ2Wp38qF3hxb21UI8I,15925
498
496
  mani_skill/envs/tasks/mobile_manipulation/robocasa/__init__.py,sha256=mjpK3FNM5GnR4CaWfD1i2gVk5tU4N6tTkDm2pCqsfoo,40
499
497
  mani_skill/envs/tasks/mobile_manipulation/robocasa/kitchen.py,sha256=fXLoTIDgk-0eEaH7TrCODYWfVOVkGP6cRzinyfKEkWc,25625
500
498
  mani_skill/envs/tasks/quadruped/__init__.py,sha256=_AHS3H9Cj2XT7--5jwW1NMmVWbZxRpdGDNXudT6OrZM,92
@@ -506,7 +504,7 @@ mani_skill/envs/tasks/tabletop/lift_peg_upright.py,sha256=o6AmHyjyoT5U6IYn0tXz3M
506
504
  mani_skill/envs/tasks/tabletop/peg_insertion_side.py,sha256=3tf9eOI4PmNGKXooZUR81AXUPuUUTgG-V4DuYxtd5dg,14033
507
505
  mani_skill/envs/tasks/tabletop/pick_clutter_ycb.py,sha256=uA-kMGMAODeNvL99K1kDBrtU7b7VEkbkzUip5dJzucM,7345
508
506
  mani_skill/envs/tasks/tabletop/pick_cube.py,sha256=_2_9PlqPeQTA9Ti8r1mCvgwMCZECyf3HIqafRJKSnhg,6112
509
- mani_skill/envs/tasks/tabletop/pick_single_ycb.py,sha256=vlixZRNB8ny7mznfyAsefqC2EWN7jxVX_QBAjyAcawg,10852
507
+ mani_skill/envs/tasks/tabletop/pick_single_ycb.py,sha256=mrqEoOa9UVF34Z5fpsvjcr683diUffsKEjJ9Zh0qfFU,10409
510
508
  mani_skill/envs/tasks/tabletop/place_sphere.py,sha256=J3ReBFK7TyZQlleIFspz7Pl1wqAzaYoveGZfNNL5DVM,10101
511
509
  mani_skill/envs/tasks/tabletop/plug_charger.py,sha256=0g-rkNf-oo2ovttlcQ58jqUq6So4SKvYMTHORZUOi_0,10571
512
510
  mani_skill/envs/tasks/tabletop/poke_cube.py,sha256=KV6mp-Xgm9h4GYUcAUop2AZ4IECTdQKEMRRd9NThyBo,9343
@@ -603,7 +601,7 @@ mani_skill/utils/registration.py,sha256=u8ftfGvQP4qzlKNqLQjGi3cRF_-h6Rz-28xbLkW_
603
601
  mani_skill/utils/sapien_utils.py,sha256=RmzODbaKAUk0VBY8g3QFeKoZfBsVITZ3mM5NXqDL9AU,16312
604
602
  mani_skill/utils/assets/README.md,sha256=5kkmsIiV64ySEGO34HaAlpjXTyrGs1KTV5WnofK46G0,70
605
603
  mani_skill/utils/assets/__init__.py,sha256=gQVKwAczcImTXArSltBWKlSUUuguO12sZYO3Jh5KLso,159
606
- mani_skill/utils/assets/data.py,sha256=K31BH3yLsCcoHRlGEDPPw9Oc8gD5Tja1-PKJ-yDCypg,8895
604
+ mani_skill/utils/assets/data.py,sha256=YRobBeCxdf23kJxMac9J-dvvJoLSck8mQTbPZGeIAi4,8591
607
605
  mani_skill/utils/building/__init__.py,sha256=quCI5WYGhzGLMVg_NDyYv2G_MxRTBL8R6XD4a6iY8qc,218
608
606
  mani_skill/utils/building/_mjcf_loader.py,sha256=SqzSoRootFvItHrzwrDuSHScePxbaPqWb7262M7HzIU,37011
609
607
  mani_skill/utils/building/actor_builder.py,sha256=sTnpoThOqWegD-87Q7GyaVvB40fiWUwPOQpYkth-sis,14956
@@ -625,7 +623,7 @@ mani_skill/utils/geometry/__init__.py,sha256=0xcx-AqaRks_a2D-klRPfvV9CjSri_uI1Zq
625
623
  mani_skill/utils/geometry/bounding_cylinder.py,sha256=XO2vNVPl_JSceqpMPj0hH5L1SlVQFUZFQrRDy9rMOkI,4761
626
624
  mani_skill/utils/geometry/geometry.py,sha256=6hvxNDVLNBV5yBzHxam7hjEI2PVGvp67gFr-7QN4JXM,6419
627
625
  mani_skill/utils/geometry/rotation_conversions.py,sha256=U7z7jtEX3m1SIERxK2RzXuXL9AWlZOX2wJipkDIjwEk,20563
628
- mani_skill/utils/geometry/trimesh_utils.py,sha256=V8Jsg7JT_-xWcc0rhoRza-qgJD5omhOsbh3ivzmYLIk,3771
626
+ mani_skill/utils/geometry/trimesh_utils.py,sha256=JruFftu0YPMut4Ig3ucv7lq_29dhKf1FH8Brc2nYY08,4558
629
627
  mani_skill/utils/scene_builder/__init__.py,sha256=9jJXXQYBuYPabZ_GTIskD41_JX33R5ZT8jiaQOEEf0c,40
630
628
  mani_skill/utils/scene_builder/registration.py,sha256=jz0CODY0myH0t1PHKwUuuGoed9dngq0l_8QPcs5Mp1Q,1508
631
629
  mani_skill/utils/scene_builder/scene_builder.py,sha256=7cmP_Em1Xi3hhltrqvtLdSvk8eHkMEgjkEfqEuqecpY,4295
@@ -676,18 +674,18 @@ mani_skill/utils/scene_builder/robocasa/utils/placement_samplers.py,sha256=ZUbue
676
674
  mani_skill/utils/scene_builder/robocasa/utils/scene_registry.py,sha256=16ZHhI1mgDGy3373aMVRliN8pcvrVigNJIMExyTxE1c,3770
677
675
  mani_skill/utils/scene_builder/robocasa/utils/scene_utils.py,sha256=a8HnoRtbwmqQyvLQCHUXKj951G2_wlzodW_eD_CBvsc,6293
678
676
  mani_skill/utils/scene_builder/table/__init__.py,sha256=g5qmrh4wZ7V_PuKv-ZU9RVwNQUbQhCshAFInAyRLuZc,45
679
- mani_skill/utils/scene_builder/table/scene_builder.py,sha256=wOzEMPyqRrxHeJ8n1dbNAbrdpJldrApb80vsIHTKbhI,10201
677
+ mani_skill/utils/scene_builder/table/scene_builder.py,sha256=94uf40oQk6yxlr4y7IzNMrR9WaQD0Ntvgw-BX_QZius,9387
680
678
  mani_skill/utils/scene_builder/table/assets/Dining_Table_204_1.glb,sha256=IleHi35xfR8O9atKehqjWiuC9McjEFRCBKHRF85w_Tg,150524
681
679
  mani_skill/utils/scene_builder/table/assets/table.glb,sha256=yw69itZDjBFg8JXZAr9VQV-dZD-MaZChhqBSJR_nlRo,3891588
682
680
  mani_skill/utils/structs/README.md,sha256=qnYKimp_ZkgNcduURrYQxVTimNmq_usDMKoQ8VtMdCs,286
683
681
  mani_skill/utils/structs/__init__.py,sha256=BItR3Xe0z6xCrMHAEaH0AAAVyeonsQ3q-DJUyRUibAA,524
684
682
  mani_skill/utils/structs/actor.py,sha256=ImzUZULVnsaBksk5Zu2FD-GgYpfg1u4XZcH1jCtd-vQ,16772
685
- mani_skill/utils/structs/articulation.py,sha256=VP6D1XYIgutEKSyu7s2l69FTfL3fVFzlDywt1WJgXbk,30887
683
+ mani_skill/utils/structs/articulation.py,sha256=2E2Bb73CIFRcNAfj-y_Fz_0EubsJUfcf-gbADivmYTQ,33326
686
684
  mani_skill/utils/structs/articulation_joint.py,sha256=TY6joQ0RpnVlHbQHdtx_QQYqTWgFHLiZ642SSWZUuTw,11736
687
685
  mani_skill/utils/structs/base.py,sha256=meGQK5Y4KtHKLnp9VeOZS2gtwg9tE55whuEeqOguBaI,19465
688
686
  mani_skill/utils/structs/decorators.py,sha256=Lv6wQ989dOnreo2tB-qopDnkeBp_jsn1pmfUR-OY8VQ,535
689
687
  mani_skill/utils/structs/drive.py,sha256=UPQDkGbXS-CMRsZ1MHCb9s1vfAo5nqsywF83wKBVzSY,7505
690
- mani_skill/utils/structs/link.py,sha256=Slcg8SZ30TXObe36XNiPMWMFZhg_A4JPcIlUkvHcFCk,13367
688
+ mani_skill/utils/structs/link.py,sha256=XOB3b9RSN-XV11Jwlam3e6ca1fJ1cfKdZKg_lLIn1tw,14116
691
689
  mani_skill/utils/structs/pose.py,sha256=76Sjrs-y3f8YhnuqMZNih-NxcnhnfomIbnNW1SWqK6A,11938
692
690
  mani_skill/utils/structs/render_camera.py,sha256=cNdi_DMsrHDqO-vHjwEIMVFxVvPHNTmVZe0sCQ1XMbI,12599
693
691
  mani_skill/utils/structs/types.py,sha256=eDezQSxtu8IyjIe4k6m8amQn7eYIuP9iLatXbr7FYH8,3810
@@ -707,8 +705,8 @@ mani_skill/vector/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
707
705
  mani_skill/vector/wrappers/gymnasium.py,sha256=v1MDPIrVACBKCulrpdXBK2jDZQI7LKYFZgGgaCC5avY,7408
708
706
  mani_skill/vector/wrappers/sb3.py,sha256=SlXdiEPqcNHYMhJCzA29kBU6zK7DKTe1nc0L6Z3QQtY,4722
709
707
  mani_skill/viewer/__init__.py,sha256=srvDBsk4LQU75K2VIttrhiQ68p_ro7PSDqQRls2PY5c,1722
710
- mani_skill_nightly-2025.4.4.139.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
711
- mani_skill_nightly-2025.4.4.139.dist-info/METADATA,sha256=zR1WnFdxB1nT1Dr8d_sniMYHE808UvFW8KnfPLfOw9c,9290
712
- mani_skill_nightly-2025.4.4.139.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
713
- mani_skill_nightly-2025.4.4.139.dist-info/top_level.txt,sha256=bkBgOVl_MZMoQx2aRFsSFEYlZLxjWlip5vtJ39FB3jA,11
714
- mani_skill_nightly-2025.4.4.139.dist-info/RECORD,,
708
+ mani_skill_nightly-2025.4.5.358.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
709
+ mani_skill_nightly-2025.4.5.358.dist-info/METADATA,sha256=_GyZUzSt8rppWKc_ofgMkxnSdDdHRfFv62YWfVHeJuU,9290
710
+ mani_skill_nightly-2025.4.5.358.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
711
+ mani_skill_nightly-2025.4.5.358.dist-info/top_level.txt,sha256=bkBgOVl_MZMoQx2aRFsSFEYlZLxjWlip5vtJ39FB3jA,11
712
+ mani_skill_nightly-2025.4.5.358.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- from .xmate3 import Xmate3Robotiq
@@ -1,224 +0,0 @@
1
- from typing import Dict, Tuple
2
-
3
- import numpy as np
4
- import sapien
5
- import sapien.physx as physx
6
- import torch
7
-
8
- from mani_skill import ASSET_DIR
9
- from mani_skill.agents.base_agent import BaseAgent
10
- from mani_skill.agents.controllers import *
11
- from mani_skill.agents.registration import register_agent
12
- from mani_skill.sensors.camera import CameraConfig
13
- from mani_skill.utils import common, sapien_utils
14
- from mani_skill.utils.structs import Pose
15
- from mani_skill.utils.structs.actor import Actor
16
-
17
-
18
- @register_agent(asset_download_ids=["xmate3_robotiq"])
19
- class Xmate3Robotiq(BaseAgent):
20
- uid = "xmate3_robotiq"
21
- urdf_path = f"{ASSET_DIR}/robots/xmate3_robotiq/xmate3_robotiq.urdf"
22
- urdf_config = dict(
23
- _materials=dict(
24
- gripper=dict(static_friction=2.0, dynamic_friction=2.0, restitution=0.0)
25
- ),
26
- link=dict(
27
- left_inner_finger_pad=dict(
28
- material="gripper", patch_radius=0.1, min_patch_radius=0.1
29
- ),
30
- right_inner_finger_pad=dict(
31
- material="gripper", patch_radius=0.1, min_patch_radius=0.1
32
- ),
33
- ),
34
- )
35
-
36
- def __init__(
37
- self,
38
- scene: sapien.Scene,
39
- control_freq: int,
40
- control_mode: str = None,
41
- agent_idx=None,
42
- ):
43
- self.arm_joint_names = [
44
- "joint1",
45
- "joint2",
46
- "joint3",
47
- "joint4",
48
- "joint5",
49
- "joint6",
50
- "joint7",
51
- ]
52
- self.arm_stiffness = 1e3
53
- self.arm_damping = 1e2
54
- self.arm_force_limit = 100
55
-
56
- self.gripper_joint_names = [
57
- "robotiq_2f_140_left_driver_joint",
58
- "robotiq_2f_140_right_driver_joint",
59
- ]
60
- self.gripper_stiffness = 1e3
61
- self.gripper_damping = 1e2
62
- self.gripper_force_limit = 100
63
-
64
- self.ee_link_name = "grasp_convenient_link"
65
- super().__init__(scene, control_freq, control_mode, agent_idx)
66
-
67
- def _after_init(self):
68
- self.finger1_link = sapien_utils.get_obj_by_name(
69
- self.robot.get_links(), "left_inner_finger_pad"
70
- )
71
- self.finger2_link = sapien_utils.get_obj_by_name(
72
- self.robot.get_links(), "right_inner_finger_pad"
73
- )
74
- self.tcp = sapien_utils.get_obj_by_name(
75
- self.robot.get_links(), self.ee_link_name
76
- )
77
- self.queries: Dict[
78
- str, Tuple[physx.PhysxGpuContactPairImpulseQuery, Tuple[int]]
79
- ] = dict()
80
-
81
- @property
82
- def _controller_configs(self):
83
- # -------------------------------------------------------------------------- #
84
- # Arm
85
- # -------------------------------------------------------------------------- #
86
- arm_pd_joint_pos = PDJointPosControllerConfig(
87
- self.arm_joint_names,
88
- None,
89
- None,
90
- self.arm_stiffness,
91
- self.arm_damping,
92
- self.arm_force_limit,
93
- normalize_action=False,
94
- )
95
- arm_pd_joint_delta_pos = PDJointPosControllerConfig(
96
- self.arm_joint_names,
97
- -0.1,
98
- 0.1,
99
- self.arm_stiffness,
100
- self.arm_damping,
101
- self.arm_force_limit,
102
- use_delta=True,
103
- )
104
-
105
- arm_pd_ee_delta_pos = PDEEPosControllerConfig(
106
- joint_names=self.arm_joint_names,
107
- pos_lower=-0.1,
108
- pos_upper=0.1,
109
- stiffness=self.arm_stiffness,
110
- damping=self.arm_damping,
111
- force_limit=self.arm_force_limit,
112
- ee_link=self.ee_link_name,
113
- urdf_path=self.urdf_path,
114
- )
115
- arm_pd_ee_delta_pose = PDEEPoseControllerConfig(
116
- joint_names=self.arm_joint_names,
117
- pos_lower=-0.1,
118
- pos_upper=0.1,
119
- rot_lower=-0.1,
120
- rot_upper=0.1,
121
- stiffness=self.arm_stiffness,
122
- damping=self.arm_damping,
123
- force_limit=self.arm_force_limit,
124
- ee_link=self.ee_link_name,
125
- urdf_path=self.urdf_path,
126
- )
127
-
128
- # -------------------------------------------------------------------------- #
129
- # Gripper
130
- # -------------------------------------------------------------------------- #
131
- # NOTE(jigu): IssacGym uses large P and D but with force limit
132
- # However, tune a good force limit to have a good mimic behavior
133
- gripper_pd_joint_pos = PDJointPosMimicControllerConfig(
134
- self.gripper_joint_names,
135
- 0,
136
- 0.068 + 0.01,
137
- self.gripper_stiffness,
138
- self.gripper_damping,
139
- self.gripper_force_limit,
140
- )
141
-
142
- controller_configs = dict(
143
- pd_joint_pos=dict(arm=arm_pd_joint_pos, gripper=gripper_pd_joint_pos),
144
- arm_pd_joint_delta_pos=dict(
145
- arm=arm_pd_joint_delta_pos, gripper=gripper_pd_joint_pos
146
- ),
147
- pd_ee_delta_pos=dict(arm=arm_pd_ee_delta_pos, gripper=gripper_pd_joint_pos),
148
- pd_ee_delta_pose=dict(
149
- arm=arm_pd_ee_delta_pose, gripper=gripper_pd_joint_pos
150
- ),
151
- )
152
-
153
- # Make a deepcopy in case users modify any config
154
- return deepcopy_dict(controller_configs)
155
-
156
- @property
157
- def _sensor_configs(self):
158
- return [
159
- CameraConfig(
160
- uid="base_camera",
161
- pose=Pose.create_from_pq([0, 0, 0], [1, 0, 0, 0]),
162
- width=128,
163
- height=128,
164
- fov=1.5707,
165
- near=0.01,
166
- far=100,
167
- entity_uid="camera_base_link",
168
- ),
169
- CameraConfig(
170
- uid="hand_camera",
171
- pose=Pose.create_from_pq([0, 0, 0], [1, 0, 0, 0]),
172
- width=128,
173
- height=128,
174
- fov=1.5707,
175
- near=0.01,
176
- far=100,
177
- entity_uid="camera_hand_link",
178
- ),
179
- ]
180
-
181
- def is_grasping(self, object: Actor, min_force=0.5, max_angle=85):
182
- """Check if the robot is grasping an object
183
-
184
- Args:
185
- object (Actor): The object to check if the robot is grasping
186
- min_force (float, optional): Minimum force before the robot is considered to be grasping the object in Newtons. Defaults to 0.5.
187
- max_angle (int, optional): Maximum angle of contact to consider grasping. Defaults to 85.
188
- """
189
- l_contact_forces = self.scene.get_pairwise_contact_forces(
190
- self.finger1_link, object
191
- )
192
- r_contact_forces = self.scene.get_pairwise_contact_forces(
193
- self.finger2_link, object
194
- )
195
- lforce = torch.linalg.norm(l_contact_forces, axis=1)
196
- rforce = torch.linalg.norm(r_contact_forces, axis=1)
197
-
198
- # direction to open the gripper
199
- ldirection = self.finger1_link.pose.to_transformation_matrix()[..., :3, 1]
200
- rdirection = -self.finger2_link.pose.to_transformation_matrix()[..., :3, 1]
201
- langle = common.compute_angle_between(ldirection, l_contact_forces)
202
- rangle = common.compute_angle_between(rdirection, r_contact_forces)
203
- lflag = torch.logical_and(
204
- lforce >= min_force, torch.rad2deg(langle) <= max_angle
205
- )
206
- rflag = torch.logical_and(
207
- rforce >= min_force, torch.rad2deg(rangle) <= max_angle
208
- )
209
- return torch.logical_and(lflag, rflag)
210
-
211
- def is_static(self, threshold: float = 0.2):
212
- qvel = self.robot.get_qvel()[..., :-2]
213
- return torch.max(torch.abs(qvel), 1)[0] <= threshold
214
-
215
- @staticmethod
216
- def build_grasp_pose(approaching, closing, center):
217
- assert np.abs(1 - np.linalg.norm(approaching)) < 1e-3
218
- assert np.abs(1 - np.linalg.norm(closing)) < 1e-3
219
- assert np.abs(approaching @ closing) <= 1e-3
220
- ortho = np.cross(approaching, closing)
221
- T = np.eye(4)
222
- T[:3, :3] = np.stack([approaching, closing, ortho], axis=1)
223
- T[:3, 3] = center
224
- return sapien.Pose(T)