Skip to content

Conversation

@AntoineRichard
Copy link
Collaborator

Description

Perf opt to get the following:
fps_comparison_16384_envs
fps_comparison_8192_envs (1)
fps_comparison_4096_envs (1)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions bot added the asset New asset feature or request label Dec 12, 2025
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 12, 2025

Greptile Overview

Greptile Summary

This PR implements performance optimizations for the Newton physics solver across multiple robot configurations and environment setups, yielding significant FPS improvements at scale (4096-16384 environments).

Key Changes:

  • Solver tuning: Enabled ls_parallel=True and integrator="implicit" across direct environments (Ant, Cartpole, Humanoid); adjusted ls_iterations, njmax, and nconmax parameters per-environment
  • Actuator friction removal: Removed small friction values (1e-5 to 0.0001) from most robot configs (Ant, Cassie, Franka, Humanoid, H1, G1, UR10) as a performance optimization
  • API modernization: Refactored locomotion_env.py to use default_root_pose/default_root_vel instead of the deprecated default_root_state API
  • A1 actuator fix: Re-enabled effort_limit_sim and friction parameters that were previously commented out
  • Benchmark updates: Removed camera tasks and reduced environment counts (removed 1024, 2048) from scaling benchmarks

Confidence Score: 4/5

  • This PR is safe to merge; changes are configuration-only with demonstrated performance benefits.
  • All changes are configuration tuning (solver parameters, actuator friction values) and a minor API migration. The deprecated API usage was correctly updated. Performance improvements are supported by benchmark graphs in the PR description.
  • The unitree.py file has the most significant actuator changes - verify A1 robot behavior with re-enabled friction and effort_limit_sim parameters.

Important Files Changed

File Analysis

Filename Score Overview
scripts/benchmarks/eval_all_for_newton_alpha_for_scaling.sh 4/5 Removed camera tasks and reduced env counts (1024, 2048 removed) for benchmarking; contains hardcoded path but existed before this PR.
source/isaaclab_assets/isaaclab_assets/robots/unitree.py 4/5 Major changes: re-enabled effort_limit_sim and friction for A1; removed friction from H1, G1, and G1_29_DOF configs.
source/isaaclab_tasks/isaaclab_tasks/direct/ant/ant_env.py 5/5 Reduced njmax/nconmax constraints, enabled ls_parallel=True and integrator="implicit" for better performance.
source/isaaclab_tasks/isaaclab_tasks/direct/cartpole/cartpole_env.py 5/5 Increased ls_iterations (3→10), added ls_parallel=True and integrator="implicit" for solver optimization.
source/isaaclab_tasks/isaaclab_tasks/direct/locomotion/locomotion_env.py 5/5 Refactored to use new API: default_root_pose/default_root_vel instead of deprecated default_root_state.

Sequence Diagram

sequenceDiagram
    participant Env as Environment
    participant Robot as Robot Articulation
    participant Solver as MJWarp Solver
    participant Data as Robot Data

    Note over Env,Solver: Performance-Optimized Reset Flow
    
    Env->>Robot: reset(env_ids)
    Robot->>Data: default_root_pose[env_ids]
    Robot->>Data: default_root_vel[env_ids]
    Data-->>Robot: pose (transform)
    Data-->>Robot: velocity (spatial_vector)
    
    Robot->>Robot: write_root_pose_to_sim()
    Robot->>Robot: write_root_velocity_to_sim()
    Robot->>Robot: write_joint_state_to_sim()
    
    Note over Solver: Solver Config Changes
    Solver->>Solver: ls_parallel=True
    Solver->>Solver: integrator="implicit"
    Solver->>Solver: Tuned njmax/nconmax/ls_iterations
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

18 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@AntoineRichard
Copy link
Collaborator Author

reward_comparison_4096_envs fps_comparison_4096_envs (2)

Trainings is looking good against PhysX

@AntoineRichard AntoineRichard force-pushed the antoiner/newton_perf_opt branch from 2078f74 to 92133eb Compare December 17, 2025 16:45
@kellyguo11 kellyguo11 changed the title [Newton] Perf Opt [Newton] Optimizes performance for some environments Dec 17, 2025
@AntoineRichard AntoineRichard merged commit d93ec21 into isaac-sim:dev/newton Dec 17, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants