Repository navigation
[Newton] Updates Newton dependencies with new ncon_per_env change - #3850
Conversation
Compatibility with Beta 0.1.3
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR updates Isaac Lab to accommodate a breaking API change in the Newton physics dependency, where the parameter ncon_per_env has been renamed to ncon_per_world. The changes systematically update this parameter name across 21 environment configuration files spanning locomotion, manipulation, and classic control tasks, plus the core solver configuration definition in solvers_cfg.py. The Newton dependency is also updated to commit a3763a73ba4aeb0414b1b6663a767ee661b39250 which contains the upstream parameter rename. This is purely a refactoring change to maintain API compatibility - no values or logic are modified, ensuring existing physics simulation behavior remains unchanged.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| source/isaaclab/isaaclab/sim/_impl/solvers_cfg.py | 5/5 | Updates MJWarpSolverCfg class definition to rename parameter from ncon_per_env to ncon_per_world |
| source/isaaclab/setup.py | 5/5 | Updates Newton dependency to commit a3763a73ba4aeb0414b1b6663a767ee661b39250 containing the parameter rename |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/anymal_b/flat_env_cfg.py | 5/5 | Updates parameter name in AnymalB flat environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/anymal_c/flat_env_cfg.py | 5/5 | Updates parameter name in AnymalC flat environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/anymal_d/flat_env_cfg.py | 5/5 | Updates parameter name in AnymalD flat environment configuration (value: 25) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/a1/flat_env_cfg.py | 5/5 | Updates parameter name in A1 flat environment configuration (value: 30) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/go1/flat_env_cfg.py | 5/5 | Updates parameter name in Go1 flat environment configuration (value: 25) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/go2/flat_env_cfg.py | 5/5 | Updates parameter name in Go2 flat environment configuration (value: 35) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/spot/flat_env_cfg.py | 5/5 | Updates parameter name in Spot flat environment configuration (value: 30) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/cassie/flat_env_cfg.py | 5/5 | Updates parameter name in Cassie flat environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/h1/flat_env_cfg.py | 5/5 | Updates parameter name in H1 flat environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/g1/flat_env_cfg.py | 5/5 | Updates parameter name in G1 flat environment configuration (value: 10) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/g1_29_dofs/flat_env_cfg.py | 5/5 | Updates parameter name in G1 29-DOF flat environment configuration (value: 35) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/classic/ant/ant_env_cfg.py | 5/5 | Updates parameter name in manager-based Ant environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/classic/humanoid/humanoid_env_cfg.py | 5/5 | Updates parameter name in manager-based Humanoid environment configuration (value: 25) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/classic/cartpole/cartpole_env_cfg.py | 5/5 | Adds explicit Newton solver configuration with updated parameter name (value: 5) |
| source/isaaclab_tasks/isaaclab_tasks/direct/ant/ant_env.py | 5/5 | Updates parameter name in direct Ant environment configuration (value: 15) |
| source/isaaclab_tasks/isaaclab_tasks/direct/humanoid/humanoid_env.py | 5/5 | Updates parameter name in direct Humanoid environment configuration (value: 25) |
| source/isaaclab_tasks/isaaclab_tasks/direct/allegro_hand/allegro_hand_env_cfg.py | 5/5 | Updates parameter name in Allegro Hand environment configuration (value: 70) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/reach/config/franka/joint_pos_env_cfg.py | 5/5 | Updates parameter name in Franka reach environment configuration (value: 20) |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/reach/config/ur_10/joint_pos_env_cfg.py | 5/5 | Updates parameter name in UR10 reach environment configuration (value: 20) |
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it consists of straightforward parameter renaming with no logic changes
- Score reflects that this is a systematic, well-scoped refactoring across configuration files to accommodate an upstream dependency change, with no behavioral modifications
- No files require special attention beyond standard review; all changes follow the same pattern of renaming
ncon_per_envtoncon_per_world
Sequence Diagram
sequenceDiagram
participant User
participant EnvConfig
participant SimulationCfg
participant NewtonCfg
participant MJWarpSolverCfg
participant NewtonSolver
User->>EnvConfig: "Create environment configuration"
EnvConfig->>SimulationCfg: "Initialize SimulationCfg with newton_cfg"
SimulationCfg->>NewtonCfg: "Initialize NewtonCfg with solver_cfg"
NewtonCfg->>MJWarpSolverCfg: "Initialize MJWarpSolverCfg(ncon_per_world=X)"
Note over MJWarpSolverCfg: Parameter renamed from<br/>ncon_per_env to ncon_per_world
MJWarpSolverCfg-->>NewtonCfg: "Return solver configuration"
NewtonCfg-->>SimulationCfg: "Return Newton configuration"
SimulationCfg-->>EnvConfig: "Return simulation configuration"
EnvConfig->>NewtonSolver: "Apply configuration to Newton solver"
NewtonSolver-->>User: "Environment ready with updated solver settings"
21 files reviewed, no comments
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR updates the Newton physics engine integration to reflect an upstream API change where the parameter ncon_per_env has been renamed to ncon_per_world. The change affects the cartpole environment's simulation configuration, maintaining the same functional behavior (value of 5) while adopting the new naming convention. This is a compatibility update ensuring Isaac Lab works with the latest Newton dependency. Additionally, the PR includes minor import statement reordering, likely from automated pre-commit formatting hooks.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| source/isaaclab_tasks/isaaclab_tasks/manager_based/classic/cartpole/cartpole_env_cfg.py | 5/5 | Updates Newton solver configuration parameter from ncon_per_env to ncon_per_world and reorders imports |
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it's a straightforward parameter rename to maintain compatibility with upstream Newton updates
- Score reflects the simplicity of the change (single parameter rename), clear alignment with upstream API changes, and no functional behavior modifications
- No files require special attention; this is a clean compatibility update with proper documentation in the PR description
1 file reviewed, no comments
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
Updated Newton dependencies and renamed ncon_per_env to nconmax across all environment configurations to maintain consistency with upstream Newton library changes.
Key Changes:
- Updated dependency versions in
setup.py: mujoco (3.3.8), mujoco-warp, and newton packages - Renamed parameter in
MJWarpSolverCfgclass definition fromncon_per_envtonconmax - Systematically updated all 19 environment configuration files across direct tasks, manager-based locomotion, manipulation, and classic environments
- Added explicit
nconmaxconfiguration to cartpole environment
Verification:
- No remaining references to old
ncon_per_envparameter found in codebase - All 20 instances of
nconmaxare correctly configured with appropriate values for each robot/environment - Parameter semantics unchanged: still represents number of contact points per environment (world)
Confidence Score: 5/5
- This PR is safe to merge with minimal risk - it's a straightforward parameter rename that maintains backward compatibility
- Score reflects complete and consistent renaming across all files with no logic changes. The parameter rename was systematically applied to all 21 files, dependency versions were updated appropriately, and verification confirms no orphaned references to the old parameter name remain in the codebase
- No files require special attention - all changes are mechanical renames maintaining identical semantics
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| source/isaaclab/isaaclab/sim/_impl/solvers_cfg.py | 5/5 | Renamed ncon_per_env to nconmax in MJWarpSolverCfg class definition |
| source/isaaclab/setup.py | 5/5 | Updated Newton dependency versions: mujoco, mujoco-warp, and newton packages |
| source/isaaclab_tasks/isaaclab_tasks/manager_based/classic/cartpole/cartpole_env_cfg.py | 5/5 | Added simulation configuration with nconmax=5 parameter in new MJWarpSolverCfg |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant Newton as Newton Library
participant IsaacLab as Isaac Lab Codebase
participant Configs as Environment Configs
participant Solver as MJWarpSolverCfg
Dev->>Newton: Update Newton library (v0.1.3+)
Note over Newton: Rename ncon_per_env → nconmax
Dev->>IsaacLab: Update dependency versions
IsaacLab->>IsaacLab: Update mujoco to 3.3.8.dev821851540
IsaacLab->>IsaacLab: Update mujoco-warp commit hash
IsaacLab->>IsaacLab: Update newton commit hash
Dev->>Solver: Update parameter definition
Solver->>Solver: Rename ncon_per_env to nconmax
Note over Solver: Parameter renamed in class definition
Dev->>Configs: Update all environment configs
loop For each environment
Configs->>Configs: Replace ncon_per_env with nconmax
Note over Configs: Direct tasks: ant, humanoid, allegro_hand
Note over Configs: Manager-based: locomotion, manipulation, classic
end
Configs->>Solver: Use new nconmax parameter
Solver->>Newton: Pass contact constraint config
Note over Newton,Solver: Consistent naming across stack
21 files reviewed, no comments
Description
Recent Newton updates went through some renaming of parameters, including changing ncon_per_env to nconmax. This change accommodates the Isaac Lab naming to match the same naming for consistency.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there