mani-skill-nightly 2025.6.13.2242__py3-none-any.whl → 2025.6.14.1947__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.
- mani_skill/envs/tasks/digital_twins/so100_arm/grasp_cube.py +37 -3
- {mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/METADATA +1 -1
- {mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/RECORD +6 -6
- {mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/LICENSE +0 -0
- {mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/WHEEL +0 -0
- {mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,10 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
|
-
from typing import Any, Dict, Tuple
|
2
|
+
from typing import Any, Dict, Tuple, Union
|
3
3
|
|
4
4
|
import numpy as np
|
5
5
|
import sapien
|
6
6
|
import torch
|
7
|
+
from sapien.render import RenderBodyComponent
|
7
8
|
from transforms3d.euler import euler2quat
|
8
9
|
|
9
10
|
import mani_skill.envs.utils.randomization as randomization
|
@@ -25,7 +26,8 @@ from mani_skill.utils.structs.types import GPUMemoryConfig, SimConfig
|
|
25
26
|
class SO100GraspCubeDomainRandomizationConfig:
|
26
27
|
### task agnostic domain randomizations, many of which you can copy over to your own tasks ###
|
27
28
|
initial_qpos_noise_scale: float = 0.02
|
28
|
-
|
29
|
+
robot_color: Union[str, Tuple[float, float, float]] = (1, 1, 1)
|
30
|
+
"""Color of the robot in RGB format in scale of 0 to 1 mapping to 0 to 255. If you want to randomize it just set this value to "random"."""
|
29
31
|
randomize_lighting: bool = True
|
30
32
|
max_camera_offset: Tuple[float, float, float] = (0.025, 0.025, 0.025)
|
31
33
|
"""max camera offset from the base camera position in x, y, and z axes"""
|
@@ -142,7 +144,12 @@ class SO100GraspCubeEnv(BaseDigitalTwinEnv):
|
|
142
144
|
def _load_agent(self, options: dict):
|
143
145
|
# load the robot arm at this initial pose
|
144
146
|
super()._load_agent(
|
145
|
-
options,
|
147
|
+
options,
|
148
|
+
sapien.Pose(p=[0, 0, 0], q=euler2quat(0, 0, np.pi / 2)),
|
149
|
+
build_separate=True
|
150
|
+
if self.domain_randomization
|
151
|
+
and self.domain_randomization_config.robot_color == "random"
|
152
|
+
else False,
|
146
153
|
)
|
147
154
|
|
148
155
|
def _load_lighting(self, options: dict):
|
@@ -251,6 +258,33 @@ class SO100GraspCubeEnv(BaseDigitalTwinEnv):
|
|
251
258
|
builder.initial_pose = sapien.Pose()
|
252
259
|
self.camera_mount = builder.build_kinematic("camera_mount")
|
253
260
|
|
261
|
+
# randomize or set a fixed robot color
|
262
|
+
for link in self.agent.robot.links:
|
263
|
+
for i, obj in enumerate(link._objs):
|
264
|
+
# modify the i-th object which is in parallel environment i
|
265
|
+
render_body_component: RenderBodyComponent = (
|
266
|
+
obj.entity.find_component_by_type(RenderBodyComponent)
|
267
|
+
)
|
268
|
+
if render_body_component is not None:
|
269
|
+
for render_shape in render_body_component.render_shapes:
|
270
|
+
for part in render_shape.parts:
|
271
|
+
if (
|
272
|
+
self.domain_randomization
|
273
|
+
and self.domain_randomization_config.robot_color
|
274
|
+
== "random"
|
275
|
+
):
|
276
|
+
part.material.set_base_color(
|
277
|
+
self._batched_episode_rng[i]
|
278
|
+
.uniform(low=0.0, high=1.0, size=(3,))
|
279
|
+
.tolist()
|
280
|
+
+ [1]
|
281
|
+
)
|
282
|
+
else:
|
283
|
+
part.material.set_base_color(
|
284
|
+
list(self.domain_randomization_config.robot_color)
|
285
|
+
+ [1]
|
286
|
+
)
|
287
|
+
|
254
288
|
def sample_camera_poses(self, n: int):
|
255
289
|
# a custom function to sample random camera poses
|
256
290
|
# the way this works is we first sample "eyes", which are the camera positions
|
{mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/RECORD
RENAMED
@@ -569,7 +569,7 @@ mani_skill/envs/tasks/digital_twins/bridge_dataset_eval/__init__.py,sha256=2okxy
|
|
569
569
|
mani_skill/envs/tasks/digital_twins/bridge_dataset_eval/base_env.py,sha256=HFjZwcMOSNduDmyD-qo9zVeHqHOdXdx0H11japbTpEI,21997
|
570
570
|
mani_skill/envs/tasks/digital_twins/bridge_dataset_eval/put_on_in_scene.py,sha256=kDKEX-e1Hq5kZiBs9xfEzU2jjx35eHWriAAYFJcBbgE,9419
|
571
571
|
mani_skill/envs/tasks/digital_twins/so100_arm/__init__.py,sha256=uehHSCaHoZDB9awMtF81r4A-X4fM6NFmErzOsgzgSs4,42
|
572
|
-
mani_skill/envs/tasks/digital_twins/so100_arm/grasp_cube.py,sha256=
|
572
|
+
mani_skill/envs/tasks/digital_twins/so100_arm/grasp_cube.py,sha256=tdNOiOx9wkwLIRmaXWO-T06Fpgftu3cvDoRW3fIriLs,21196
|
573
573
|
mani_skill/envs/tasks/drawing/__init__.py,sha256=eZ7CnzIWBOHUihvOKStSQK94eKSv5wchRdSodiDYBlw,72
|
574
574
|
mani_skill/envs/tasks/drawing/draw.py,sha256=WlhxJjt0-DlkxC3t-o0M8BoOwdwWpM9reupFg5OqiZc,8146
|
575
575
|
mani_skill/envs/tasks/drawing/draw_svg.py,sha256=UKnVl_tMfUNHmOg24Ny-wFynb5CaZC0uIHvW9sBxbyo,16206
|
@@ -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.
|
828
|
-
mani_skill_nightly-2025.6.
|
829
|
-
mani_skill_nightly-2025.6.
|
830
|
-
mani_skill_nightly-2025.6.
|
831
|
-
mani_skill_nightly-2025.6.
|
827
|
+
mani_skill_nightly-2025.6.14.1947.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
828
|
+
mani_skill_nightly-2025.6.14.1947.dist-info/METADATA,sha256=7ykOmMDZauv74yMcN0HM23GGZBfjOmX51owWJc843jg,9272
|
829
|
+
mani_skill_nightly-2025.6.14.1947.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
830
|
+
mani_skill_nightly-2025.6.14.1947.dist-info/top_level.txt,sha256=bkBgOVl_MZMoQx2aRFsSFEYlZLxjWlip5vtJ39FB3jA,11
|
831
|
+
mani_skill_nightly-2025.6.14.1947.dist-info/RECORD,,
|
{mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/LICENSE
RENAMED
File without changes
|
{mani_skill_nightly-2025.6.13.2242.dist-info → mani_skill_nightly-2025.6.14.1947.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|