|
37 | 37 | ) |
38 | 38 |
|
39 | 39 |
|
| 40 | +OBJECT_PHYSICS = { |
| 41 | + "physics_material": RigidBodyMaterialCfg(static_friction=0.5), |
| 42 | + "collision_props": sim_utils.CollisionPropertiesCfg(contact_offset=0.002), |
| 43 | +} |
| 44 | + |
| 45 | + |
40 | 46 | @configclass |
41 | 47 | class ObjectCfg(PresetCfg): |
42 | 48 | shapes = sim_utils.MultiAssetSpawnerCfg( |
43 | 49 | assets_cfg=[ |
44 | | - MeshCuboidCfg(size=(0.05, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
45 | | - MeshCuboidCfg(size=(0.05, 0.05, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
46 | | - MeshCuboidCfg(size=(0.025, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
47 | | - MeshCuboidCfg(size=(0.025, 0.05, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
48 | | - MeshCuboidCfg(size=(0.025, 0.025, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
49 | | - MeshCuboidCfg(size=(0.01, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
50 | | - MeshSphereCfg(radius=0.05, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
51 | | - MeshSphereCfg(radius=0.025, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
52 | | - MeshCapsuleCfg(radius=0.04, height=0.025, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
53 | | - MeshCapsuleCfg(radius=0.04, height=0.01, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
54 | | - MeshCapsuleCfg(radius=0.04, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
55 | | - MeshCapsuleCfg(radius=0.025, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
56 | | - MeshCapsuleCfg(radius=0.025, height=0.2, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
57 | | - MeshCapsuleCfg(radius=0.01, height=0.2, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
58 | | - MeshConeCfg(radius=0.05, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
59 | | - MeshConeCfg(radius=0.025, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), |
| 50 | + MeshCuboidCfg(size=(0.05, 0.1, 0.1), **OBJECT_PHYSICS), |
| 51 | + MeshCuboidCfg(size=(0.05, 0.05, 0.1), **OBJECT_PHYSICS), |
| 52 | + MeshCuboidCfg(size=(0.025, 0.1, 0.1), **OBJECT_PHYSICS), |
| 53 | + MeshCuboidCfg(size=(0.025, 0.05, 0.1), **OBJECT_PHYSICS), |
| 54 | + MeshCuboidCfg(size=(0.025, 0.025, 0.1), **OBJECT_PHYSICS), |
| 55 | + MeshCuboidCfg(size=(0.01, 0.1, 0.1), **OBJECT_PHYSICS), |
| 56 | + MeshSphereCfg(radius=0.05, **OBJECT_PHYSICS), |
| 57 | + MeshSphereCfg(radius=0.025, **OBJECT_PHYSICS), |
| 58 | + MeshCapsuleCfg(radius=0.04, height=0.025, **OBJECT_PHYSICS), |
| 59 | + MeshCapsuleCfg(radius=0.04, height=0.01, **OBJECT_PHYSICS), |
| 60 | + MeshCapsuleCfg(radius=0.04, height=0.1, **OBJECT_PHYSICS), |
| 61 | + MeshCapsuleCfg(radius=0.025, height=0.1, **OBJECT_PHYSICS), |
| 62 | + MeshCapsuleCfg(radius=0.025, height=0.2, **OBJECT_PHYSICS), |
| 63 | + MeshCapsuleCfg(radius=0.01, height=0.2, **OBJECT_PHYSICS), |
| 64 | + MeshConeCfg(radius=0.05, height=0.1, **OBJECT_PHYSICS), |
| 65 | + MeshConeCfg(radius=0.025, height=0.1, **OBJECT_PHYSICS), |
60 | 66 | ], |
61 | 67 | rigid_props=sim_utils.RigidBodyPropertiesCfg( |
62 | 68 | solver_position_iteration_count=16, |
@@ -232,7 +238,7 @@ class StartupEventCfg: |
232 | 238 | }, |
233 | 239 | ) |
234 | 240 |
|
235 | | - object_physics_material = EventTerm( |
| 241 | + OBJECT_PHYSICS_material = EventTerm( |
236 | 242 | func=mdp.randomize_rigid_body_material, |
237 | 243 | mode="startup", |
238 | 244 | params={ |
@@ -427,14 +433,6 @@ class DexsuiteReorientEnvCfg(ManagerBasedEnvCfg): |
427 | 433 |
|
428 | 434 | def validate_config(self): |
429 | 435 | """Check for invalid preset combinations after resolution.""" |
430 | | - is_newton = not isinstance(self.sim.physics, PhysxCfg) |
431 | | - is_multi_asset = isinstance(self.scene.object.spawn, sim_utils.MultiAssetSpawnerCfg) |
432 | | - |
433 | | - # if is_newton and is_multi_asset: |
434 | | - # raise ValueError( |
435 | | - # "Newton physics does not support multi-asset spawning." |
436 | | - # " Use a single-geometry object preset (e.g. presets=cube) instead of 'shapes'." |
437 | | - # ) |
438 | 436 |
|
439 | 437 | warp_supported = {"rgb", "depth", "distance_to_image_plane"} |
440 | 438 | for cam_attr in ("base_camera", "wrist_camera"): |
|
0 commit comments