isaaclab_neural.physics#
Physics and solver configurations, and their adapters, that run newton-neural models on the Newton backend.
Classes
Isaac Lab |
|
Isaac Lab |
|
Configuration for stepping a robot with |
|
Configuration for two-way coupling a free-motion neural model inside MuJoCo Warp ( |
Solvers#
- class isaaclab_neural.physics.NeRDSolver[source]#
Bases:
NewtonSolverIsaac Lab
NewtonSolverwrapper fornewton-neural’s standaloneSolverNeRD.Uses the ordinary Newton manager and backend. The task declares the model frame as its physics step. Key semantics declared to Isaac Lab:
Imports scenes with MuJoCo USD schemas so the resulting
newton.Modelmatches recording.Uses Newton’s collision pipeline; contact sensors read penetration-based normal-force estimates.
Rejects IMU, PVA, and joint-wrench sensors (accelerations and reaction wrenches are not computed).
External body forces have no effect, and each kind of runtime model mutation emits a
NewtonNeuralWarningonce.On CUDA, Isaac Lab captures the step into its physics-step CUDA graph (internal solver graphing disabled); any environment state write clears that world’s streaming history.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(cfg: NewtonSolverCfg, model: Model, mode: wp.DeterministicMode, env_template: str | None = None)[source]#
Build Newton’s solver.
- class isaaclab_neural.physics.MJWarpNeRDSolver[source]#
Bases:
MJWarpSolverIsaac Lab
MJWarpSolversubclass injecting neural free accelerations viaSolverNeRDMuJoCo.Preserves all MuJoCo Warp contacts, sensors, resets, and solver options. Post-startup edits to robot masses or gains reach MuJoCo Warp but not the neural weights (each kind emits a
NewtonNeuralWarningonce). On CUDA, Isaac Lab captures the combined step into its physics-step graph (internal solver graphing disabled).Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(cfg: NewtonSolverCfg, model: Model, mode: wp.DeterministicMode, env_template: str | None = None)[source]#
Build Newton’s solver.
Solver Configuration#
- class isaaclab_neural.physics.NeRDSolverCfg[source]#
Bases:
NewtonSolverCfgConfiguration for stepping a robot with
newton-neural’s standaloneSolverNeRD.Use it as the solver of an ordinary
NewtonCfg. Each solver step must match the checkpoint’s frame duration. For a model trained on one task control period, declare that period assim.dt, setdecimation=1andnum_substeps=1. The native solver rejects a mismatched timestep.Example
replace( newton_mjwarp, solver_cfg=NeRDSolverCfg(checkpoint="anymal_c.pt", articulation="{ENV_REGEX_NS}/Robot"), num_substeps=1, )
Attributes:
Solver adapter class wrapping
newton_neural.solvers.SolverNeRD.Path to the saved state-increment model checkpoint.
Robot prim path regex (e.g.,
"{ENV_REGEX_NS}/Robot") matching Newton articulation labels from start.Solver type metadata (deprecated).
Optional inference precision override (
"fp32","tf32","fp16","bf16"; checkpoint default).Optional
torch.compiletoggle (defaults toTrueon CUDA where Triton is installed).Methods:
Raise
ValueErrorifcheckpointis empty or does not exist, with training instructions.- class_type: type[NeRDSolver] | str#
Solver adapter class wrapping
newton_neural.solvers.SolverNeRD.
- checkpoint: str#
Path to the saved state-increment model checkpoint.
A shared physics declaration leaves it empty, and a task that has a model sets it. Validation rejects an empty path, so a task without a model does not offer the preset as runnable.
- articulation: str#
Robot prim path regex (e.g.,
"{ENV_REGEX_NS}/Robot") matching Newton articulation labels from start.
- solver_type: str#
Solver type metadata (deprecated).
Deprecated since version Solver: dispatch is driven by the configuration class; this field is retained as metadata for logging and debugging only. Do not branch on
solver_typein new code.
- precision: str | None#
Optional inference precision override (
"fp32","tf32","fp16","bf16"; checkpoint default).
- compile: bool | None#
Optional
torch.compiletoggle (defaults toTrueon CUDA where Triton is installed).torch.compileneeds Triton for CUDA, and PyTorch installs it on Linux only. Elsewhere, such as on Windows, the default isFalse: the model runs slower and is otherwise equivalent.
- validate_config() None[source]#
Raise
ValueErrorifcheckpointis empty or does not exist, with training instructions.
- class isaaclab_neural.physics.MJWarpNeRDSolverCfg[source]#
Bases:
MJWarpSolverCfgConfiguration for two-way coupling a free-motion neural model inside MuJoCo Warp (
SolverNeRDMuJoCo).Inherits all
MJWarpSolverCfgfields;sim.dt / num_substepsmust match the checkpoint’sframe_dt.Attributes:
Solver adapter class wrapping
newton_neural.solvers.SolverNeRDMuJoCo.Path to the saved free-motion model checkpoint.
Robot prim path regex (e.g.,
"{ENV_REGEX_NS}/Robot") matching Newton articulation labels from start.Solver type.
Number of constraints per environment (world).
Number of contact points per environment (world).
Number of solver iterations.
Number of line search iterations for the solver.
Solver type.
Integrator type.
Whether to use the pure MuJoCo backend instead of mujoco_warp.
Whether to disable contact computation in MuJoCo.
Whether to disable MuJoCo Warp's internal sensor computation.
Default gear ratio for all actuators.
Dictionary mapping joint names to specific gear ratios, overriding the default_actuator_gear.
Frequency (in solver substeps) at which to update the MuJoCo Data object from the Newton state.
Optional path to save the generated MJCF model file.
Frictional-to-normal constraint impedance ratio.
The type of contact friction cone.
Maximum iterations for convex collision detection (GJK/EPA).
Whether to enable multiple-contact convex collision detection.
Deprecated parallel line search option.
Whether to use MuJoCo's internal contact solver.
Solver convergence tolerance for the constraint residual.
Optional inference precision override (
"fp32","tf32","fp16","bf16"; checkpoint default).Optional
torch.compiletoggle (defaults toTrueon CUDA where Triton is installed).Methods:
Raise
ValueErrorifcheckpointis empty or does not exist, with training instructions.from_mjwarp(mujoco, **settings)Copy all settings from
mujoco(excludingclass_type) and applysettingsoverrides.- class_type: type[MJWarpNeRDSolver] | str#
Solver adapter class wrapping
newton_neural.solvers.SolverNeRDMuJoCo.
- checkpoint: str#
Path to the saved free-motion model checkpoint.
A shared physics declaration leaves it empty, and a task that has a model sets it. Validation rejects an empty path, so a task without a model does not offer the preset as runnable.
- articulation: str#
Robot prim path regex (e.g.,
"{ENV_REGEX_NS}/Robot") matching Newton articulation labels from start.
- integrator: str#
Integrator type. Can be “euler”, “rk4”, or “implicitfast”, or their corresponding MuJoCo integer constants.
- disable_sensors: bool#
Whether to disable MuJoCo Warp’s internal sensor computation.
A determinism guarantee (
NewtonCfg.deterministic_mode) disables it automatically. Isaac Lab sensors use Newton state directly and do not depend on MuJoCo Warp’s internal sensor data.
- actuator_gears: dict[str, float] | None#
Dictionary mapping joint names to specific gear ratios, overriding the default_actuator_gear.
- update_data_interval: int#
Frequency (in solver substeps) at which to update the MuJoCo Data object from the Newton state.
If 0, periodic state imports are disabled after initialization. With MuJoCo Warp, authored state writes that flag the manager’s reset mask are still synchronized for the affected worlds at the next forward or physics-step boundary, independently of this interval. The native MuJoCo CPU backend only synchronizes template world 0 when it is flagged.
- save_to_mjcf: str | None#
Optional path to save the generated MJCF model file.
If None, the MJCF model is not saved.
- ccd_iterations: int#
Maximum iterations for convex collision detection (GJK/EPA).
Increase this if you see warnings about
opt.ccd_iterationsneeding to be increased, which typically occurs with complex collision geometries (e.g. multi-finger hands).
- enable_multiccd: bool#
Whether to enable multiple-contact convex collision detection. Defaults to False.
With
use_mujoco_contactsenabled, supported convex geometry pairs can generate a contact manifold (several points across a touching surface) instead of a single point. This can improve stability for flat mesh contacts in stacking and grasping. It does not enable continuous collision detection or prevent tunneling between simulation steps.MuJoCo Warp’s supported pairs and contact-margin restrictions differ from MuJoCo CPU. Primitive colliders can already produce multiple contacts with this option disabled. Additional contacts can increase solver work and the required
nconmaxandnjmaxcapacities. See MuJoCo’s multiple-contact documentation.
- ls_parallel: bool#
Deprecated parallel line search option.
Setting this to
Trueemits aDeprecationWarningand is ignored. MuJoCo Warp is dropping support for parallel line search; Isaac Lab uses iterative line search for performance.
- use_mujoco_contacts: bool#
Whether to use MuJoCo’s internal contact solver.
If
True(default), MuJoCo handles collision detection and contact resolution internally. IfFalse, Newton’sCollisionPipelineis used instead. A default pipeline (broad_phase="explicit") is created automatically whenNewtonCfg.collision_cfgisNone. SetNewtonCfg.collision_cfgto aNewtonCollisionPipelineCfgto customize pipeline parameters (broad phase, contact limits, hydroelastic, etc.).Note
Setting
collision_cfgwhileuse_mujoco_contacts=TrueraisesValueErrorbecause the two collision modes are mutually exclusive.
- tolerance: float#
Solver convergence tolerance for the constraint residual.
The solver iterates until the residual drops below this threshold or
iterationsis reached. Lower values give more precise constraint satisfaction at the cost of more iterations. MuJoCo default is1e-8; Newton default is1e-6.
- precision: str | None#
Optional inference precision override (
"fp32","tf32","fp16","bf16"; checkpoint default).
- compile: bool | None#
Optional
torch.compiletoggle (defaults toTrueon CUDA where Triton is installed).torch.compileneeds Triton for CUDA, and PyTorch installs it on Linux only. Elsewhere, such as on Windows, the default isFalse: the model runs slower and is otherwise equivalent.
- validate_config() None[source]#
Raise
ValueErrorifcheckpointis empty or does not exist, with training instructions.
- classmethod from_mjwarp(mujoco: MJWarpSolverCfg, **settings: Any) Self[source]#
Copy all settings from
mujoco(excludingclass_type) and applysettingsoverrides.