Data Preparation
Convert rosbags into LeRobot v3 datasets.
Use the collected Roban whole-body task rosbags to convert them into a LeRobot v3 dataset in the main LeTools-Learning environment. The collected data must include head images as well as whole-body states and actions; offline trajectory CSVs recorded via teleoperation cannot be used as a substitute.
Run the following commands from the root of the LeTools-Learning repository, and adjust the paths, task description, and camera topics to match your actual data.
Configuration
Edit configs/data/RobanRosbag2Lerobot.yaml:
rosbag:
mode: normal
rosbag_dir: /path/to/roban_rosbags
target_dir: /path/to/roban_output # 最终数据集在 target_dir/lerobot
parallel: false
parallel_workers: 4
dataset:
platform_type: roban
task_description: "robot manipulation"
train_hz: 50
main_timeline: head_cam_h
main_timeline_fps: 60
sample_drop: 10
resize:
width: 640
height: 480
topics:
camera: /cam_h/color/image_raw/compressedKey conventions:
| Field | Requirement |
|---|---|
platform_type | Must be roban |
train_hz | Recommended to keep 50, aligned with the robot's action control frequency |
When the main camera fps does not divide evenly into the training frequency
The conversion script resamples by timestamp.
Running
python kuavo_data/roban_data/CvtRosbag2Lerobot.pyVerifying the Output
The converted LeRobot v3 dataset should contain:
observation.state float32[23]
action float32[32]
observation.images.head_cam_h image/videoBefore training, check that the dimensions, time alignment, and head images are correct; if anything does not match, fix the data first and do not proceed with training. The /cam_h/color/image_raw/compressed above is an example topic for rosbag conversion; the live camera topic used at inference time must be configured separately and should not be mixed in directly.
See the LETools whole-body VLA tutorial for the full parameter reference.