Skip to content

Python API

The NovaPhy Python package is imported as:

import novaphy

The public API is the set of names exported from novaphy.__all__ plus the documented modules such as novaphy.solvers and novaphy.viewer. Solver classes intentionally live in the novaphy.solvers namespace instead of the top level, mirroring newton.solvers.

This reference is organized by topic in the same shape as newton's API Reference. Where Newton uses real subpackages (for example newton.geometry, newton.math), NovaPhy still exposes many of those symbols at the top level; the category pages below group them by topic. Real Python subpackages such as novaphy.solvers, novaphy.ik, novaphy.sensors, novaphy.actuators, and novaphy.viewer are called out explicitly.

Index

Category Description
novaphy Top-level scene, runtime buffers, joints, and core types.
novaphy.actuators Actuator framework: PD controller and effort writer.
novaphy.geometry Collision shapes, broadphase, narrowphase, AABB, and contact data.
novaphy.ik Inverse-kinematics solvers, Jacobian helpers, end-effector queries.
novaphy.io URDF / USD / MJCF importers, scene builder, exporter, recorder.
novaphy.math Spatial algebra, axis conversion, and angle helpers.
novaphy.sensors Sensor framework: IMU, contact, frame transform readers.
novaphy.solvers Solver classes, configuration objects, and solver metadata.
novaphy.utils Profiling, device descriptors, CUDA stream / graph capture, version, scaffold helpers.
novaphy.viewer Unified GL, headless, file, Rerun, USD, and Viser visualization lifecycle.

Quick Start

For a guided walkthrough including setup, public API surface, the runtime contract, integration notes, and runnable demos, see the Quick Start guide.

Compatibility with newton

NovaPhy aligns with Newton's solver-primary architecture:

  • solver.step(state_in, state_out, control, contacts, dt) is the canonical forward-dynamics entry point on every SolverBase subclass.
  • Model is immutable, runtime buffers (SimState, Control, Contacts) are caller-owned. Allocate state/control via model.state() / model.control(), and allocate collision-sized contact buffers via CollisionPipeline(model).contacts().
  • Solver classes live exclusively in novaphy.solvers.*; there is no novaphy.SolverXXX top-level shortcut.
  • novaphy.ik implements the class-style IKSolver, objective, optimizer, Jacobian-mode, and sampler API as well as the backwards-compatible free-function helpers.
  • novaphy.viewer implements a shared viewer lifecycle across interactive, headless, recording, and remote backends.

NovaPhy currently differs from Newton in the following ways (only the major items are listed; see each category page for symbol-level differences):

  • Several category pages (novaphy.io, novaphy.math, and novaphy.utils) group top-level symbols rather than representing importable Python subpackages.
  • Newton math helpers built around Warp (safe_div, smooth_min/max, quat_*, vec_*, transform_twist/wrench) are not provided.
  • NovaPhy IK uses CPU/NumPy and has no autodiff backend. Its public IKJacobianType values are ANALYTIC and FINITE_DIFF; see Robotics and inverse kinematics for the current JointBodyBundle and nq == nv restrictions.
  • VBD and IPC are exposed as novaphy.solvers.SolverVBD and novaphy.solvers.SolverIPC, both using the solver-primary API. There are no public top-level novaphy.VBDWorld or novaphy.IPCWorld containers.
  • NovaPhy adds native SolverMuJoCo, MultiEnvRunner, fluids (SolverPBF, SolverSPH, and SolverLBM), and IPC (SolverIPC). SolverSPH and SolverLBM have optional CUDA numerical backends; SolverMPM is the importable scaffold rather than a runnable simulation backend.