Skip to content

newton-physics/newton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,476 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

License GitHub commit activity codecov Push - AWS GPU

Newton

Newton is a GPU-accelerated physics simulation engine built upon NVIDIA Warp, specifically targeting roboticists and simulation researchers.

Newton extends and generalizes Warp's (deprecated) warp.sim module, and integrates MuJoCo Warp as its primary backend. Newton emphasizes GPU-based computation, OpenUSD support, differentiability, and user-defined extensibility, facilitating rapid iteration and scalable robotics simulation.

Newton is a Linux Foundation project that is community-built and maintained. Code is licensed under Apache-2.0. Documentation is licensed under CC-BY-4.0.

Newton was initiated by Disney Research, Google DeepMind, and NVIDIA.

Quickstart

pip install "newton[examples]"
python -m newton.examples basic_pendulum

To install from source with uv, see the installation guide.

Examples

Before running the examples below, install Newton with the examples extra:

pip install "newton[examples]"

If you installed from source with uv, substitute uv run for python in the commands below.

Basic Examples

Pendulum URDF Viewer
python -m newton.examples basic_pendulum python -m newton.examples basic_urdf python -m newton.examples basic_viewer
Shapes Joints Conveyor
python -m newton.examples basic_shapes python -m newton.examples basic_joints python -m newton.examples basic_conveyor
Heightfield Recording Replay Viewer
python -m newton.examples basic_heightfield python -m newton.examples recording python -m newton.examples replay_viewer

Robot Examples

Cartpole Humanoid G1
python -m newton.examples robot_cartpole python -m newton.examples robot_humanoid python -m newton.examples robot_g1
H1 Anymal D Anymal C Walk
python -m newton.examples robot_h1 python -m newton.examples robot_anymal_d python -m newton.examples robot_anymal_c_walk
Policy UR10 Panda Hydro
python -m newton.examples robot_policy python -m newton.examples robot_ur10 python -m newton.examples robot_panda_hydro
Allegro Hand
python -m newton.examples robot_allegro_hand

Cable Examples

Cable Bend Cable Twist Cable Bundle Hysteresis
python -m newton.examples cable_bend python -m newton.examples cable_twist python -m newton.examples cable_bundle_hysteresis
Cable Pile Cable Y-Junction Cable Ball Joints
python -m newton.examples cable_pile python -m newton.examples cable_y_junction python -m newton.examples cable_ball_joints
Cable Bend Damping Cable Fixed Joints Cable Helix
python -m newton.examples cable_bend_damping python -m newton.examples cable_fixed_joints python -m newton.examples cable_helix

Cloth Examples

Cloth Bending Cloth Hanging Cloth Style3D
python -m newton.examples cloth_bending python -m newton.examples cloth_hanging python -m newton.examples cloth_style3d
Cloth H1 Cloth Twist Cloth Franka
python -m newton.examples cloth_h1 python -m newton.examples cloth_twist python -m newton.examples cloth_franka
Cloth Rollers Cloth Poker Cards
python -m newton.examples cloth_rollers python -m newton.examples cloth_poker_cards

Inverse Kinematics Examples

IK Franka IK H1 IK Custom
python -m newton.examples ik_franka python -m newton.examples ik_h1 python -m newton.examples ik_custom
IK Cube Stacking
python -m newton.examples ik_cube_stacking

MPM Examples

MPM Granular MPM Anymal MPM Two-Way Coupling
python -m newton.examples mpm_granular python -m newton.examples mpm_anymal python -m newton.examples mpm_twoway_coupling
MPM Grain Rendering MPM Multi Material
python -m newton.examples mpm_grain_rendering python -m newton.examples mpm_multi_material

Sensor Examples

Sensor Contact Sensor Tiled Camera Sensor IMU
python -m newton.examples sensor_contact python -m newton.examples sensor_tiled_camera python -m newton.examples sensor_imu

Selection Examples

Selection Cartpole Selection Materials Selection Articulations
python -m newton.examples selection_cartpole python -m newton.examples selection_materials python -m newton.examples selection_articulations
Selection Multiple
python -m newton.examples selection_multiple

DiffSim Examples

DiffSim Ball DiffSim Cloth DiffSim Drone
python -m newton.examples diffsim_ball python -m newton.examples diffsim_cloth python -m newton.examples diffsim_drone
DiffSim Spring Cage DiffSim Soft Body DiffSim Quadruped
python -m newton.examples diffsim_spring_cage python -m newton.examples diffsim_soft_body python -m newton.examples diffsim_bear

Multi-Physics Examples

Softbody Gift Softbody Dropping to Cloth
python -m newton.examples softbody_gift python -m newton.examples softbody_dropping_to_cloth

Contacts Examples

Nut Bolt Hydro Nut Bolt SDF Brick Stacking
python -m newton.examples nut_bolt_hydro python -m newton.examples nut_bolt_sdf python -m newton.examples brick_stacking

Softbody Examples

Softbody Hanging Softbody Franka
python -m newton.examples softbody_hanging python -m newton.examples softbody_franka

Example Options

The examples support the following command-line arguments:

Argument Description Default
--viewer Viewer type: gl (OpenGL window), usd (USD file output), rerun (ReRun), or null (no viewer). gl
--device Compute device to use, e.g., cpu, cuda:0, etc. None (default Warp device)
--num-frames Number of frames to simulate (for USD output). 100
--output-path Output path for USD files (required if --viewer usd is used). None

Some examples may add additional arguments (see their respective source files for details).

Example Usage

# List available examples
python -m newton.examples

# Run with the USD viewer and save to my_output.usd
python -m newton.examples basic_viewer --viewer usd --output-path my_output.usd

# Run on a selected device
python -m newton.examples basic_urdf --device cuda:0

# Combine options
python -m newton.examples basic_viewer --viewer gl --num-frames 500 --device cpu

Contributing and Development

See the contribution guidelines and the development guide for instructions on how to contribute to Newton.

Support and Community Discussion

For questions, please consult the Newton documentation first before creating a discussion in the main repository.

Code of Conduct

By participating in this community, you agree to abide by the Linux Foundation Code of Conduct.

Project Governance, Legal, and Members

Please see the newton-governance repository for more information about project governance.

About

An open-source, GPU-accelerated physics simulation engine built upon NVIDIA Warp, specifically targeting roboticists and simulation researchers.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages