Skip to main content
The modality configuration defines how your robot’s data should be loaded, processed, and interpreted by the model. This configuration bridges your dataset’s physical structure (defined in meta/modality.json) and the model’s data processing pipeline.

Configuration structure

A modality configuration is a Python dictionary containing four top-level keys:
ModalityConfig
Defines which camera views to use and how to sample video frames temporally.
ModalityConfig
Defines proprioceptive observations (joint positions, gripper states, etc.) and normalization.
ModalityConfig
Defines the action space, prediction horizon, and action representation format.
ModalityConfig
Defines which language annotations to use for task conditioning.

ModalityConfig class

Each modality is configured using the ModalityConfig dataclass from gr00t/data/types.py:69-103:

Required fields

list[int]
required
Defines which temporal offsets to sample relative to the current timestep.Examples:
  • [0] - Current frame only
  • [-2, -1, 0] - Last 3 frames for temporal stacking
  • list(range(0, 16)) - 16-step action prediction horizon
list[str]
required
Specifies which keys to load from your dataset. These keys must match the keys defined in your meta/modality.json file.Examples:
  • Video: ["front", "wrist"]
  • State: ["single_arm", "gripper"]
  • Action: ["single_arm", "gripper"]
  • Language: ["annotation.human.action.task_description"]

Optional fields

list[str] | None
Specifies which state keys should use sine/cosine encoding. Best for dimensions in radians (e.g., joint angles).
This will duplicate the number of dimensions by 2, and is only recommended for proprioceptive states.
list[str] | None
Specifies which keys should use mean/standard deviation normalization instead of min-max normalization.
list[ActionConfig] | None
Required for the action modality. Defines how each action modality should be interpreted and transformed. The list must have the same length as modality_keys.

Action configuration

The ActionConfig class defines how actions should be interpreted from gr00t/data/types.py:61-65:

ActionConfig fields

ActionRepresentation
required
Defines how actions should be interpreted:
  • RELATIVE - Actions are deltas from the current state
  • DELTA - Alternative name for relative actions
  • ABSOLUTE - Actions are target positions
Using relative actions leads to smoother actions, but might suffer from drifting. If you want to use relative actions, make sure the state and action stored in the dataset are absolute.
ActionType
required
Specifies the control space:
  • EEF - End-effector/Cartesian space control (expects 9-dimensional vector: x, y, z positions + rotation 6D)
  • NON_EEF - Joint space control and other non-EEF control spaces
ActionFormat
required
Defines the action representation format:
  • DEFAULT - Standard format (e.g., joint angles, gripper positions)
  • XYZ_ROT6D - 3D position + 6D rotation representation for end-effector control
  • XYZ_ROTVEC - 3D position + rotation vector for end-effector control
str | None
Specifies the corresponding reference state key for computing relative actions when rep=RELATIVE. If not provided, the system will use the action key as the reference state key.

Complete example: SO-100

Here’s a complete configuration example from the SO-100 robot:

Configuring each modality

Defines which camera views to use:
For multiple cameras:
Defines proprioceptive observations:
With sin/cos encoding for joint angles:
Defines the action space and prediction horizon:
If you modify delta_indices for the action modality, you must regenerate the dataset statistics by re-running:
Defines which language annotations to use:

Relationship with meta/modality.json

The modality configuration’s modality_keys must reference keys that exist in your dataset’s meta/modality.json:
The system will:
  1. Use modality_keys to look up the corresponding entries in meta/modality.json
  2. Extract the correct slices from the concatenated state/action arrays
  3. Apply the specified transformations (normalization, action representation conversion)

Registering your configuration

After defining your configuration, register it for use in training and inference:
Save your configuration to a Python file and pass the path to the modality_config_path argument when running the finetuning script.

Next steps

Data format

Understand the LeRobot v2 data format

Fine-tuning guide

Start fine-tuning with your config

Embodiment tags

Learn about supported robots