Skip to content

Enable Spot Newton MJWarp preset#5940

Open
AntoineRichard wants to merge 1 commit into
isaac-sim:developfrom
AntoineRichard:antoine/enable-spot-newton-mjwarp
Open

Enable Spot Newton MJWarp preset#5940
AntoineRichard wants to merge 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

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