using-ovnewton

Created about 10 hours ago

attributes
additional_license_urlshttps://github.com/NVIDIA/skills/blob/4c28452d0f686e185de5d2fd0d445ab85308a380/LICENSE-CC-BY-4.0
descriptionConnect the Newton physics engine to an Omniverse simulation or ovstage with ovnewton. Use when importing a populated ovstage into Newton, stepping its physics, synchronizing stage edits, or publishing simulation state for Omniverse rendering.
licenseApache-2.0
license_urlhttps://github.com/NVIDIA/skills/blob/4c28452d0f686e185de5d2fd0d445ab85308a380/LICENSE-APACHE
metadata{"author": "Jan Carius <[email protected]>"}
nameusing-ovnewton
publisherNVIDIA
repository_urlhttps://github.com/NVIDIA/skills
source_urlhttps://github.com/NVIDIA/skills/blob/4c28452d0f686e185de5d2fd0d445ab85308a380/skills/ovnewton-usage/SKILL.md
upstream_copyrightCopyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
upstream_licenseApache-2.0
upstream_revision4c28452d0f686e185de5d2fd0d445ab85308a380

Using ovnewton

Use ovnewton for the Newton ↔ ovstage bridge. The application owns model
finalization, the solver, controls, collision handling, and the simulation loop.
ovnewton reads a populated ovstage; Newton does not parse USD in this workflow.
Standalone Newton simulations and generic Omniverse authoring do not need this skill.

Start from the supported examples

Install ovnewton in the application's environment. Let its package metadata
select compatible dependencies; do not replace the qualified ovstage dependency
with an arbitrary build.

pip install ovnewton
python -m ovnewton.examples.example_ovnewton_basic --device cpu --no-render --num-frames 8

For rendering or MuJoCo-Warp, install "ovnewton[examples]". The basic example
accepts --solver mujoco or --solver vbd; VBD also supports CPU simulation.
Rendering needs a supported NVIDIA GPU and its own device selection.

Read the getting-started guide
and adapt the basic example.
For multiple robots, use the robot example.
Use documentation and examples corresponding to the installed ovnewton release;
repository main may describe a newer API.

Construct and bind the simulation

  1. Call ovnewton.register_usd_schemas() before the first USD schema read.
    Create an ovstage.Stage() and populate the application-supplied USD with
    population.open_usd(stage, scene_path, ordinal=1, domains=PopulationDomain.ALL).
    Seal population with stage.advance_write_floor(1).wait() before importing.
    If the application already supplies a populated stage, reuse it and its sealed
    ordinal; do not reload the scene or assume its ordinal is 1.
  2. Create an empty newton.ModelBuilder(). Configure defaults and register any
    solver-owned custom attributes before calling
    ovnewton.add_ovstage(builder, stage, ordinal=population_ordinal).
    Compose all scene assets into one ovstage first: this entry point currently
    requires a builder without model entities and supports one stage per builder.
  3. For MuJoCo, register SolverMuJoCo.register_custom_attributes(builder) before
    calling ovnewton.add_ovstage(). For rigid-body VBD, register
    SolverVBD.register_custom_attributes(builder) before ovnewton.add_ovstage()
    and call builder.color() after that import, before finalization.
    Use SolverVBD(model, rigid_compliant_alm=True) for compliant rigid-body
    contacts, following the example's solver settings and contact-material tuning.
  4. Finalize with
    builder.finalize(skip_validation_joints=import_result.has_orphan_joints),
    where import_result is the result of add_ovstage. Construct the solver and
    bind with ovnewton.attach_ovstage(stage, model=model, ordinal=population_ordinal).
    attach_ovstage(stage) is the convenience path when no builder customization
    is needed. When binding an existing model, body and joint labels must match
    stage paths.

Step and synchronize

Allocate two model states, controls, and contacts. Each substep clears forces,
computes contacts, calls the solver, and swaps the states. Start from the example's
collision pipeline and solver configuration rather than assuming every solver
has identical preparation requirements.

After stepping, publish the current state with
binding.update_to_ovstage(state, ordinal=output_ordinal), then seal it with
stage.advance_write_floor(output_ordinal).wait(). Coordinate increasing write
ordinals with the application's other stage writers.

To consume application edits, seal them first and call
binding.update_from_ovstage(state, control) before stepping, using the same
control passed to the solver. This reads the latest sealed supported state and
drive-target fields. An explicit read ordinal is a consistency ceiling, not
historical playback. Selected Newton-native output can instead be read through
binding.query() and binding.read() without stage publication.

For rendering, publish and seal Newton output before the renderer consumes the
stage. Newton's simulation device and OVRTX's rendering device are independent;
follow the example's synchronization and device-selection options.

Check the support guide
before promising support for authored physics. Unsupported physics may fail
attachment; do not silently replace it with a different physical model. See the
concepts guide and
output-read guide
for synchronization, diagnostics, read layouts, and lifetimes.


Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

The license files are attached. Apache 2.0 · CC BY 4.0

The attached ZIP contains the pinned supporting files and applicable license notices.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.