How keyuanrong/cr3-lerobot works
This repository extends LeRobot for Dobot CR3 manipulation research: operators demonstrate tasks, recordings are reviewed and segmented into training datasets, policies are trained and tested in simulation, then deployed to the real arm or evaluated by replay. The README documents these capabilities and workflow; sampled source excerpts are partial, so links between broader subsystems follow documented behavior rather than inferred module calls.
Main entry points: run_remote_pi0_policy.py Remote policy client · record_drag_dataset.py Demonstration recorder · datasets LeRobot datasets · pi0_remote_policy_server.py Remote Pi0 server
Components 20
Robot data capture
- Leader-follower control
src/lerobot/robots/dobot_cr3/leader_follower_copy.py - Camera drivers
src/lerobot/cameras - Demonstration recorder
scripts/collection/record_drag_dataset.py - Raw episodes
Dataset preparation
- Review and segmentation
scripts/data_processing - LeRobot conversion
scripts/datasets/convert_drag_to_lerobot.py - Dataset manifests
scripts/datasets - LeRobot datasets
src/lerobot/datasets - Mixed sampling
src/lerobot/datasets/weighted_mixture.py
Policy learning
- Policy training
src/lerobot/scripts/lerobot_train.py - Policy models
src/lerobot/policies - Policy checkpoint
Execution and evaluation
- Remote policy client
scripts/inference/run_remote_pi0_policy.py - Remote Pi0 server
scripts/inference/pi0_remote_policy_server.py - Dobot CR3 and gripper
src/lerobot/robots/dobot_cr3 - Replay evaluation
scripts/evaluation/eval_remote_pi0_replay.py - Evaluation results
scripts/evaluation
MuJoCo simulation
- CR3 MuJoCo tools
sim/cr3_mujoco - Simulation rollouts
sim/cr3_mujoco/rollout_smolvla_in_mujoco.py
Other components
- Operator
Connections 24
- Operator → Leader-follower control: operates
- Operator → Demonstration recorder: demonstrates
- Leader-follower control → Demonstration recorder: provides control
- Camera drivers → Demonstration recorder: provides images
- Demonstration recorder → Raw episodes: records episodes
- Raw episodes → Review and segmentation: reviews and segments
- Raw episodes → LeRobot conversion: converts
- Review and segmentation → Dataset manifests: builds selections
- LeRobot conversion → LeRobot datasets: writes dataset
- Dataset manifests → LeRobot datasets: organizes sources
- LeRobot datasets → Mixed sampling: provides samples
- Mixed sampling → Policy training: feeds training
- Policy training → Policy models: trains
- Policy models → Policy checkpoint: saves weights
- Policy checkpoint → Remote Pi0 server: loads model
- Policy checkpoint → CR3 MuJoCo tools: loads policy
- CR3 MuJoCo tools → Simulation rollouts: produces rollouts
- Remote policy client → Remote Pi0 server: sends observations
- Remote Pi0 server → Remote policy client: returns actions
- Remote policy client → Dobot CR3 and gripper: commands arm
- Dobot CR3 and gripper → Remote policy client: provides state
- Remote policy client → Replay evaluation: supports replay
- Replay evaluation → Evaluation results: records evaluation
- Simulation rollouts → Evaluation results: informs evaluation