mani-skill-nightly 2025.6.14.2053__py3-none-any.whl → 2025.6.15.2223__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.
@@ -726,11 +726,11 @@ class BaseEnv(gym.Env):
726
726
  self._load_agent(options)
727
727
 
728
728
  self._load_scene(options)
729
- self._load_lighting(options)
729
+ if self.scene.can_render(): self._load_lighting(options)
730
730
 
731
731
  self.scene._setup(enable_gpu=self.gpu_sim_enabled)
732
732
  # for GPU sim, we have to setup sensors after we call setup gpu in order to enable loading mounted sensors as they depend on GPU buffer data
733
- self._setup_sensors(options)
733
+ if self.scene.can_render(): self._setup_sensors(options)
734
734
  if self.render_mode == "human" and self._viewer is None:
735
735
  self._viewer = create_viewer(self._viewer_camera_config)
736
736
  if self._viewer is not None:
@@ -1167,8 +1167,11 @@ class BaseEnv(gym.Env):
1167
1167
  sub_scenes.append(scene)
1168
1168
  else:
1169
1169
  physx_system = physx.PhysxCpuSystem()
1170
+ systems = [physx_system]
1171
+ if self._render_device.can_render():
1172
+ systems.append(sapien.render.RenderSystem(self._render_device))
1170
1173
  sub_scenes = [
1171
- sapien.Scene([physx_system, sapien.render.RenderSystem(self._render_device)])
1174
+ sapien.Scene(systems)
1172
1175
  ]
1173
1176
  # create a "global" scene object that users can work with that is linked with all other scenes created
1174
1177
  self.scene = ManiSkillScene(
mani_skill/envs/scene.py CHANGED
@@ -115,6 +115,10 @@ class ManiSkillScene:
115
115
  )
116
116
  """state dict registry that map actor/articulation names to Actor/Articulation struct references. Only these structs are used for the environment state"""
117
117
 
118
+ def can_render(self):
119
+ """Whether or not this Scene object permits rendering, depending on the rendering device selected"""
120
+ return self.backend.render_device.can_render()
121
+
118
122
  # -------------------------------------------------------------------------- #
119
123
  # Functions from sapien.Scene
120
124
  # -------------------------------------------------------------------------- #
@@ -44,7 +44,7 @@ render_backend_name_mapping = {
44
44
 
45
45
  def parse_sim_and_render_backend(sim_backend: str, render_backend: str) -> BackendInfo:
46
46
  sim_backend = sim_backend_name_mapping[sim_backend]
47
- render_backend = render_backend_name_mapping[render_backend]
47
+ render_backend = render_backend_name_mapping.get(render_backend, render_backend)
48
48
  if sim_backend == "physx_cpu":
49
49
  device = torch.device("cpu")
50
50
  sim_device = sapien.Device("cpu")
@@ -53,6 +53,8 @@ class Args:
53
53
  """Seed(s) for random actions and simulator. Can be a single integer or a list of integers. Default is None (no seeds)"""
54
54
 
55
55
  def main(args: Args):
56
+ if args.render_mode == "none":
57
+ args.render_mode = None
56
58
  np.set_printoptions(suppress=True, precision=3)
57
59
  verbose = not args.quiet
58
60
  if isinstance(args.seed, int):
@@ -179,11 +179,12 @@ class ActorBuilder(SAPIENActorBuilder):
179
179
  build the raw sapien entity. Modifies original SAPIEN function to accept new procedurally generated render components
180
180
  """
181
181
  entity = sapien.Entity()
182
- if self.visual_records or len(self._procedural_shapes) > 0:
183
- render_component = self.build_render_component()
184
- for shape in self._procedural_shapes:
185
- render_component.attach(shape)
186
- entity.add_component(render_component)
182
+ if self.scene.can_render():
183
+ if self.visual_records or len(self._procedural_shapes) > 0:
184
+ render_component = self.build_render_component()
185
+ for shape in self._procedural_shapes:
186
+ render_component.attach(shape)
187
+ entity.add_component(render_component)
187
188
  entity.add_component(self.build_physx_component())
188
189
  entity.name = self.name
189
190
  return entity
@@ -78,8 +78,9 @@ class ArticulationBuilder(SapienArticulationBuilder):
78
78
  )
79
79
 
80
80
  entity.add_component(link_component)
81
- if b.visual_records:
82
- entity.add_component(b.build_render_component())
81
+ if self.scene.can_render():
82
+ if b.visual_records:
83
+ entity.add_component(b.build_render_component())
83
84
  entity.name = b.name
84
85
 
85
86
  link_component.name = f"{name_prefix}{b.name}"
@@ -43,65 +43,79 @@ def build_ground(
43
43
  ground.set_scene_idxs([0])
44
44
  actor = ground.build_static(name=name)
45
45
 
46
- # generate a grid of right triangles that form 1x1 meter squares centered at (0, 0, 0)
47
- floor_length = floor_width if floor_length is None else floor_length
48
- num_verts = (floor_width + 1) * (floor_length + 1)
49
- vertices = np.zeros((num_verts, 3))
50
- floor_half_width = floor_width / 2
51
- floor_half_length = floor_length / 2
52
- xrange = np.arange(start=-floor_half_width, stop=floor_half_width + 1)
53
- yrange = np.arange(start=-floor_half_length, stop=floor_half_length + 1)
54
- xx, yy = np.meshgrid(xrange, yrange)
55
- xys = np.stack((yy, xx), axis=2).reshape(-1, 2)
56
- vertices[:, 0] = xys[:, 0] + xy_origin[0]
57
- vertices[:, 1] = xys[:, 1] + xy_origin[1]
58
- vertices[:, 2] = altitude
59
- normals = np.zeros((len(vertices), 3))
60
- normals[:, 2] = 1
46
+ if scene.can_render():
47
+ # generate a grid of right triangles that form 1x1 meter squares centered at (0, 0, 0)
48
+ floor_length = floor_width if floor_length is None else floor_length
49
+ num_verts = (floor_width + 1) * (floor_length + 1)
50
+ vertices = np.zeros((num_verts, 3))
51
+ floor_half_width = floor_width / 2
52
+ floor_half_length = floor_length / 2
53
+ xrange = np.arange(start=-floor_half_width, stop=floor_half_width + 1)
54
+ yrange = np.arange(start=-floor_half_length, stop=floor_half_length + 1)
55
+ xx, yy = np.meshgrid(xrange, yrange)
56
+ xys = np.stack((yy, xx), axis=2).reshape(-1, 2)
57
+ vertices[:, 0] = xys[:, 0] + xy_origin[0]
58
+ vertices[:, 1] = xys[:, 1] + xy_origin[1]
59
+ vertices[:, 2] = altitude
60
+ normals = np.zeros((len(vertices), 3))
61
+ normals[:, 2] = 1
61
62
 
62
- mat = sapien.render.RenderMaterial()
63
- mat.base_color_texture = sapien.render.RenderTexture2D(
64
- filename=texture_file,
65
- mipmap_levels=mipmap_levels,
66
- )
67
- uv_scale = floor_width / texture_square_len
68
- uvs = np.zeros((len(vertices), 2))
69
- uvs[:, 0] = (xys[:, 0] * uv_scale + floor_half_width) / floor_width
70
- uvs[:, 1] = (xys[:, 1] * uv_scale + floor_half_width) / floor_width
63
+ mat = sapien.render.RenderMaterial()
64
+ mat.base_color_texture = sapien.render.RenderTexture2D(
65
+ filename=texture_file,
66
+ mipmap_levels=mipmap_levels,
67
+ )
68
+ uv_scale = floor_width / texture_square_len
69
+ uvs = np.zeros((len(vertices), 2))
70
+ uvs[:, 0] = (xys[:, 0] * uv_scale + floor_half_width) / floor_width
71
+ uvs[:, 1] = (xys[:, 1] * uv_scale + floor_half_width) / floor_width
71
72
 
72
- # TODO: This is fast but still two for loops which is a little annoying
73
- triangles = []
74
- for i in range(floor_length):
75
- triangles.append(
76
- np.stack(
77
- [
78
- np.arange(floor_width) + i * (floor_width + 1),
79
- np.arange(floor_width) + 1 + floor_width + i * (floor_width + 1),
80
- np.arange(floor_width) + 1 + i * (floor_width + 1),
81
- ],
82
- axis=1,
73
+ # TODO: This is fast but still two for loops which is a little annoying
74
+ triangles = []
75
+ for i in range(floor_length):
76
+ triangles.append(
77
+ np.stack(
78
+ [
79
+ np.arange(floor_width) + i * (floor_width + 1),
80
+ np.arange(floor_width)
81
+ + 1
82
+ + floor_width
83
+ + i * (floor_width + 1),
84
+ np.arange(floor_width) + 1 + i * (floor_width + 1),
85
+ ],
86
+ axis=1,
87
+ )
83
88
  )
84
- )
85
- for i in range(floor_length):
86
- triangles.append(
87
- np.stack(
88
- [
89
- np.arange(floor_width) + 1 + floor_width + i * (floor_width + 1),
90
- np.arange(floor_width) + floor_width + 2 + i * (floor_width + 1),
91
- np.arange(floor_width) + 1 + i * (floor_width + 1),
92
- ],
93
- axis=1,
89
+ for i in range(floor_length):
90
+ triangles.append(
91
+ np.stack(
92
+ [
93
+ np.arange(floor_width)
94
+ + 1
95
+ + floor_width
96
+ + i * (floor_width + 1),
97
+ np.arange(floor_width)
98
+ + floor_width
99
+ + 2
100
+ + i * (floor_width + 1),
101
+ np.arange(floor_width) + 1 + i * (floor_width + 1),
102
+ ],
103
+ axis=1,
104
+ )
94
105
  )
95
- )
96
- triangles = np.concatenate(triangles)
106
+ triangles = np.concatenate(triangles)
97
107
 
98
- shape = sapien.render.RenderShapeTriangleMesh(
99
- vertices=vertices, triangles=triangles, normals=normals, uvs=uvs, material=mat
100
- )
108
+ shape = sapien.render.RenderShapeTriangleMesh(
109
+ vertices=vertices,
110
+ triangles=triangles,
111
+ normals=normals,
112
+ uvs=uvs,
113
+ material=mat,
114
+ )
101
115
 
102
- for obj in actor._objs:
103
- floor_comp = sapien.render.RenderBodyComponent()
104
- floor_comp.attach(shape)
105
- obj.add_component(floor_comp)
116
+ for obj in actor._objs:
117
+ floor_comp = sapien.render.RenderBodyComponent()
118
+ floor_comp.attach(shape)
119
+ obj.add_component(floor_comp)
106
120
 
107
121
  return actor
@@ -41,14 +41,14 @@ class TableSceneBuilder(SceneBuilder):
41
41
  p=[-0.12, 0, -0.9196429], q=euler2quat(0, 0, np.pi / 2)
42
42
  )
43
43
  table = builder.build_kinematic(name="table-workspace")
44
- aabb = (
45
- table._objs[0]
46
- .find_component_by_type(sapien.render.RenderBodyComponent)
47
- .compute_global_aabb_tight()
48
- )
49
- self.table_length = aabb[1, 0] - aabb[0, 0]
50
- self.table_width = aabb[1, 1] - aabb[0, 1]
51
- self.table_height = aabb[1, 2] - aabb[0, 2]
44
+ # aabb = (
45
+ # table._objs[0]
46
+ # .find_component_by_type(sapien.render.RenderBodyComponent)
47
+ # .compute_global_aabb_tight()
48
+ # )
49
+ self.table_length = 1
50
+ self.table_width = 1
51
+ self.table_height = 1
52
52
  floor_width = 100
53
53
  if self.scene.parallel_in_single_scene:
54
54
  floor_width = 500
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mani-skill-nightly
3
- Version: 2025.6.14.2053
3
+ Version: 2025.6.15.2223
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
@@ -539,8 +539,8 @@ mani_skill/assets/robots/xarm7/meshes/visual/link7.glb,sha256=aZatACOv20VJbi2tOE
539
539
  mani_skill/assets/robots/xarm7/meshes/visual/link_base.glb,sha256=vcy2lN1V72jIsSDRT0ZKVskR_0pVOXtDvBkxO2GENWs,467668
540
540
  mani_skill/envs/__init__.py,sha256=YPlttBErTcf9vSnkZ54EQ8vTABSfFFrBdUY0AkF4vmg,43
541
541
  mani_skill/envs/minimal_template.py,sha256=9THHWA1vkHatptc9g5Ojh-UBUKWQmLHVeq4fcaqv2aY,2200
542
- mani_skill/envs/sapien_env.py,sha256=cnJlWCqf1cajCCkok5cDClUKiGtbwpIcDAJmrw8Hfgs,72435
543
- mani_skill/envs/scene.py,sha256=_E3n86SmGloC7xSGHF37Pbc-42RC54hSXYlj4s8F4WA,48215
542
+ mani_skill/envs/sapien_env.py,sha256=aZWIZFZomo_oj5tXmrZ0VSrQZl0TRSCgVrj1lvgmNgQ,72601
543
+ mani_skill/envs/scene.py,sha256=EFMX4ygcbgy3V621aglyZoUKoCCRaaZ0ff2fcP6Y_ls,48406
544
544
  mani_skill/envs/sim2real_env.py,sha256=3mkQX4TonE2pUC5_Atmx0IYDH2_v6GSwOPJvQMEvCNY,19214
545
545
  mani_skill/envs/template.py,sha256=0wnwKjnGOF7RvTR5Gz4VopaUiFxnIioXwmb4nPVxAs8,11939
546
546
  mani_skill/envs/scenes/__init__.py,sha256=uL2T3AuoUkqe2FXmFjo4OQAMQDsePa6qVjCjEzJLqtE,868
@@ -636,7 +636,7 @@ mani_skill/envs/utils/randomization/pose.py,sha256=9PPg-QMorHVe3fV4e3T-BRYu0E_8I
636
636
  mani_skill/envs/utils/randomization/samplers.py,sha256=EOkF18mmDC7fA2hgj8QC2Ag0gnf4H-4MIjOCDvTMpCE,3665
637
637
  mani_skill/envs/utils/rewards/__init__.py,sha256=66MV5YCbnpF4ac_SvTVJ000RxM1AIsclX7OatiA-Wak,22
638
638
  mani_skill/envs/utils/rewards/common.py,sha256=1lfJNWG3x7UjarHLteLXa8DCzbe_L7nYBMOBo5D9CRQ,3647
639
- mani_skill/envs/utils/system/backend.py,sha256=C2QzC2KnI205ZYuVUNIqxnwTFE-rtAQ81UWtn7FSywA,2640
639
+ mani_skill/envs/utils/system/backend.py,sha256=f8eaCmaYcXGrNQuuDK2fYji-cHxyBB6PbxKlKo7W6gQ,2660
640
640
  mani_skill/evaluation/__init__.py,sha256=PCMN6dc9zgFKuXTPmkAUEahP3XG65cKRLGMXrk5IeXY,33
641
641
  mani_skill/evaluation/evaluator.py,sha256=1EN6qAiGx3taB4vCeArUp33UZjLvBt1Ke6iUW8Z8aV0,4493
642
642
  mani_skill/evaluation/run_evaluation.py,sha256=yorphrlJKEGycHfQS8equnJHRsyjDuv77ZGNpg9wvCs,4780
@@ -644,7 +644,7 @@ mani_skill/evaluation/solution.py,sha256=e_Aa0f4sSQ56KXL7tVDPUKf7WTjcuFc5X4J76p8
644
644
  mani_skill/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
645
645
  mani_skill/examples/demo_manual_control.py,sha256=Z17ER37oehS8VgtDO_4dwiy5jDgL93nT9IdCsNDf0Es,8275
646
646
  mani_skill/examples/demo_manual_control_continuous.py,sha256=tnCnKX2v1iIhtXwvWR2NzXgpf3e0y2-qAO91jJBLIO0,9679
647
- mani_skill/examples/demo_random_action.py,sha256=qdpndV31mWxRK_340TGDXYQAV4CAkKc4DaFHmPM_7Jw,5226
647
+ mani_skill/examples/demo_random_action.py,sha256=_8JY0J6qAQFQVTO1Tz_M_M4TFXveop4O-v0Itc2XCBg,5293
648
648
  mani_skill/examples/demo_reset_distribution.py,sha256=m1I5WQptBJrXvFPdUi7TIzR_Q--_wGAFkbcKNKWlq2U,2988
649
649
  mani_skill/examples/demo_robot.py,sha256=bIeHztjM0R6yJT699WQ6jkhv6LjsiP4GWa3Whyom_qM,4881
650
650
  mani_skill/examples/demo_vis_pcd.py,sha256=50YT-YVeX4sEsXxHh0S9Ju_kra8ZcUzPfFpG3EgK2o4,2139
@@ -722,9 +722,9 @@ mani_skill/utils/assets/__init__.py,sha256=gQVKwAczcImTXArSltBWKlSUUuguO12sZYO3J
722
722
  mani_skill/utils/assets/data.py,sha256=xEuibRoEPBDN_vEU-MM5UWf6VDb1omE6BfZKPvlMPdI,8807
723
723
  mani_skill/utils/building/__init__.py,sha256=quCI5WYGhzGLMVg_NDyYv2G_MxRTBL8R6XD4a6iY8qc,218
724
724
  mani_skill/utils/building/_mjcf_loader.py,sha256=SqzSoRootFvItHrzwrDuSHScePxbaPqWb7262M7HzIU,37011
725
- mani_skill/utils/building/actor_builder.py,sha256=BSRLXMfxbFyT_R5-WFNGcTFFa0e2HToLqQFvpOy9DqA,14915
726
- mani_skill/utils/building/articulation_builder.py,sha256=ur-UTrRoy9mVAkJnaeeGwTSQMTNciumTVmreeEBtLEM,8444
727
- mani_skill/utils/building/ground.py,sha256=tVMon30rnOFqT-uIacZ2bOF1gxiRUIhKx4gDZU0sptg,3849
725
+ mani_skill/utils/building/actor_builder.py,sha256=BKfGpqsvwE1nTQqpMUiq36NQyLB6mga0OqYYnwR0fWw,14971
726
+ mani_skill/utils/building/articulation_builder.py,sha256=ubRJYjINo7XTQ9IfE45Ie3CZGl79rmzYi_Kpq86Czrs,8492
727
+ mani_skill/utils/building/ground.py,sha256=YaVt9xQfsqG0GRjKWe0o1e7pdPzmN-PN8FQOdzdargU,4365
728
728
  mani_skill/utils/building/mjcf_loader.py,sha256=FY--8z4JWjDHCM6XYLSC8W14MHVywV0SzOTiHzWafbs,4452
729
729
  mani_skill/utils/building/urdf_loader.py,sha256=llYoiRDU5gTi7sgi8Fv-Zjwdo7SoLpmtG4gJJEpn85g,4905
730
730
  mani_skill/utils/building/actors/__init__.py,sha256=G7aFAkb2f7c6hUcljJ17GIvlzUzVlpIOg6AZkTWFbDg,1420
@@ -792,7 +792,7 @@ mani_skill/utils/scene_builder/robocasa/utils/placement_samplers.py,sha256=ZUbue
792
792
  mani_skill/utils/scene_builder/robocasa/utils/scene_registry.py,sha256=16ZHhI1mgDGy3373aMVRliN8pcvrVigNJIMExyTxE1c,3770
793
793
  mani_skill/utils/scene_builder/robocasa/utils/scene_utils.py,sha256=a8HnoRtbwmqQyvLQCHUXKj951G2_wlzodW_eD_CBvsc,6293
794
794
  mani_skill/utils/scene_builder/table/__init__.py,sha256=g5qmrh4wZ7V_PuKv-ZU9RVwNQUbQhCshAFInAyRLuZc,45
795
- mani_skill/utils/scene_builder/table/scene_builder.py,sha256=J24fto2sbT0lhYHthG8xqHRtjehAkYAz_HNmGK35dL8,10132
795
+ mani_skill/utils/scene_builder/table/scene_builder.py,sha256=L7S4kAmiyEuqBhi8ZkhHkMh3tEWnUZnL29CjQKdL49A,10076
796
796
  mani_skill/utils/scene_builder/table/assets/Dining_Table_204_1.glb,sha256=IleHi35xfR8O9atKehqjWiuC9McjEFRCBKHRF85w_Tg,150524
797
797
  mani_skill/utils/scene_builder/table/assets/table.glb,sha256=yw69itZDjBFg8JXZAr9VQV-dZD-MaZChhqBSJR_nlRo,3891588
798
798
  mani_skill/utils/structs/README.md,sha256=qnYKimp_ZkgNcduURrYQxVTimNmq_usDMKoQ8VtMdCs,286
@@ -824,8 +824,8 @@ mani_skill/vector/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
824
824
  mani_skill/vector/wrappers/gymnasium.py,sha256=0kNe_iquf8J3503obkbmCKNaYr5m3cPrC_hBZS0Nl9Y,7408
825
825
  mani_skill/vector/wrappers/sb3.py,sha256=SlXdiEPqcNHYMhJCzA29kBU6zK7DKTe1nc0L6Z3QQtY,4722
826
826
  mani_skill/viewer/__init__.py,sha256=srvDBsk4LQU75K2VIttrhiQ68p_ro7PSDqQRls2PY5c,1722
827
- mani_skill_nightly-2025.6.14.2053.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
828
- mani_skill_nightly-2025.6.14.2053.dist-info/METADATA,sha256=2SOpKg_C6ffpoTY5JRpFgmq03KJIbyVzKTGhJSADAn8,9272
829
- mani_skill_nightly-2025.6.14.2053.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
830
- mani_skill_nightly-2025.6.14.2053.dist-info/top_level.txt,sha256=bkBgOVl_MZMoQx2aRFsSFEYlZLxjWlip5vtJ39FB3jA,11
831
- mani_skill_nightly-2025.6.14.2053.dist-info/RECORD,,
827
+ mani_skill_nightly-2025.6.15.2223.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
828
+ mani_skill_nightly-2025.6.15.2223.dist-info/METADATA,sha256=Pqmxr5pMUY9mIq10F0gW9GlI7aQc0GF78W7vlCUGaO0,9272
829
+ mani_skill_nightly-2025.6.15.2223.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
830
+ mani_skill_nightly-2025.6.15.2223.dist-info/top_level.txt,sha256=bkBgOVl_MZMoQx2aRFsSFEYlZLxjWlip5vtJ39FB3jA,11
831
+ mani_skill_nightly-2025.6.15.2223.dist-info/RECORD,,