-
Notifications
You must be signed in to change notification settings - Fork 2k
Lerobot dataset filehandler #2802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ashwinvkNV
wants to merge
14
commits into
main
Choose a base branch
from
ashwinvk/lerobot_so_100
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,886
−46
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ashwinvkNV
commented
Jul 7, 2025
@@ -37,7 +37,7 @@ def open(self, file_path: str, mode: str = "r"): | |||
self._hdf5_data_group = self._hdf5_file_stream["data"] | |||
self._demo_count = len(self._hdf5_data_group) | |||
|
|||
def create(self, file_path: str, env_name: str = None): | |||
def create(self, file_path: str, env_name: str | None = None, env = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nvcyc for viz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
def create(self, file_path: str, env_name: str | None = None, env = None): | |
def create(self, file_path: str, env_name: str | None = None, env: ManagerBasedEnv | None = None): |
nvcyc
reviewed
Jul 8, 2025
@@ -28,7 +28,7 @@ def open(self, file_path: str, mode: str = "r"): | |||
return NotImplementedError | |||
|
|||
@abstractmethod | |||
def create(self, file_path: str, env_name: str = None): | |||
def create(self, file_path: str, env_name: str | None = None, env = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
def create(self, file_path: str, env_name: str | None = None, env = None): | |
def create(self, file_path: str, env_name: str | None = None, env: ManagerBasedEnv | None = None): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LeRobot Dataset File Handler
Overview
The LeRobot Dataset File Handler (
LeRobotDatasetFileHandler
) is a configuration-driven system for automatically extracting and recording episode data from Isaac Lab environments to the LeRobot dataset format. It provides a seamless bridge between Isaac Lab's manager-based environments and the HuggingFace LeRobot ecosystem, enabling efficient dataset creation for Vision-Language-Action (VLA) model training.Architecture
Core Components
Configuration System (
LeRobotDatasetCfg
)Feature Extraction Engine
Data Conversion Pipeline
Dataset Management
Configuration System
LeRobotDatasetCfg Structure
Configuration Patterns
Basic Configuration
Multi-Group Observations
Video/Image Support
Feature Extraction Process
1. Environment Analysis
The handler automatically analyzes the environment's structure:
2. Action Feature Extraction
3. Observation Feature Extraction
The system processes observations based on configuration:
observation.{key}
observation.state
4. Video/Image Processing
Data Flow
Episode Recording Process
Episode Creation
Feature Schema Generation
Episode Writing
Frame-by-Frame Processing
Integration with Isaac Lab
Environment Configuration
The handler integrates seamlessly with Isaac Lab's manager-based environments:
Recording Script Integration
The
record_demos.py
script automatically detects LeRobot format:Dataset Structure
LeRobot Format Organization
Feature Naming Conventions
observation.images.{camera_position}
observation.state
observation.{obs_key}
action
episode_index
,frame_index
,timestamp
,task
Error Handling and Validation
Configuration Validation
Video Format Validation
Performance Considerations
Memory Management
Storage Optimization
Usage Examples
Basic Recording
Advanced Configuration
Dependencies and Installation
Required Dependencies
Optional Dependencies
huggingface_hub
for dataset sharinglerobot
for training pipeline integrationFuture Enhancements
Planned Features
Integration Improvements
Conclusion
The LeRobot Dataset File Handler provides a robust, configuration-driven solution for creating LeRobot-compatible datasets from Isaac Lab environments. Its automatic feature extraction, flexible configuration system, and seamless integration with the Isaac Lab ecosystem make it an essential tool for VLA model training and dataset sharing within the robotics community.
The handler's design emphasizes: