Adding converstion script from ros format to lerobot format#70
Merged
akshay18iitg merged 14 commits intomainfrom Feb 4, 2026
Merged
Adding converstion script from ros format to lerobot format#70akshay18iitg merged 14 commits intomainfrom
akshay18iitg merged 14 commits intomainfrom
Conversation
shuheng-liu
requested changes
Jan 14, 2026
Collaborator
shuheng-liu
left a comment
There was a problem hiding this comment.
Some comments and questions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a conversion script to transform ROS bag data (in .mcap format) into LeRobot dataset v2.1 format. Currently supports joint states with plans to add support for various sensors in the future.
Changes:
- Added ROS bag to LeRobot conversion script with timestamp synchronization
- Defined configuration types (ROSFeature, RosToLeRobotConfig) for feature mapping
- Added rosbags dependency for MCAP file reading
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/opentau/scripts/convert_ros_to_lerobot.py | Main conversion script implementing timestamp synchronization and data extraction from ROS bags |
| src/opentau/configs/types.py | Added ROSFeature dataclass for ROS-to-LeRobot feature mapping |
| src/opentau/configs/ros2lerobot.py | Configuration dataclass for conversion settings including paths, FPS, and feature mappings |
| pyproject.toml | Added rosbags dependency for MCAP file processing |
| configs/examples/ros2lerobot.json | Example configuration file demonstrating joint state conversion setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WilliamYue37
requested changes
Jan 14, 2026
…f lerobot feature
shuheng-liu
requested changes
Feb 2, 2026
shuheng-liu
previously approved these changes
Feb 4, 2026
shuheng-liu
approved these changes
Feb 4, 2026
WilliamYue37
approved these changes
Feb 4, 2026
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
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.
What this does
The PR adds a script to convert the data collected on robot in .mcap format using ros bags to lerobot dataset v2.1 format.
Right now, it only supports joint states. In future it will also support various sensors.
How it was tested
Was able to collect the data and visualzie it in the visualizer using lerobot format
Examples:
Added ros2lerobot.py script in src/opentau/scripts to convert the data collected on robot in .mcap format using ros bags to lerobot dataset v2.1 format.
Defined config to support user specified fps, input directory, output dir and mapping between features and topics
Examples:
python3 src/opentau/scripts/convert_ros_to_lerobot.py --config_path=${workspaceFolder}/configs/dev/ros2lerobot.json
Note: Before submitting this PR, please read the contributor guideline.
Checklist