NukaPhysics logo

Nuka-Physics

GPU-resident CUDA physics for robot learning.
One block-descent solver for articulated robots, rigid bodies, VBD cloth, and MLS-MPM solids.

CUDA backend, extensible backend architecture Linux and Windows AGPL-3.0 or Commercial

Quick start · Run the demos · Documentation · Architecture

Panda grasping, carrying, and placing a bowl with pi0.5 vision-language-action inference
π0.5 Inference
Vision-language-action · LIBERO pick and place
Full video · Run demo
Unitree G1 folding a pale blue cotton shirt with articulated hands
G1 Shirt Folding
Robot–cloth coupling · Shirt folding
1080p video
Unitree G1 performing the Shuffle dance with a pretrained ONNX policy
G1 Dance
29-DoF humanoid · Shuffle policy inference
Full video · Run demo
Microduck taking alternating steps while balancing on a freely rolling ball in Nuka Dynamics Lab
Microduck Ball Balance
Pure Nuka Physics RL
1080p video
Go2 performing a backflip in the Nuka lab
Go2 Backflip
TorchScript policy inference
1080p video
Go2 rising onto its hind legs and balancing in the Nuka lab
Go2 Handstand
TorchScript policy inference
1080p video
A freely falling Stanford bunny splashing into MLS-MPM water in a glass tank
Bunny × Water
Two-way MLS-MPM coupling · 2× slow motion
1080p video · Run demo
A freely falling Stanford bunny indenting an MLS-MPM elastoplastic block
Bunny × Elastoplastic
Free fall · Plastic indentation · Real time
1080p video · Run demo
Material demos load the shared [Nuka Dynamics Lab assets](docs/nuka-stage.md), with a layered experiment deck, warm grey panels and avocado green accents. Layouts, materials, lights and cameras are editable in NKS. Existing gallery recordings retain their recorded environment and physics. The Microduck clip replays recorded Nuka physics with a Newton-trained balancing policy on a freely moving ball. ## Why Nuka - **GPU-resident at scale.** One cooked world template drives thousands of independent environments on one GPU. - **One solver.** Robot, rigid, cloth, and MLS-MPM contacts all run through one unified block-descent (UABD) solve. - **Self-written stack.** CUDA physics, importers, Vulkan rendering, and a CUDA path tracer, with no external physics or rendering SDK. ## Architecture

Nuka Physics architecture: scene sources cook into a GPU world whose rigid, VBD cloth and MLS-MPM systems share one block-descent contact solve

| Layer | Core modules | Responsibility | | --- | --- | --- | | Authoring | `scene`, `import` | NKS, MJCF, URDF, and text-USD → SceneIR → cooked model | | Simulation | `nk`, `collision`, `constraint` | GPU world, broadphase, narrowphase, contact rows, block-descent solve | | Platform | `phi`, `sensor`, `render`, `rt` | CUDA backend, sensors, Vulkan raster, CUDA path tracer | ## Capabilities | System | Status | | --- | --- | | Rigid + articulated dynamics (Featherstone / ABA) | Production | | Contact, terrain, and heightfields | Production | | Unified block-descent contact solve (UABD) | Production | | VBD cloth and cables | Functional | | MLS-MPM elastic and elastoplastic solids | Functional | | Two-way robot / rigid / cloth / MLS-MPM coupling | [Functional](docs/concepts/coupling.md) | | Sensors with calibration and noise models | [Functional](docs/concepts/sensors.md) | | Batched RL with PyTorch and DLPack | Functional | | Vulkan raster + CUDA path tracing | Functional | ## Quick Start Requires Linux, CUDA 12.8, g++-10, CMake 3.20+, Python 3.10+, and an NVIDIA GPU. ```bash export CC=gcc-10 CXX=g++-10 cmake -S . -B build-cuda128 \ -DNK_BUILD_TESTS=ON \ -DNK_REQUIRE_CUDA=ON \ -DNK_PHYSICS_BACKEND=CUDA cmake --build build-cuda128 -j pip install -e python ``` Step 4096 Go2 environments from PyTorch: ```python import torch import nuka with nuka.Device.create(0) as device: world = nuka.World.create_from_scene( device, "examples/scenes/go2_locomotion.usda", env_count=4096 ) q = torch.from_dlpack(world.buffer_view(nuka.JOINT_POSITION)) target = torch.from_dlpack(world.buffer_view(nuka.DRIVE_TARGET)) target[:, 1:].copy_(q[:, 1:]) world.step() nuka.sync() world.destroy() ``` Train Go2 locomotion (needs `rl_games==1.6.5`), or run the [material demos](examples/demo/README.md): ```bash CUDA_VISIBLE_DEVICES=0 python examples/training/train_go2_ppo.py --num_actors 4096 ``` ## Documentation [Getting started](docs/getting-started.md) · [Architecture](docs/concepts/architecture.md) · [Isaac Lab compatibility](docs/concepts/isaaclab-compat.md) ## License Nuka Physics is dual-licensed under [AGPL-3.0](LICENSE) or a [commercial license](LICENSING.md). See [NOTICE](NOTICE), [CONTRIBUTING.md](CONTRIBUTING.md), and [SECURITY.md](SECURITY.md).