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
predictionandcontact_bodies, which select the signals a dataset holds. Fitting builds the model, so the architecture can change without recording again.Attributes:
Temporal attention spans of the model backbone [frames].
Native prediction class, which decides the labels that a dataset records.
Body-name glob for ground probes, recorded as contact input; empty means no contact input.
Optimization#
Recording terms#
- class isaaclab_neural.record.recording_cfg.NeRDExplorationActionCfg[source]#
Joint targets and restart cadence of an exploration controller.
Attributes:
The name of the scene entity.
List of joint names or regex expressions that the action will be mapped to.
Scale factor for the action (float or dict of regex expressions).
Whether to use default joint positions configured in the articulation asset as offset.
The associated action term class.
Whether to visualize debug information.
Clip range for the processed action (dict of regex expressions).
Offset factor for the action (float or dict of regex expressions).
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
InteractiveSceneCfgclass for more details.
- 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
offsetto 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.
- 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.
Exploration actions and the recorder term that writes native NeRD datasets.
Classes:
An exploration controller with a state sampler and a native joint-target generator. |
|
Capture one frame per environment step and write contiguous per-environment shards. |
Functions:
|
Sample robot state at an explicit environment reset event. |
|
Map the selected robot's Newton DOFs to MuJoCo's free-acceleration columns. |
Restart divergent worlds before their state is used for another transition. |
|
|
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
statesandcommands, then callinitialize_sampling()once. Only the reset event writes sampled physical state. The action manager owns command resets.Methods:
__init__(cfg, env)Initialize the action term.
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:
it writes from buffers updated in place.
- __init__(cfg: NeRDExplorationActionCfg, env: ManagerBasedEnv)[source]#
Initialize the action term.
- 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
TrajectoryWritereveryshard_framessteps, 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.
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 data in the beginning of env.step() after action is cached/processed in the ActionManager.
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:
Specifications of the recorded signals, keyed by name.
- __init__(cfg: NeRDDynamicsRecorderCfg, env: ManagerBasedRLEnv) None[source]#
Initialize the manager term.
- 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_bufstill 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.