Repository navigation
Conversation
|
Too many files changed for review. ( |
|
|
||
| @configclass | ||
| class SO101CubeLiftEnvCfg(LiftEnvCfg): | ||
| def __post_init__(self): |
There was a problem hiding this comment.
The default state of SO101 is singular and the gripper is away from the object so that I had to overwrite the initial states. Shall we consider move these local changes to SO101 _CFG?
| from isaaclab.envs import ManagerBasedEnv | ||
|
|
||
|
|
||
| def reset_robot_and_object_to_grasp_state( |
There was a problem hiding this comment.
The single-sided gripper of SO101 makes a successful grasp much harder than Franka. To help the robot learn to grasp instead of scooping the object, I need this event to facilitate a faster training. Otherwise, the policy will converge to a scooping behavior.
There was a problem hiding this comment.
It should be possible to train it without this type of reset, can you do some more investigations and see if theres an alternative instead of making the MDP so specific?
| return torch.where(object.data.root_pos_w.torch[:, 2] > minimal_height, 1.0, 0.0) | ||
| lifted = torch.where(object.data.root_pos_w.torch[:, 2] > minimal_height, 1.0, 0.0) | ||
| if grasp_params is not None: | ||
| lifted = lifted * object_grasped(env, **grasp_params) |
There was a problem hiding this comment.
Similar to the changes in events.py, this is aimed to avoid the scooping behavior for the single-sided gripper.
| # Register Gym environments. | ||
| ## | ||
|
|
||
| ## |
There was a problem hiding this comment.
We can remove this comment since we might only have joint position control envs
| # state demonstrate that holding the cube lifted pays, which backchains into | ||
| # approach-grasp-lift behavior in the unseeded episodes. These run after the | ||
| # robot/object reset events above | ||
| self.events.seed_grasp = EventTerm( |
There was a problem hiding this comment.
It should be possible to train this policy without needing to spawn close to or with cube in gripper, we should find a way to solve the task with the a simple reset
| from isaaclab.envs import ManagerBasedEnv | ||
|
|
||
|
|
||
| def reset_robot_and_object_to_grasp_state( |
There was a problem hiding this comment.
It should be possible to train it without this type of reset, can you do some more investigations and see if theres an alternative instead of making the MDP so specific?
| object_ee_distance = torch.linalg.norm(object.data.root_pos_w.torch - ee_w, dim=1) | ||
| return (stalled & (object_ee_distance < max_object_distance)).float() | ||
|
|
||
|
|
||
| def object_is_lifted( |
There was a problem hiding this comment.
Let's avoid modifying the original core MDP
| @@ -0,0 +1,176 @@ | |||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | |||
There was a problem hiding this comment.
We can remove this test file, it is not contributing much except some very specific value checking
474f7c4 to
f51d4fc
Compare
d153d26 to
63387cc
Compare
Signed-off-by: Yize Wang <[email protected]>
Signed-off-by: Yize Wang <[email protected]>
# Description Newton frame-transform observations could return zero poses after initialization or stale poses after reset forward kinematics, until the next physics step. Sample current body poses when the sensor buffers are requested and remove the redundant per-step refresh from the Newton manager. Retain the native sensor at initialization rather than looking it up on each update. Combine copying and world-pose composition in one kernel, and reuse the existing CUDA graph capture helper to cache sampling and copying. Recapture when state or mask buffers change; discard the cache on invalidation. The sensor never calls `forward()`; reset callers retain responsibility for FK through `sim.forward()`. Addresses the backend freshness issue identified in #6461. Extends the existing sensor test to cover initialization, reset poses before another physics step, and partial-reset masks. ## Type of change - Bug fix ## Validation - `uv run python -m pytest source/isaaclab_newton/test/sensors/test_frame_transformer.py -q`: **3 passed** on CUDA. - Initialization and reset regression assertions failed without the sensor refresh. - Standalone CPU sampling, outer CUDA capture/replay after target teleports, and single-environment hard-reset/reinitialization checks passed. - Formatting/lint, changelog validation against the PR base, and `git diff --check` passed. - Validation limitation: a two-environment full simulation hard reset hits a site-map size mismatch on both the previous PR revision and this revision. Episode resets and partial resets pass. ## Performance Existing frame-transform benchmark scene, Newton MJWarp, RTX PRO 6000 Blackwell / Threadripper PRO 7965WX, Linux, Python 3.12, Newton 1.6.1rc1, MuJoCo Warp 3.12.0, Warp 1.17.0. One sensor, 4,096 environments, four target frames each, 50 warmup steps and 500 measurements, synchronized on `cuda:0`. Measured forced sensor updates and the combined physics-step/forced-update path separately. | Revision | Mean sensor update | Mean step + sensor update | | --- | ---: | ---: | | Base `10f86515f` | 45.5 µs | 229.9 µs | | Previous fix `3e57959a2` | 65.8 µs | 230.5 µs | | Optimized fix `154043500` | 26.7 µs | 232.0 µs | The optimized fix reduces sensor-update latency by about 59% versus the previous fix. The physics-heavy combined path remains around 0.23 ms; these measurements show no clear overall speedup. The base performed native sampling during the physics step, so its sensor-update boundary includes less work. ## Release backport - [ ] Backport to the active release branch ## Checklist - [x] Read the contribution guidelines - [x] Ran formatting and lint checks - [x] Validated the changed behavior and applied the test-audit criteria - [x] Added a package changelog fragment - [x] Contributor already listed in `CONTRIBUTORS.md`
AntoineRichard
left a comment
There was a problem hiding this comment.
AI-assisted review (Claude). Findings were checked against the code at 683ad27. @StafaH, tagging you since you pushed the latest commits.
Description is out of date
The description and evaluation were written before the last tuning commits, so the reported numbers (99.06% all-commands success, and so on) don't describe the config being submitted:
- Action-rate weight.
so101_env_cfg.pysetsaction_rateto -2.0. The description and training provenance say -0.05; 7ee994b raised it 40x. - Workspace. Goal Y is now
(-0.295, -0.245), 27 cm out (b3af0ff). The description still says[-0.185, -0.135]and that "the lowest goal's success region is above the resting cube". - Training budget.
max_iterations = 800inrsl_rl_ppo_cfg.py. The description says a 2,400 budget and suggests--max_iterations 2400. - Frame-sensor fix. The description still lists the Newton frame-transform fix as a bug fix in this PR, along with an extended sensor regression test. a4b104b dropped it as superseded by develop, so neither is in the diff.
- Contacts and reset. 07b1276 (contact margins) and 683ad27 (canonical reset pose) also came after the evaluation.
Please re-run the evaluation on the final config, or note which config the numbers are for, and update the description.
Changelog fragments
so101-action-smoothing, so101-canonical-reset, so101-cube-contact and so101-outward-workspace are .changed / .fixed fragments about Isaac-Lift-SO101, which this PR adds. The contribution guide reserves changed for "changes in existing functionality". As written, the release notes would say things like "Reduced the PPO budget from 2,400 to 800" and "existing policies required retraining" about a task that has never shipped. Suggest folding them into the single .added fragment.
Core depends on contrib
so101_env_cfg.py imports object_position_in_robot_root_frame from isaaclab_tasks.contrib.lift and ee_frame_quat from isaaclab_tasks.contrib.stack. These are the only contrib imports anywhere under isaaclab_tasks/core/. Since the PR already adds ee_to_object_b to core lift mdp, these two small helpers could live there too.
Worth a look (not certain)
- Contact thresholds. The SO101 reward bindings use three different contact thresholds: success 0.01 N, position progress 0.1 N (default) and reaching 1.0 N (default). These are the shared Franka and Kuka defaults, so it may be intended. With one moving-jaw sensor on a 50 g cube, though, a grasp between 0.01 N and 0.1 N counts as success but earns no progress reward. Consider setting
contact_thresholdexplicitly. ee_to_object_btests. The new shared observation has no unit test of its frame convention. Task construction and stepping are already covered by the registry-driven environment tests.
Checked and fine
- The
_get_surface_shaderloop keeps the old lookups (GetSurfaceOutput()is the same output assurface, andGetSurfaceOutput("mdl")the same asmdl:surface). It now correctly falls through when the universal output is unconnected. - The
droppedtermination uses world z, but every env origin is at z=0, so it matches the env-relative definition.
Description
Adds
Isaac-Lift-SO101as a robot configuration of the shared Core lift task on currentmain. The scene uses the existing SysID SO-101 asset and a 3 cm, 50 g cube. The task inherits the state/point-cloud observation histories, relative joint actions, contact-gated progress and success rewards, conditional reset bank, gravity/noise ADR, and play behavior used by the other Core lift robots.SO-101-specific bindings cover the mounting transform, reachable command/reset ranges, finger bodies, small-object inertia randomization, and tabletop height bounds. Success requires object contact with both the static finger and moving jaw. The existing sticky success flag records reaching at least one command during an episode; per-command success requires separate evaluation.
Before clearance rejection and bank sampling, 25% of object reset proposals are near the gripper; the other proposals use a 5 cm square with up to 10 cm of vertical offset. Evaluation uses that mixed bank, rather than measuring tabletop-only picking. The configuration docstring includes the tabletop-only proposal overrides.
The six relative actions and the shared
policy/proprio/perceptionhistories replace the earlier compact policy contract. Earlier checkpoints and reported success rates do not validate this version. No camera or reorientation task is added. The unrelated Newton material-color change is excluded, and release notes describe the final task rather than its development iterations.Validation
git diff --checkpassed.The CPU probes override the registered MJWarp solver and collision path; they establish setup and runner execution, not MJWarp GPU physics or learning quality. This host has no working CUDA device and the configured GPU workstation is unreachable. GPU rollouts, PhysX/OvPhysX runtime validation, fresh training/convergence, and deterministic grasp/lift evaluation remain to be completed. No performance or success-rate claim is made for the reworked task.