Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions docs/source/_static/css/environment-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
["Isaac-Fourbar-Pole-Swingup", "rsl_rl", "newton_kamino", "", ""],
["Isaac-Humanoid-Direct", "rl_games,rsl_rl,skrl", "isaacsim_physx,newton_mjwarp,ovphysx", "", ""],
["Isaac-Humanoid", "rl_games,rsl_rl,skrl,sb3", "isaacsim_physx,newton_mjwarp,ovphysx", "", ""],
["Isaac-Lift-Cloth-Franka", "rsl_rl", "newton_mjwarp_vbd_proxy", "", "ik,joint"],
["Isaac-Lift-Cloth-Franka-Camera", "rsl_rl", "newton_mjwarp_vbd_proxy", "isaacsim_rtx,newton_renderer,ovrtx", "ik,joint"],
["Isaac-Lift-Cloth-Franka", "rsl_rl", "isaacsim_physx,newton_mjwarp_vbd_proxy", "", "ik,joint"],
["Isaac-Lift-Cloth-Franka-Camera", "rsl_rl", "isaacsim_physx,newton_mjwarp_vbd_proxy", "isaacsim_rtx,newton_renderer,ovrtx", "ik,joint"],
["Isaac-Lift-Franka", "rsl_rl", "isaacsim_physx,newton_mjwarp", "", "cube,shapes"],
["Isaac-Lift-KukaAllegro", "rsl_rl", "isaacsim_physx,newton_mjwarp,ovphysx", "", "cube,shapes"],
["Isaac-Lift-KukaAllegro-Camera", "rsl_rl", "isaacsim_physx,newton_mjwarp,ovphysx", "isaacsim_rtx,newton_renderer,ovrtx", "albedo128,albedo256,albedo64,cube,depth128,depth256,depth64,duo_camera,raycaster_depth128,raycaster_depth256,raycaster_depth64,rgb128,rgb256,rgb64,semantic_segmentation128,semantic_segmentation256,semantic_segmentation64,shapes,simple_shading_constant_diffuse128,simple_shading_constant_diffuse256,simple_shading_constant_diffuse64,simple_shading_diffuse_mdl128,simple_shading_diffuse_mdl256,simple_shading_diffuse_mdl64,simple_shading_full_mdl128,simple_shading_full_mdl256,simple_shading_full_mdl64,single_camera"],
Expand Down
8 changes: 4 additions & 4 deletions docs/source/overview/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ for the lift-cube environment:
| | | | ``newton_renderer``, ``ovrtx`` |
| | | | **presets=** ``ik``, ``joint`` |
+-------------------------+------------------------------+-----------------------------------------------------------------------------+-----------------------------------------+
| |lift-cloth-franka| | |lift-cloth-franka-link| | Lift a deformable cloth from a table with the Franka robot | **physics=** |
| |lift-cloth-franka| | |lift-cloth-franka-link| | Lift a deformable cloth from a table with the Franka robot | **physics=** ``isaacsim_physx``, |
| | | | ``newton_mjwarp_vbd_proxy`` |
| | | | **presets=** ``ik``, ``joint`` |
+-------------------------+------------------------------+-----------------------------------------------------------------------------+-----------------------------------------+
| |lift-cloth-franka| | |lift-cloth-franka-cam-link| | Camera (vision) variant of the cloth lift task using RGB observations | **physics=** |
| |lift-cloth-franka| | |lift-cloth-franka-cam-link| | Camera (vision) variant of the cloth lift task using RGB observations | **physics=** ``isaacsim_physx``, |
| | | | ``newton_mjwarp_vbd_proxy`` |
| | | | **renderer=** ``isaacsim_rtx``, |
| | | | ``newton_renderer``, ``ovrtx`` |
Expand Down Expand Up @@ -1115,12 +1115,12 @@ including disabling runtime perturbations used for training.
* - Isaac-Lift-Cloth-Franka
- Manager Based
- **rsl_rl** (PPO)
- | **physics=** ``newton_mjwarp_vbd_proxy``
- | **physics=** ``isaacsim_physx``, ``newton_mjwarp_vbd_proxy``
| **presets=** ``ik``, ``joint``
* - Isaac-Lift-Cloth-Franka-Camera
- Manager Based
- **rsl_rl** (PPO)
- | **physics=** ``newton_mjwarp_vbd_proxy``
- | **physics=** ``isaacsim_physx``, ``newton_mjwarp_vbd_proxy``
| **renderer=** ``isaacsim_rtx``, ``newton_renderer``, ``ovrtx``
| **presets=** ``ik``, ``joint``
* - Isaac-Lift-Franka
Expand Down
22 changes: 16 additions & 6 deletions scripts/environments/state_machine/lift_franka_soft.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from isaaclab.visualizers import VisualizerCfg

import isaaclab_tasks # noqa: F401
from isaaclab_tasks.core.lift.config.franka_soft.franka_soft_env_cfg import ActionsCfg
from isaaclab_tasks.utils import resolve_task_config, setup_preset_cli

# add argparse arguments
Expand Down Expand Up @@ -167,7 +166,7 @@ class PickSmWaitTime:
REST = wp.constant(0.2)
APPROACH_ABOVE_OBJECT = wp.constant(1.0)
APPROACH_OBJECT = wp.constant(1.5)
GRASP_OBJECT = wp.constant(1.0)
GRASP_OBJECT = wp.constant(1.5)
LIFT_OBJECT = wp.constant(1.5)
OPEN_GRIPPER = wp.constant(0.0)

Expand Down Expand Up @@ -265,9 +264,17 @@ def main():
env_cfg, _ = resolve_task_config(args_cli.task, "")
env_cfg.sim.device = args_cli.device
env_cfg.scene.num_envs = args_cli.num_envs
# the state machine emits absolute end-effector poses, so pick the IK action preset; the env
# defaults to relative joint targets, which RL trains on.
env_cfg.actions = ActionsCfg().ik
# Scripted demo: keep only the time-out, extended to 10 s so the slow low-PD Franka can finish a
# pick-and-lift, and drop the failure terminations so a transient bound or velocity spike does
# not cut a run short.
env_cfg.episode_length_s = 10.0
for term_name in list(vars(env_cfg.terminations)):
if term_name != "time_out":
setattr(env_cfg.terminations, term_name, None)
# the state machine emits absolute end-effector poses, so pick the task's own IK action preset
# (e.g. the cloth closes the gripper fully); the env otherwise defaults to relative joint
# targets, which RL trains on.
env_cfg.actions = type(env_cfg)().actions.ik
env_cfg.viewer.eye = (1.3, 0.6, 0.5)
env_cfg.viewer.lookat = (0.5, 0.0, 0.05)
env_cfg.sim.default_visualizer_cfg = VisualizerCfg(eye=env_cfg.viewer.eye, lookat=env_cfg.viewer.lookat)
Expand All @@ -291,7 +298,10 @@ def main():
object_grasp_orientation = torch.zeros((env.unwrapped.num_envs, 4), device=env.unwrapped.device)
object_grasp_orientation[:, 0] = 1.0
# Grasp 1 cm below the deformable's centre of mass, so the fingers close around its lower half.
object_local_grasp_position = torch.tensor([0.0, 0.0, -0.01], device=env.unwrapped.device)
# The cloth drapes over a support cube, so its COM sits well below the graspable fold; reach
# 8 cm higher to close on the raised cloth instead of the table.
grasp_z = -0.01 + (0.08 if "Cloth" in args_cli.task else 0.0)
object_local_grasp_position = torch.tensor([0.0, 0.0, grasp_z], device=env.unwrapped.device)

# create state machine
pick_sm = PickAndLiftSm(env_cfg.sim.dt * env_cfg.decimation, env.unwrapped.num_envs, env.unwrapped.device)
Expand Down
1 change: 1 addition & 0 deletions source/isaaclab_newton/changelog.d/lift-cloth.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Internal: restored the already released removal of ``NewtonCfg.simplify_meshes`` after a merge reintroduced the field.
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ class NewtonCfg(PhysicsCfg):
:class:`NewtonShapeCfg` for the declared fields.
"""

simplify_meshes: bool = True
"""Whether Newton replication simplifies mesh colliders to convex hulls.

Keep this enabled for most rigid-body scenes. Disable it when exact triangle
meshes are intentional, for example thin or hollow MPM colliders.
"""

load_visual_shapes: bool | None = None
"""Whether Newton replication imports visual-only geometry from USD.

Expand Down
10 changes: 10 additions & 0 deletions source/isaaclab_tasks/changelog.d/mym-lift-soft.minor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Added
^^^^^

* Added ``isaacsim_physx`` support to the Franka cloth lift tasks.

Fixed
^^^^^

* Fixed success table visualization markers appearing at the world origin
before the first environment step.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@
from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg
from isaaclab_newton.sim.schemas import NewtonDeformableBodyPropertiesCfg
from isaaclab_newton.sim.spawners.materials import NewtonSurfaceDeformableBodyMaterialCfg
from isaaclab_physx.physics import PhysxCfg
from isaaclab_physx.sim.schemas import PhysxCollisionCfg, PhysxDeformableBodyPropertiesCfg
from isaaclab_physx.sim.spawners.materials import PhysxSurfaceDeformableBodyMaterialCfg

import isaaclab.sim as sim_utils
from isaaclab.assets import AssetBaseCfg, RigidObjectCfg
from isaaclab.assets import RigidObjectCfg
from isaaclab.assets.deformable_object import DeformableObjectCfg
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
from isaaclab.utils.configclass import configclass

Expand All @@ -28,7 +32,6 @@
from ... import mdp
from .franka_soft_env_cfg import (
FRANKA_CAMERA_CFG,
TABLE_SPAWN_CFG,
FrankaCameraObservationsCfg,
FrankaSoftEnvCfg,
_FrankaSoftSceneCfg,
Expand Down Expand Up @@ -87,6 +90,10 @@ class PhysicsCfg(PresetCfg):
num_substeps=2,
)

isaacsim_physx: PhysxCfg = PhysxCfg(gpu_found_lost_pairs_capacity=2**22)

physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx)

default = newton_mjwarp_vbd_proxy


Expand All @@ -95,14 +102,14 @@ class PhysicsCfg(PresetCfg):
rigid_props=sim_utils.RigidBodyPropertiesCfg(kinematic_enabled=True, disable_gravity=True),
mass_props=sim_utils.MassPropertiesCfg(mass=1.0),
collision_props=sim_utils.CollisionPropertiesCfg(),
physics_material=sim_utils.RigidBodyMaterialCfg(static_friction=0.1, dynamic_friction=0.1),
physics_material=sim_utils.RigidBodyMaterialCfg(static_friction=0.01, dynamic_friction=0.01),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.2, 0.2, 0.25)),
)


@configclass
class DeformableCfg(PresetCfg):
"""Preset config for the deformable object, matching the Newton example."""
"""Preset configurations for the cloth."""

newton_mjwarp_vbd_proxy: DeformableObjectCfg = DeformableObjectCfg(
prim_path="{ENV_REGEX_NS}/Deformable",
Expand All @@ -113,7 +120,7 @@ class DeformableCfg(PresetCfg):
deformable_props=NewtonDeformableBodyPropertiesCfg(),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.95, 0.85, 0.1)),
physics_material=NewtonSurfaceDeformableBodyMaterialCfg(
density=10.0,
density=1.0,
particle_radius=0.002,
tri_ke=5e2,
tri_ka=5e2,
Expand All @@ -124,6 +131,30 @@ class DeformableCfg(PresetCfg):
),
)

physx: DeformableObjectCfg = DeformableObjectCfg(
prim_path="{ENV_REGEX_NS}/Deformable",
init_state=DeformableObjectCfg.InitialStateCfg(pos=(0.4, 0.0, 0.102), rot=(0.70710678, 0.0, 0.0, 0.70710678)),
spawn=sim_utils.MeshRectangleCfg(
size=(0.2, 0.2),
resolution=(8, 8),
deformable_props=PhysxDeformableBodyPropertiesCfg(),
collision_props=[PhysxCollisionCfg(rest_offset=0.002, contact_offset=0.01)],
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.95, 0.85, 0.1)),
physics_material=PhysxSurfaceDeformableBodyMaterialCfg(
density=1000.0,
surface_thickness=0.001,
poissons_ratio=0.25,
youngs_modulus=1e6,
surface_bend_stiffness=1e6,
elasticity_damping=1e-1,
bend_damping=1e-1,
static_friction=10.0,
dynamic_friction=10.0,
),
),
)
isaacsim_physx = physx

default = newton_mjwarp_vbd_proxy


Expand All @@ -133,17 +164,6 @@ class FrankaClothSceneCfg(_FrankaSoftSceneCfg):

deformable: DeformableCfg = DeformableCfg()

# Low-friction table so the cloth slides freely instead of sticking. Effective cloth-table
# friction is sqrt(soft_contact_mu * shape_mu); this sets shape_mu without touching the global
# soft_contact_mu that governs the gripper's hold on the cloth.
table: AssetBaseCfg = AssetBaseCfg(
prim_path="{ENV_REGEX_NS}/Table",
init_state=AssetBaseCfg.InitialStateCfg(pos=[0.5, 0.0, -0.525]),
spawn=TABLE_SPAWN_CFG.replace(
physics_material=sim_utils.RigidBodyMaterialCfg(static_friction=0.1, dynamic_friction=0.1),
),
)

support_neg_y: RigidObjectCfg = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/SupportNegY",
init_state=RigidObjectCfg.InitialStateCfg(pos=(0.4, -0.02, 0.075)),
Expand All @@ -164,6 +184,10 @@ class FrankaClothScenePresetCfg(PresetCfg):
num_envs=2048, env_spacing=2.0, replicate_physics=True
)

# PhysX does not support replicating physics for deformable objects
physx: FrankaClothSceneCfg = FrankaClothSceneCfg(num_envs=2048, env_spacing=2.0, replicate_physics=False)
isaacsim_physx = physx

default = newton_mjwarp_vbd_proxy


Expand All @@ -174,6 +198,18 @@ class FrankaClothCameraSceneCfg(FrankaClothSceneCfg):
base_camera: CameraCfg = FRANKA_CAMERA_CFG


@configclass
class FrankaClothCameraScenePresetCfg(PresetCfg):
"""Scene presets for visual Franka cloth lifting."""

newton_mjwarp_vbd_proxy: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg(
num_envs=128, env_spacing=2.5, replicate_physics=True
)
physx: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg(num_envs=128, env_spacing=2.5, replicate_physics=False)
isaacsim_physx = physx
default = newton_mjwarp_vbd_proxy


@configclass
class FrankaClothEventCfg(FrankaSoftEventCfg):
"""Reset and startup events for the Franka cloth environment."""
Expand All @@ -183,7 +219,7 @@ class FrankaClothEventCfg(FrankaSoftEventCfg):
mode="reset",
params={
"position_range": {"x": (-0.1, 0.1), "y": (-0.25, 0.25), "z": (0.0, 0.0)},
"clear_gap_range": (0.008, 0.03),
"clear_gap_range": (0.01, 0.03),
"asset_cfg": SceneEntityCfg("deformable"),
"support_cfg": (SceneEntityCfg("support_neg_y"), SceneEntityCfg("support_pos_y")),
},
Expand Down Expand Up @@ -224,13 +260,15 @@ def __post_init__(self) -> None:
super().__post_init__()
# override the soft-beam physics with the cloth presets
self.sim.physics = PhysicsCfg()
# Fully close the gripper on the thin cloth; the shared beam default only closes to 0.01 m.
self.actions.ik.gripper_action.close_command_expr = {"panda_finger_joint1": 0.0}


@configclass
class FrankaClothCameraEnvCfg(FrankaClothEnvCfg):
"""Visual Franka surface-deformable lifting environment."""

scene: FrankaClothCameraSceneCfg = FrankaClothCameraSceneCfg(num_envs=128, env_spacing=2.5, replicate_physics=True)
scene: FrankaClothCameraScenePresetCfg = FrankaClothCameraScenePresetCfg()
observations: FrankaCameraObservationsCfg = FrankaCameraObservationsCfg()

def __post_init__(self) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ class PhysicsCfg(PresetCfg):
num_substeps=2,
)

isaacsim_physx: PhysxCfg = PhysxCfg(
friction_offset_threshold=0.005,
friction_correlation_distance=0.01,
)
isaacsim_physx: PhysxCfg = PhysxCfg()

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 · Implementation — Soft-beam PhysX friction tuning silently dropped

FrankaClothEnvCfg.__post_init__ replaces sim.physics with the cloth module's own PhysicsCfg, so this preset is consumed only by the already-released Isaac-Lift-Soft-Franka(-Camera) tasks. Clearing friction_offset_threshold=0.005 and friction_correlation_distance=0.01 reverts that task's PhysX contact tuning to defaults, is not needed for cloth PhysX support, and is not covered by the Added-only changelog fragment. Restore the values or record the change under Changed.


physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx)

Expand Down Expand Up @@ -369,7 +366,7 @@ class _IkActionsCfg:
asset_name="robot",
joint_names=["panda_finger_joint1"],
open_command_expr={"panda_finger_joint1": 0.04},
close_command_expr={"panda_finger_joint1": 0.015},
close_command_expr={"panda_finger_joint1": 0.01},

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 · Implementation — Shared IK gripper close width changed

_IkActionsCfg is shared with the soft-beam task, and the cloth env already overrides close_command_expr to 0.0 in its __post_init__. Narrowing the shared default from 0.015 to 0.01 therefore only alters the existing beam task's scripted grasp. Keep the shared value at 0.015 and confine cloth-specific tuning to the cloth config, or document the beam behavior change.

)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def __init__(self, cfg: ObjectUniformPoseCommandCfg, env: ManagerBasedEnv):

self.success_visualizer = VisualizationMarkers(self.cfg.success_visualizer_cfg)
self.success_visualizer.set_visibility(True)
if self.success_vis_asset is not None:
self.success_visualizer.visualize(self._get_success_vis_pos_w())

# adds (optional) cmd kind and element names for leapp export
# during export, semantic data about this command will be used to annotate the command input
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading