{"id":29869506,"url":"https://github.com/zhexuany/coscene-converter","last_synced_at":"2025-07-30T16:41:32.846Z","repository":{"id":305496321,"uuid":"1023036695","full_name":"zhexuany/coscene-converter","owner":"zhexuany","description":"A tool for converting open-x-embodiment dataset to MCAP and upload data to coScene data platform. ","archived":false,"fork":false,"pushed_at":"2025-07-20T11:54:11.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T13:22:12.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhexuany.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-20T11:48:17.000Z","updated_at":"2025-07-20T11:54:14.000Z","dependencies_parsed_at":"2025-07-20T13:32:24.307Z","dependency_job_id":null,"html_url":"https://github.com/zhexuany/coscene-converter","commit_stats":null,"previous_names":["zhexuany/coscene-converter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zhexuany/coscene-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhexuany%2Fcoscene-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhexuany%2Fcoscene-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhexuany%2Fcoscene-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhexuany%2Fcoscene-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhexuany","download_url":"https://codeload.github.com/zhexuany/coscene-converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhexuany%2Fcoscene-converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267900594,"owners_count":24163011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-30T16:41:25.650Z","updated_at":"2025-07-30T16:41:32.820Z","avatar_url":"https://github.com/zhexuany.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coScene Converter\n\nTools for converting robotics datasets to MCAP format for use with coScene and Foxglove.\n\n## Overview\n\ncoScene Converter is a Python library that converts robotics datasets, particularly from the Open-X-Embodiment collection, into MCAP format for visualization in coScene. The tool provides a flexible schema-based approach to handle different dataset structures and formats.\n\n## Features\n\n- Conversion of Open-X-Embodiment datasets to MCAP format\n- Support for images, depth data, transforms, and robot state\n- Integration with coScene for interactive visualization\n- Extensible schema system for supporting different dataset formats\n- Dataset structure exploration tools\n\n## Installation\n\n```bash\npip install -e .\n```\n\n## Usage\n\n### Converting a Dataset\n\nTo convert a dataset episode to MCAP format:\n\n```bash\npython -m cli --dataset berkeley_autolab_ur5 --episode 1\n```\n\nOptions:\n- `--dataset DATASET`: Dataset name to convert (e.g., berkeley_autolab_ur5, stanford_robocook_converted_externally_to_rlds)\n- `--episode EPISODE`: Episode number to convert (default: 1)\n- `--batch`: Process multiple episodes in batch mode\n- `--start START`: Start episode number for batch mode (default: 1)\n- `--end END`: End episode number for batch mode (default: 10)\n- `--output-dir OUTPUT_DIR`: Output directory for generated MCAP files (default: mcap_files)\n- `--live`: Show live preview during conversion\n- `--rate RATE`: Playback rate in Hz for live preview (default: 5.0)\n- `--verbose`: Enable verbose output with step information\n\n### Exploring Dataset Structure\n\nTo explore the structure of a dataset before conversion:\n\n```bash\npython scripts/dataset_structure_explorer.py --dataset stanford_robocook_converted_externally_to_rlds\n```\n\n**Important**: The dataset name must exactly match a registered dataset name in the Open-X-Embodiment collection, as these names are used to load datasets from `tensorflow_datasets`. You can verify registered dataset names in the [Open-X-Embodiment Dataset Spreadsheet](https://docs.google.com/spreadsheets/d/1rPBD77tk60AEIGZrGSODwyyzs5FgCU9Uz3h-3_t2A9g/edit?gid=0) under the \"Registered Dataset Name\" column.\n\nThis will generate a JSON file with the dataset structure that can be used to create a new schema. Since the nature of different datasets varies significantly, it's essential to understand the underlying meaning of each dataset's fields and structure to create an appropriate schema.\n\n## Creating a New Dataset Schema\n\nTo add support for a new dataset:\n\n1. Run the dataset structure explorer to understand the dataset format:\n   ```bash\n   python scripts/dataset_structure_explorer.py --dataset your_dataset_name\n   ```\n   Remember that `your_dataset_name` must exactly match a registered dataset name in the Open-X-Embodiment collection.\n\n2. Analyze the generated JSON structure carefully to understand:\n   - The semantic meaning of each field in the dataset\n   - The relationships between different data elements\n   - How the dataset represents robot state, sensor data, and actions\n\n3. Create a new schema file in `common/dataset_schemas/your_dataset_name.py`\n\n4. Implement the schema class following the pattern in existing schemas like `berkeley_autolab_ur5.py` or `stanford_robocook_converted_externally_to_rlds.py`\n\n5. Your schema class should:\n   - Inherit from `DefaultSchema` or `DatasetSchema`\n   - Implement `setup_channels()` to define the channels for your dataset\n   - Implement `process_step()` to process each step of data\n   - Optionally implement `print_step_info()` for debugging\n\n## Project Structure\n\n- `cli.py`: Command-line interface for the converter\n- `common/`: Common utilities and schema definitions\n  - `schemas.py`: Base schema classes and common schema definitions\n  - `dataset_schemas/`: Dataset-specific schema implementations\n- `open_x_embodiment/`: Tools for working with Open-X-Embodiment datasets\n  - `data_loader.py`: Functions for loading datasets\n  - `converter.py`: Functions for converting datasets to MCAP\n- `scripts/`: Utility scripts\n  - `dataset_structure_explorer.py`: Tool for exploring dataset structures\n\n## Contributing\n\nTo add support for a new dataset:\n\n1. Explore the dataset structure using the explorer tool\n2. Create a new schema file based on the existing examples\n3. Test your schema with the converter\n\n## License\n\nApache 2 License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhexuany%2Fcoscene-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhexuany%2Fcoscene-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhexuany%2Fcoscene-converter/lists"}