ODIN Python SDK
Open Data for Intelligent Robotics - The standard library for robot learning data.
ODIN provides a unified format and tooling for robot learning datasets. It supports recording, loading, validating, converting, and sharing robotics data.
Installation
pip install odin-robotics
With optional dependencies:
# For PyTorch integration
pip install odin-robotics[torch]
# For JAX integration
pip install odin-robotics[jax]
# For all format converters
pip install odin-robotics[all]
Quick Start
Recording Data
from odin import Recorder
# Create a recorder
recorder = Recorder(name="my_robot_task", robot="franka_panda")
# Record episodes
with recorder.episode() as ep:
for step_data in collect_data():
ep.record(
observation={
"image": camera_image,
"joint_pos": joint_positions,
},
action=commanded_action,
reward=reward,
done=done,
)
# Save the dataset
dataset = recorder.to_dataset()
dataset.save("./my_dataset")
Loading Data
from odin import Dataset
# Load a dataset
dataset = Dataset.load("./my_dataset")
print(f"Dataset: {dataset.name}")
print(f"Episodes: {dataset.num_episodes}")
print(f"Total steps: {dataset.num_steps}")
# Iterate over episodes
for episode in dataset:
print(f"Episode {episode.episode_id}: {len(episode)} steps")
for step in episode:
obs = step.observation
action = step.action
reward = step.reward
PyTorch DataLoader
from odin.torch import OdinDataset
from torch.utils.data import DataLoader
torch_dataset = OdinDataset("./my_dataset")
loader = DataLoader(torch_dataset, batch_size=32, shuffle=True)
for batch in loader:
observations = batch["observation"]
actions = batch["action"]
# Train your model...
Hub Integration
from odin.hub import download, upload, search
# Download a dataset from ODIN Hub
dataset = download("lerobot/pusht", "./local_path")
# Search for datasets
results = search(query="manipulation", robot="franka")
for ds in results:
print(f"{ds['name']}: {ds['num_episodes']} episodes")
# Upload your dataset
upload(dataset, "your-username/dataset-name")
CLI Usage
ODIN provides a comprehensive CLI for dataset operations:
# Show dataset information
odin info ./my_dataset
# Validate dataset structure
odin validate ./my_dataset --level strict
# Import from other formats
odin import lerobot lerobot/pusht -o ./pusht
odin import rosbag recording.bag -o ./rosbag_dataset
# Export to other formats
odin export lerobot ./my_dataset -o ./lerobot_output
odin export hdf5 ./my_dataset -o ./output.h5
# Split dataset for training
odin split ./my_dataset --train-ratio 0.8 -o ./splits/
# Merge multiple datasets
odin merge dataset1 dataset2 merged_output
# Batch import from multiple sources
odin batch import -o ./all_datasets -s lerobot -s rlds --workers 8
# Search and download from Hub
odin search --query "manipulation" --robot "franka"
odin download lerobot/pusht ./local_path
Supported Formats
Import From
- LeRobot - HuggingFace LeRobot v2 format
- RLDS/TFDS - TensorFlow Datasets format (Open X-Embodiment)
- ROS Bags - ROS 1/2 bag files
- MCAP - MCAP recording files
- HDF5 - Generic HDF5 datasets
- D4RL/Minari - RL benchmark datasets
- robomimic - robomimic HDF5 format
- LIBERO - LIBERO benchmark datasets
- CALVIN - CALVIN benchmark datasets
- Zarr - Zarr array format
Export To
- LeRobot - Push to HuggingFace Hub
- HDF5 - Standard HDF5 format
- Parquet - Apache Parquet format
- MCAP - MCAP recording format
- RLDS - TensorFlow Datasets format
Dataset Schema
ODIN datasets are self-describing with embedded schema:
from odin import Schema, FieldSpec
schema = Schema(
observation={
"image": FieldSpec.image(480, 640, 3),
"depth": FieldSpec.depth_image(480, 640),
"joint_pos": FieldSpec.array("float32", 7),
"gripper": FieldSpec.float(),
},
action={
"joint_velocity": FieldSpec.array("float32", 7),
"gripper_action": FieldSpec.float(),
},
)
Cloud Streaming
Stream large datasets without downloading:
from odin.cloud import CloudDataset
# Stream from ODIN Hub
dataset = CloudDataset("stanford/droid-100k")
# Iterate without downloading full dataset
for episode in dataset.episodes():
for step in episode:
process(step.observation)
# Random batch sampling for training
batch = dataset.sample_batch(32)
Quality Validation
from odin import validate_dataset
report = validate_dataset("./my_dataset", level="strict")
print(f"Quality score: {report.overall_score:.2f}")
for issue in report.issues:
print(f" [{issue.severity}] {issue.message}")
Research Paper Integration
from odin import ResearchPaperManager
manager = ResearchPaperManager()
# Find papers related to a dataset
papers = manager.search_papers("robot manipulation", robotics_only=True)
for paper in papers[:5]:
print(f"{paper.title} ({paper.year})")
Performance
- Efficient Storage: MessagePack serialization with Zstandard compression (3-10x compression)
- Streaming Access: Process terabyte-scale datasets without loading into memory
- Parallel Loading: Multi-threaded data loading for training
Documentation
Full documentation is available at odin-hub.dev/docs.
Contributing
Contributions are welcome! Please see our Contributing Guide.
License
Apache-2.0
Links
- ODIN Hub - Dataset hosting and discovery
- Documentation
- GitHub
- PyPI
- Rust SDK
Metadata
Release files for odin-robotics 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odin_robotics-0.1.0.tar.gz | 360.8 kB | Without provenance | Details for odin_robotics-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odin_robotics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for odin_robotics-0.1.0-py3-none-any.whl |
Total release size: 607.5 kB
Release files / odin_robotics-0.1.0.tar.gz
| Download URL | odin_robotics-0.1.0.tar.gz |
|---|---|
| Size | 360.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89ea9465048fa071b9ae1bbc946680c975ab703018db97b63ce5c0bd9b3b7bd7
|
|
BLAKE2b-256 checksum How to use checksums |
7f3800bef5168c0d2eda8f56d67a82954c43f6fa706979d1deff07433b4f8b4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / odin_robotics-0.1.0-py3-none-any.whl
| Download URL | odin_robotics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 246.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b5bcad487db8593b48de40d3428f793b3fc15409fbb1d00db7218d63f5180b3
|
|
BLAKE2b-256 checksum How to use checksums |
f07897f69ebccb0749f8a5a21d6f26f63154a3b31dd95f32d99cc54f605a89d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for odin-robotics 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.