Universal robot description schema and format converters for Cyberwave
Project description
Cyberwave Robot Format
Universal robot description schema and format converters for Cyberwave.
Overview
This package provides:
- Universal Schema: A canonical representation for robotic assets (
CommonSchema) - Format Importers: Parse URDF, MJCF into the universal schema
- Format Exporters: Export universal schema to URDF, MJCF
- Validation: Schema validation and consistency checks
Structure
cyberwave_robot_format/
├── schema.py # Core schema definitions (CommonSchema, Link, Joint, etc.)
├── core.py # Base classes for parsers/exporters
├── urdf/ # URDF parser and exporter
├── mjcf/ # MJCF (MuJoCo) parser and exporter
├── mesh/ # Mesh processing utilities
├── math_utils.py # Math utilities (Vector3, Quaternion, etc.)
└── utils.py # General utilities
Usage
Parse URDF
from cyberwave_robot_format import CommonSchema
from cyberwave_robot_format.urdf import URDFParser
# Parse a URDF file
parser = URDFParser()
schema = parser.parse("path/to/robot.urdf")
# Validate the schema
issues = schema.validate()
if issues:
print("Validation issues:", issues)
# Access robot components
for link in schema.links:
print(f"Link: {link.name}, mass: {link.mass}")
for joint in schema.joints:
print(f"Joint: {joint.name}, type: {joint.type}")
Parse MJCF (MuJoCo)
from cyberwave_robot_format.mjcf import MJCFParser
# Parse a MuJoCo XML file
parser = MJCFParser()
schema = parser.parse("path/to/robot.xml")
# Access actuators
for actuator in schema.actuators:
print(f"Actuator: {actuator.name}, joint: {actuator.joint}")
Export to MJCF
from cyberwave_robot_format.mjcf import MJCFExporter
# Export schema to MuJoCo format
exporter = MJCFExporter()
exporter.export(schema, "output/robot.xml")
Cloud-Native Scene Export
Export complete scenes with meshes to ZIP files, supporting cloud storage and in-memory conversion:
from cyberwave_robot_format.mjcf import export_mujoco_zip_cloud
from cyberwave_robot_format.urdf import export_urdf_zip_cloud
# Cloud-safe resolver with in-memory DAE→OBJ conversion
def s3_resolver(filename: str) -> tuple[str, bytes] | None:
"""Download from S3 and convert in memory."""
mesh_bytes = s3.get_object(Bucket='meshes', Key=filename)['Body'].read()
if filename.endswith('.dae'):
obj_bytes = convert_dae_to_obj_in_memory(mesh_bytes)
return (filename.replace('.dae', '.obj'), obj_bytes)
return (Path(filename).name, mesh_bytes)
# Export with cloud resolver (mesh_resolver is required)
mujoco_zip = export_mujoco_zip_cloud(
schema,
s3_resolver,
strict_missing_meshes=True # Fail fast on missing meshes
)
urdf_zip = export_urdf_zip_cloud(schema, s3_resolver)
Development
Install in editable mode:
pip install -e .
Run tests:
pytest
Acknowledgments
This project incorporates portions of code from [https://github.com/thanhndv212/robot_format_converter](Robot Format Converter) (Apache 2.0 licensed).
Original repository: https://github.com/thanhndv212/robot_format_converter
We thank the original authors for their initial work.
@software{robot_format_converter,
author = {Nguyen, Thanh},
title = {Robot Format Converter: Universal Robot Description Format Converter},
year = {2025},
url = {https://github.com/thanhndv212/robot_format_converter},
version = {1.0.0}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyberwave_robot_format-0.1.2.tar.gz.
File metadata
- Download URL: cyberwave_robot_format-0.1.2.tar.gz
- Upload date:
- Size: 64.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8dadadd3a139849df50ea7d79fa86b7abbcebb00678aae6444dad2de9767bd8
|
|
| MD5 |
383b9c2e854f107da0194058c2c26086
|
|
| BLAKE2b-256 |
5558715e0550c60b759df997b34d425bad7e300282a00d8fc3f756c0fbca27ee
|
Provenance
The following attestation bundles were made for cyberwave_robot_format-0.1.2.tar.gz:
Publisher:
release-pypi.yml on cyberwave-os/cyberwave-robot-format
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberwave_robot_format-0.1.2.tar.gz -
Subject digest:
f8dadadd3a139849df50ea7d79fa86b7abbcebb00678aae6444dad2de9767bd8 - Sigstore transparency entry: 962650819
- Sigstore integration time:
-
Permalink:
cyberwave-os/cyberwave-robot-format@01dabd48968f7c0c4e0f4624c1d5a0c1c72fc4e9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@01dabd48968f7c0c4e0f4624c1d5a0c1c72fc4e9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cyberwave_robot_format-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cyberwave_robot_format-0.1.2-py3-none-any.whl
- Upload date:
- Size: 62.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bde8301d869379721d61d4584438f6c19a9b56518e9acd25412b9ad5be88548
|
|
| MD5 |
8cc4d7d0bbaf41e9372467a516094e8d
|
|
| BLAKE2b-256 |
1326338e9d1c9004b10bf64f59c6d045085d34d8e431ef4fc4e1da21f6c0d18e
|
Provenance
The following attestation bundles were made for cyberwave_robot_format-0.1.2-py3-none-any.whl:
Publisher:
release-pypi.yml on cyberwave-os/cyberwave-robot-format
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberwave_robot_format-0.1.2-py3-none-any.whl -
Subject digest:
7bde8301d869379721d61d4584438f6c19a9b56518e9acd25412b9ad5be88548 - Sigstore transparency entry: 962650824
- Sigstore integration time:
-
Permalink:
cyberwave-os/cyberwave-robot-format@01dabd48968f7c0c4e0f4624c1d5a0c1c72fc4e9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@01dabd48968f7c0c4e0f4624c1d5a0c1c72fc4e9 -
Trigger Event:
push
-
Statement type: