Skip to content

Enable Spot Newton MJWarp preset#5940

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoine/enable-spot-newton-mjwarp
Jun 3, 2026
Merged

Enable Spot Newton MJWarp preset#5940
kellyguo11 merged 1 commit into
isaac-sim:developfrom
AntoineRichard:antoine/enable-spot-newton-mjwarp

Conversation

@AntoineRichard
Copy link
Copy Markdown
Collaborator

Summary

  • Enabled the Spot Newton MJWarp preset to use the Newton collision pipeline instead of MuJoCo contacts.
  • Increased Spot MJWarp constraint/contact capacity and set the Newton shape margin used by other rough-terrain locomotion presets.

Test Plan

  • ./isaaclab.sh -p -c "from isaaclab_tasks.core.velocity.config.spot.flat_env_cfg import PhysicsCfg; cfg = PhysicsCfg().newton_mjwarp; print(cfg.solver_cfg.njmax, cfg.solver_cfg.nconmax, cfg.solver_cfg.use_mujoco_contacts, cfg.collision_cfg.max_triangle_pairs, cfg.default_shape_cfg.margin)"
  • SKIP=check-git-lfs-pointers ./isaaclab.sh -f
  • ./isaaclab.sh -f (blocked locally because git-lfs is not installed)

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jun 3, 2026
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

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

Review: Enable Spot Newton MJWarp preset

Verdict: ✅ Approve — clean, well-scoped configuration change

Summary

This PR enables the Newton collision pipeline for the Spot MJWarp preset by switching from MuJoCo-based contacts (use_mujoco_contacts=True) to Newton's own collision system, and tunes the associated solver/collision capacity parameters. The change is minimal (1 file, ~6 net additions) and well-targeted.

Analysis

Configuration Changes:

Parameter Before After Assessment
njmax 45 130 ~3× increase in constraint capacity — appropriate for Newton collision pipeline which generates more constraint rows than MuJoCo contacts for articulated robots
nconmax 30 40 Modest contact capacity increase
use_mujoco_contacts (default: True) False Core change — enables Newton's own collision detection
collision_cfg (not set) NewtonCollisionPipelineCfg(max_triangle_pairs=2_500_000) Configures triangle mesh collision budget for Newton pipeline
default_shape_cfg (not set) NewtonShapeCfg(margin=0.01) Sets collision margin for shape expansion

Correctness:

  • All new imports (NewtonCollisionPipelineCfg, NewtonShapeCfg) are used immediately — no dead code.
  • Cross-referencing with Go2's config (njmax=65, nconmax=35, no Newton collision pipeline): Spot is a heavier, more complex quadruped with more contact surfaces, so the ~2× multiplier on njmax relative to Go2 is reasonable.
  • margin=0.01 (1cm) is a standard value for locomotion tasks — small enough to avoid ghost contacts while providing adequate broadphase expansion.
  • Setting use_mujoco_contacts=False while adding collision_cfg forms a coherent switch: the collision source changes from MuJoCo to Newton's native pipeline.

Performance Considerations:

  • max_triangle_pairs=2_500_000 reserves GPU memory for collision pair buffers. For flat-terrain scenarios this is generous but safe — it won't degrade performance, just pre-allocates memory (~tens of MB).
  • The increased njmax (130) means larger constraint Jacobian matrices per environment. This is well within typical GPU capacity for batched simulation.
  • nconmax=40 is conservative — Newton clamps rather than crashes if exceeded, so no stability risk.

Missing Rough-Terrain Config:

  • The Spot config directory has only flat_env_cfg.py (unlike Go2 which has both flat + rough). This is not a concern for this PR, but worth noting that a rough-terrain variant with Newton would likely need higher max_triangle_pairs.

CI Status

Check Status
pre-commit ✅ Pass
Build Wheel ✅ Pass
Check for Broken Links ✅ Pass
Check changelog fragments ❌ Fail
Installation Tests ⏳ In progress

The changelog check failure is a repo policy requirement (not a code defect). A changelog fragment may be needed before merge.

Recommendation

Approve — this is a straightforward, well-reasoned configuration change that correctly enables Newton's collision pipeline for Spot. The parameter values are consistent with the codebase patterns and appropriately scaled for the robot's complexity.

@kellyguo11
Copy link
Copy Markdown
Contributor

would be good to cherry pick this to the release branch as well

@kellyguo11 kellyguo11 merged commit d7e852e into isaac-sim:develop Jun 3, 2026
36 of 37 checks passed
@ooctipus ooctipus deleted the antoine/enable-spot-newton-mjwarp branch June 3, 2026 23:55
AntoineRichard added a commit that referenced this pull request Jun 5, 2026
## Summary
Cherry-picked these merged PRs from `develop` to `release/3.0.0-beta2`:

- #5895 Fix transformation matrix docstrings on develop
- #5920 Fix cloner lazy exports
- #5940 Enable Spot Newton MJWarp preset
- #5959 Pin ovphysx runtime
- #5924 Remove obsolete warp-to-torch migration helper
- #5923 Fix pre-trained policy action grad leak

## Release-Branch Notes
- For #5959, kept the release branch `setup.py` packaging path and
applied the `ovphysx==0.4.13` pin there.
- Added the missing `isaaclab_tasks` changelog fragment for the #5940
Spot preset change.

## Verification
- `./isaaclab.sh -f`
- `./isaaclab.sh -p tools/changelog/cli.py check release/3.0.0-beta2`
- `./isaaclab.sh -p -m pytest
source/isaaclab/test/test_scripts_torcharray_patterns.py`
- `./isaaclab.sh -p -c "from pathlib import Path; import ast;
ast.parse(Path('source/isaaclab/isaaclab/cloner/__init__.pyi').read_text());
print('cloner stub syntax ok')"`

---------

Signed-off-by: Junette Hsin  <junetter@gmail.com>
Co-authored-by: Junette Hsin <junetter@gmail.com>
kellyguo11 pushed a commit that referenced this pull request Jun 5, 2026
cherrypick spot fix

Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants