Skip to main content
Environment processors transform observations from simulation environments (like LIBERO, Isaac Lab Arena) into the LeRobot format. They handle environment-specific conventions like camera orientations, state representations, and data formats.

Overview

Environment processors bridge the gap between:
  • Simulation environments: Each with their own observation format
  • LeRobot format: Standardized observation structure expected by policies
They typically handle:
  • Image preprocessing (rotation, format conversion)
  • State extraction and concatenation
  • Feature renaming and reorganization

LIBERO Environment

Process LIBERO environment observations:
See lerobot/processor/env_processor.py:26 for the implementation.

What LIBERO Processor Does

  1. Rotates images 180 degrees to match HuggingFaceVLA camera convention:
  1. Flattens robot state from nested dict to single vector:
  1. Updates feature shapes in transform_features():

Isaac Lab Arena Environment

Process Isaac Lab Arena observations:
See lerobot/processor/env_processor.py:156 for the implementation.

What Isaac Lab Processor Does

  1. Converts images from (B, H, W, C) uint8 to (B, C, H, W) float32:
  1. Selectively extracts and concatenates state based on state_keys:
  1. Renames features to LeRobot convention:
  • observation.camera_obs.<name>observation.images.<name>
  • observation.policyobservation.state

Configuration

tuple[str, ...]
required
Keys to extract from obs["policy"] and concatenate into state vector. Order matters!
tuple[str, ...]
required
Camera names to extract from obs["camera_obs"]

Custom Environment Processor

Create a processor for your custom environment:

Handling Multi-Dimensional States

Some environments provide multi-dimensional state arrays that need flattening:

Testing Environment Processors

Always test with realistic environment data:

Integration with Environments

Use environment processors in your gym environment:

Best Practices

1. Match Environment Conventions

Understand your environment’s data format:

2. Preserve Batch Dimension

Always maintain batch dimension:

3. Document State Ordering

Clearly document concatenation order:

API Reference

LiberoProcessorStep

See lerobot/processor/env_processor.py:26
(observation) -> dict
Process LIBERO observation to LeRobot format

IsaaclabArenaProcessorStep

See lerobot/processor/env_processor.py:156
tuple[str, ...]
Keys to extract from policy observation
tuple[str, ...]
Camera names to extract from camera observation
(observation) -> dict
Process Isaac Lab observation to LeRobot format