isaaclab_neural#

Neural dynamics model definitions, independent optimizer settings and Newton solver integration.

NeRDCfg describes a model. NeRDTrainingCfg describes optimization. Recording environments declare their own exploration actions, reset events and RecorderManager terms. The recording and training scripts own task composition and import the optional newton-neural library only when executed; configuration imports remain independent of it.

Model definition#

class isaaclab_neural.NeRDCfg[source]#

FlashNeRD architecture and physical inputs, persisted with its checkpoint.

Recording reads prediction and contact_bodies, which select the signals a dataset holds. Fitting builds the model, so the architecture can change without recording again.

Attributes:

backbone_spans

Temporal attention spans of the model backbone [frames].

prediction

Native prediction class, which decides the labels that a dataset records.

contact_bodies

Body-name glob for ground probes, recorded as contact input; empty means no contact input.

backbone_spans: tuple[int, ...]#

Temporal attention spans of the model backbone [frames].

prediction: str#

Native prediction class, which decides the labels that a dataset records.

contact_bodies: str#

Body-name glob for ground probes, recorded as contact input; empty means no contact input.

Optimization#

class isaaclab_neural.NeRDTrainingCfg[source]#

Training settings; neither the model nor the solver owns this configuration.

Recording terms#

class isaaclab_neural.record.recording_cfg.NeRDExplorationActionCfg[source]#

Joint targets and restart cadence of an exploration controller.

Attributes:

asset_name

The name of the scene entity.

joint_names

List of joint names or regex expressions that the action will be mapped to.

scale

Scale factor for the action (float or dict of regex expressions).

use_default_offset

Whether to use default joint positions configured in the articulation asset as offset.

class_type

The associated action term class.

debug_vis

Whether to visualize debug information.

clip

Clip range for the processed action (dict of regex expressions).

offset

Offset factor for the action (float or dict of regex expressions).

preserve_order

Whether to preserve the order of the joint names in the action output.

asset_name: str#

The name of the scene entity.

This is the name defined in the scene configuration file. See the InteractiveSceneCfg class for more details.

joint_names: list[str]#

List of joint names or regex expressions that the action will be mapped to.

scale: float#

Scale factor for the action (float or dict of regex expressions). Defaults to 1.0.

use_default_offset: bool#

Whether to use default joint positions configured in the articulation asset as offset. Defaults to True.

If True, this flag results in overwriting the values of offset to the default joint positions from the articulation asset.

class_type: type[JointPositionAction] | str#

The associated action term class.

The class should inherit from isaaclab.managers.action_manager.ActionTerm.

debug_vis: bool#

Whether to visualize debug information. Defaults to False.

clip: dict[str, tuple] | None#

Clip range for the processed action (dict of regex expressions). Defaults to None.

The keys are matched against the joint names for joint action terms and against the action names (action_names) for task-space and non-holonomic action terms.

offset: float | dict[str, float]#

Offset factor for the action (float or dict of regex expressions). Defaults to 0.0.

preserve_order: bool#

Whether to preserve the order of the joint names in the action output. Defaults to False.

Exploration actions and the recorder term that writes native NeRD datasets.

Classes:

NeRDExplorationAction

An exploration controller with a state sampler and a native joint-target generator.

NeRDDynamicsRecorder

Capture one frame per environment step and write contiguous per-environment shards.

Functions:

reset_exploration_state(env, env_ids)

Sample robot state at an explicit environment reset event.

free_acceleration_indices(solver, binding)

Map the selected robot's Newton DOFs to MuJoCo's free-acceleration columns.

invalid_exploration_state(env)

Restart divergent worlds before their state is used for another transition.

exploration_timeout(env)

End each sampled exploration segment at its declared frame count.

class isaaclab_neural.record.recording.NeRDExplorationAction[source]#

An exploration controller with a state sampler and a native joint-target generator.

Task implementations construct states and commands, then call initialize_sampling() once. Only the reset event writes sampled physical state. The action manager owns command resets.

Methods:

__init__(cfg, env)

Initialize the action term.

initialize_sampling()

Bind declared samplers to the robot once, before the first episode.

process_actions(actions)

Processes the actions sent to the environment.

reset([env_ids])

Resets the manager term.

Attributes:

is_graphable

it writes from buffers updated in place.

__init__(cfg: NeRDExplorationActionCfg, env: ManagerBasedEnv)[source]#

Initialize the action term.

Parameters:
  • cfg – The configuration object.

  • env – The environment instance.

initialize_sampling() → None[source]#

Bind declared samplers to the robot once, before the first episode.

process_actions(actions: torch.Tensor) → None[source]#

Processes the actions sent to the environment.

Note

This function is called once per environment step by the manager.

Parameters:

actions – The actions to process.

reset(env_ids: torch.Tensor | slice | None = None) → None[source]#

Resets the manager term.

Parameters:

env_ids – The environment ids. Defaults to None, in which case all environments are considered.

is_graphable: ClassVar[bool] = False#

it writes from buffers updated in place.

Type:

Whether apply_actions() can be recorded into a CUDA graph

cfg: actions_cfg.JointPositionActionCfg#

The configuration of the action term.

isaaclab_neural.record.recording.reset_exploration_state(env: ManagerBasedEnv, env_ids: torch.Tensor | slice | None) → None[source]#

Sample robot state at an explicit environment reset event.

isaaclab_neural.record.recording.free_acceleration_indices(solver: newton.solvers.SolverMuJoCo, binding: newton_neural.systems.BindingArticulation) → torch.Tensor[source]#

Map the selected robot’s Newton DOFs to MuJoCo’s free-acceleration columns.

isaaclab_neural.record.recording.invalid_exploration_state(env: ManagerBasedRLEnv) → torch.Tensor[source]#

Restart divergent worlds before their state is used for another transition.

isaaclab_neural.record.recording.exploration_timeout(env: ManagerBasedRLEnv) → torch.Tensor[source]#

End each sampled exploration segment at its declared frame count.

class isaaclab_neural.record.recording.NeRDDynamicsRecorder[source]#

Capture one frame per environment step and write contiguous per-environment shards.

The pre-step hook copies state and contact inputs; the post-step hook adds the consumed controls, the free-motion label and validity. Frames stay batched across environments and reach the native TrajectoryWriter every shard_frames steps, so recording materializes no per-episode data. A reset marks the next frame of its environments as an episode start.

The term binds the configured articulation itself and records the signals that the configured contact input and prediction need. The dataset describes the recorded robot, so that a model of any architecture is built on it when fitting. The workflow closes the recorder when it ends.

Methods:

__init__(cfg, env)

Initialize the manager term.

description()

Describe the recorded robot as plain data, from which fitting builds a model.

record_post_reset(env_ids)

Record data at the end of env.reset().

record_pre_step()

Record data in the beginning of env.step() after action is cached/processed in the ActionManager.

record_post_step()

Record the completed physical transition.

flush()

Write the buffered frames of all environments as one shard that continues the previous one.

close(*[, complete])

Write the remaining frames and publish the dataset index.

Attributes:

signals

Specifications of the recorded signals, keyed by name.

__init__(cfg: NeRDDynamicsRecorderCfg, env: ManagerBasedRLEnv) → None[source]#

Initialize the manager term.

Parameters:
  • cfg – The configuration object.

  • env – The environment instance.

signals#

Specifications of the recorded signals, keyed by name.

description() → dict[source]#

Describe the recorded robot as plain data, from which fitting builds a model.

Returns:

The system and contact input by class name and configuration, the physical-model contract that a checkpoint must match at deployment, and the settings that selected the recorded signals.

record_post_reset(env_ids: Sequence[int] | slice | None) → tuple[None, None][source]#

Record data at the end of env.reset().

Parameters:

env_ids – The environment ids. All environments should be considered when set to None.

Returns:

A tuple of key and value to be recorded. Please refer to the record_pre_reset function for more details.

record_pre_step() → tuple[None, None][source]#

Record data in the beginning of env.step() after action is cached/processed in the ActionManager.

Returns:

A tuple of key and value to be recorded. Please refer to the record_pre_reset function for more details.

record_post_step() → tuple[None, None][source]#

Record the completed physical transition.

In RL environments, this runs before automatic reset and observation updates; env.obs_buf still holds the preceding policy input. See Recorder Manager for recording current observations. Non-RL environments update observations first.

Returns:

A tuple of key and value to be recorded. Please refer to the record_pre_reset function for more details.

flush() → None[source]#

Write the buffered frames of all environments as one shard that continues the previous one.

close(*, complete: bool = True) → None[source]#

Write the remaining frames and publish the dataset index.

Parameters:

complete – Whether the recording ran to its end. An interrupted recording keeps the shards that were already written and is marked incomplete.