Fix DR Legs Kamino P-ADMM divergence - #7638
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
The patch raises the shared DR Legs Kamino P-ADMM rho_0 preset from 0.02 to 2.0, re-enables IsaacContrib-DrLegs-Walk in the contributed-environment smoke suite, and adds a seeded regression covering finite transitions and the authored 100 rad/s joint-velocity limit. The changes are focused and accompanied by an isaaclab_tasks changelog fragment.
- Design and architecture: The solver adjustment remains encapsulated in
_kamino_newton_cfg(), and the existing skip mechanism is preserved by removing only the obsoleteDrLegs-Walkexclusion. Because the factory supplies bothdefaultandnewton_kamino, the retune also affects the sibling HoldPose configuration; this is a non-blocking performance and convergence tradeoff to monitor. - API: No public symbols, signatures, exports, or registrations are changed. The observable default solver behavior changes through the preset value, and that user-visible adjustment is documented in the package changelog fragment.
- Implementation: The regression follows the file's CUDA and environment-count conventions, deterministically seeds the environment and action space, checks transition tensors and joint velocity across five steps, and closes the environment before clearing the simulation context. The smoke-suite path is restored by removing the prior substring skip.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Greptile SummaryThis PR raises the DR Legs Kamino P-ADMM initial penalty to stabilize random joint-target simulation, restores the Walk environment to contributed smoke coverage, and adds a deterministic seed-zero regression.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking gap in the regression's finite-transition assertion. The solver mitigation and smoke-test restoration are consistent with the reported failure, but the new regression can accept infinite observations or rewards because its shared validation helper only detects NaN values. Files Needing Attention: source/isaaclab_tasks/test/contrib/test_contrib_environments.py Important Files Changed
Reviews (1): Last reviewed commit: "Fix DR Legs Kamino solver divergence" | Re-trigger Greptile |
| for _ in range(5): | ||
| actions = torch.as_tensor(action_space.sample(), device=env.unwrapped.device, dtype=torch.float32) | ||
| transition = env.step(actions) | ||
| assert all(_check_valid_tensor(data) for data in transition[:-1]) |
There was a problem hiding this comment.
Infinity Passes Transition Check
The regression claims to verify finite transitions, but _check_valid_tensor only rejects NaN values and accepts positive or negative infinity. An infinite observation or reward could therefore pass this assertion when joint velocities remain bounded, leaving the stated finite-transition guarantee untested. Please use an explicit finiteness check such as torch.isfinite.
| return params | ||
|
|
||
|
|
||
| def test_dr_legs_walk_seed_zero_remains_finite(): |
There was a problem hiding this comment.
This test would be doubled with the smoke test, if we want this specialized test, we should keep the skip in the task list above so it gets skipped in the smoke, or we can keep just the smoke test and remove this specialized test.
There was a problem hiding this comment.
Removed the specialized seed-zero test and its now-unused imports. DR Legs remains enabled in the shared 20-step smoke test; the backend preset test remains because it covers the separate Newton-versus-PhysX configuration contract.
Description
Stabilize the DR Legs Kamino P-ADMM preset under bounded random joint targets by disabling the
driven-joint solver effort limit only for Newton/Kamino. The PhysX presets retain the authored
3.1 N m limit, and the Kamino penalty parameter is restored to its original
rho_0=0.02.Re-enable
IsaacContrib-DrLegs-Walkin the contributed-environment smoke suite and add coverageproving that the nested effort-limit preset resolves to
inffor Newton/default and3.1forboth PhysX aliases.
The finite effort limit adds solver-side constraint rows; the failure is in their interaction with
the closed-loop Kamino P-ADMM solve, rather than ordinary controller-side torque clipping. This is a
temporary Isaac Lab workaround for newton-physics/newton#4173. Its explicit
tradeoff is that Newton no longer enforces the robot's 3.1 N m driven-joint torque cap until the
upstream constraint instability is fixed. PhysX behavior is unchanged.
Fixes #7625
Type of change
Release backport
developScreenshots
Not applicable.
Testing
uv run isaaclab -fuv run python tools/changelog/cli.py check developNewton and PhysX variants pass after the fix
test_contrib_environments[IsaacContrib-DrLegs-Walk](CUDA): passed in 12/12 fresh 20-step runsChecklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there