Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab.assets import ArticulationCfg, RigidObjectCfg
from isaaclab.physics import PhysxAutoCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.contrib.stack import mdp
from isaaclab_tasks.contrib.stack.stack_env_cfg import (
PhysicsCfg,
StackEnvCfg,
StackEventCfg,
apply_default_semantics,
Expand Down Expand Up @@ -52,21 +50,6 @@
_SO101_BASE_SEAT_ROT = (0.0, 0.0, 0.70710678, 0.70710678)


@configclass
class SO101StackPhysicsCfg(PhysicsCfg):
"""Physics presets for the SO-101 stack tasks.

Extends the stack-family presets with
:attr:`~isaaclab_physx.physics.PhysxCfg.solve_articulation_contact_last` so contacts
are solved after the articulation position drive and can stall the closing jaw at the
object surface instead of letting it tunnel through grasped objects.
"""

isaacsim_physx = PhysicsCfg().isaacsim_physx.replace(solve_articulation_contact_last=True)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx)
default = isaacsim_physx


@configclass
class SO101CubeStackEnvCfg(StackEnvCfg):
"""Configuration for the SO-101 Cube Stack Environment (joint-position control).
Expand Down Expand Up @@ -144,7 +127,3 @@ def __post_init__(self):
],
marker_scale=(0.05, 0.05, 0.05),
)

# simulation settings: solve finger contacts after the position drive so they can
# stall the closing jaw at the object surface (see SO101StackPhysicsCfg).
self.sim.physics = SO101StackPhysicsCfg()
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ class PhysicsCfg(PresetCfg):
gpu_found_lost_aggregate_pairs_capacity=1024 * 1024 * 4,
gpu_total_aggregate_pairs_capacity=2**21,
friction_correlation_distance=0.00625,
# Let object contacts stall position-driven grippers before they tunnel through a grasp.
solve_articulation_contact_last=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Shared contact ordering changes dynamics

When a non-SO-101 stack task uses the default Isaac Sim PhysX preset, StackEnvCfg.__post_init__ now enables solve_articulation_contact_last, changing the articulation/contact solve order from its previous default and therefore changing grasp and contact dynamics for existing Franka, Galbot, and UR10 tasks.

Knowledge Base Used: isaaclab_tasks: Task Registration and Organization

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Design Architecture — SO-101 contact ordering becomes stack-family default

solve_articulation_contact_last=True previously applied only when SO101CubeStackEnvCfg.__post_init__ installed SO101StackPhysicsCfg. On the family PhysicsCfg it changes PhysX contact-solve ordering for every environment deriving from StackEnvCfg, altering grasp dynamics and demonstration replay for robots that never opted in. Keep the flag in an SO-101-specific preset, or accept the family-wide change and record it as user-visible instead of a .skip fragment.

)
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import UnitreeA1RoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=60,
Expand All @@ -33,7 +27,7 @@ class PhysicsCfg(PresetCfg):
debug_mode=False,
)
newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64))
default = isaacsim_physx
default = RoughPhysicsCfg().isaacsim_physx


@configclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import AnymalBRoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=75,
Expand All @@ -33,7 +27,7 @@ class PhysicsCfg(PresetCfg):
debug_mode=False,
)
newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64))
default = isaacsim_physx
default = RoughPhysicsCfg().isaacsim_physx


@configclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import AnymalCRoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=120,
Expand All @@ -33,7 +27,7 @@ class PhysicsCfg(PresetCfg):
debug_mode=False,
)
newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64))
default = isaacsim_physx
default = RoughPhysicsCfg().isaacsim_physx


@configclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import UnitreeGo1RoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=60,
Expand All @@ -33,7 +27,7 @@ class PhysicsCfg(PresetCfg):
debug_mode=False,
)
newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64))
default = isaacsim_physx
default = RoughPhysicsCfg().isaacsim_physx


@configclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
#
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_ov.physics import OvPhysxCfg

from isaaclab.assets import ArticulationCfg
from isaaclab.managers import EventTermCfg as EventTerm
from isaaclab.managers import RewardTermCfg as RewTerm
from isaaclab.managers import SceneEntityCfg
from isaaclab.physics import PhysxAutoCfg
from isaaclab.sensors import CameraCfg, ContactSensorCfg
from isaaclab.utils.configclass import configclass

Expand All @@ -24,20 +21,6 @@
FINGER_SENSORS = [f"{name}_object_s" for name in FINGERTIP_LIST if name != "thumb_link_3"]


@configclass
class KukaAllegroPhysicsCfg(lift.PhysicsCfg):
"""Physics presets supported by the Kuka Allegro tasks."""

isaacsim_physx = lift.PhysicsCfg().isaacsim_physx
ovphysx = OvPhysxCfg(
gpu_max_rigid_patch_count=4 * 5 * 2**15,
gpu_found_lost_pairs_capacity=2**26,
)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
newton_mjwarp = lift.PhysicsCfg().newton_mjwarp
default = newton_mjwarp


@configclass
class KukaAllegroSceneCfg(lift.SceneCfg):
"""KukaAllegro scene for the Lift and Reorient tasks.
Expand Down Expand Up @@ -105,7 +88,6 @@ class KukaAllegroMixinCfg:

def __post_init__(self: lift.ReorientEnvCfg):
super().__post_init__()
self.sim.physics = KukaAllegroPhysicsCfg()
self.commands.object_pose.body_name = "palm_link"
events = self.events.conditional_reset.params["terms"]
events["reset_robot_wrist_joint"].params["asset_cfg"] = SceneEntityCfg("robot", joint_names="iiwa7_joint_7")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from dataclasses import MISSING

from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg, NewtonShapeCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

import isaaclab.sim as sim_utils
Expand Down Expand Up @@ -490,6 +491,10 @@ class PhysicsCfg(PresetCfg):
gpu_max_rigid_patch_count=4 * 5 * 2**15,
gpu_found_lost_pairs_capacity=2**26,
)
ovphysx = OvPhysxCfg(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Suggestion · Api — Lift OV preset widened beyond Kuka Allegro

The shared lift PhysicsCfg previously built PhysxAutoCfg with no ovphysx preset, so non-Kuka lift/reorient tasks used OV defaults. Wiring these capacities (including gpu_found_lost_pairs_capacity=2**26) into physx changes OV backend allocation for the whole lift family. Either scope them to the Kuka composition config or document the intentional family-wide resource change rather than shipping a .skip fragment.

gpu_max_rigid_patch_count=4 * 5 * 2**15,
gpu_found_lost_pairs_capacity=2**26,
)
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
solver="newton",
Expand All @@ -509,7 +514,7 @@ class PhysicsCfg(PresetCfg):
num_substeps=2,
debug_mode=False,
)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
default = newton_mjwarp


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import AnymalDRoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=60,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import CassieRoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=52,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.managers import SceneEntityCfg
from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import G1RoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=95,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import UnitreeGo2RoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=65,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
# SPDX-License-Identifier: BSD-3-Clause

from isaaclab_newton.physics import KaminoPADMMSolverCfg, MJWarpSolverCfg, NewtonCfg
from isaaclab_ov.physics import OvPhysxCfg
from isaaclab_physx.physics import PhysxCfg

from isaaclab.physics import PhysxAutoCfg
from isaaclab.sim import SimulationCfg
from isaaclab.utils.configclass import configclass

from isaaclab_tasks.utils import PresetCfg
from isaaclab_tasks.core.velocity.velocity_env_cfg import RoughPhysicsCfg

from .rough_env_cfg import H1RoughEnvCfg


@configclass
class PhysicsCfg(PresetCfg):
isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
ovphysx = OvPhysxCfg(gpu_max_rigid_patch_count=10 * 2**15)
physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx)
class PhysicsCfg(RoughPhysicsCfg):
newton_mjwarp = NewtonCfg(
solver_cfg=MJWarpSolverCfg(
njmax=65,
Expand Down
Loading
Loading