MagicBot-VGA is a robot learning codebase for VLA policy training, simulation evaluation, and real-robot deployment. This repository contains the CubeV2 policy family, MagicBot_R0 experiments, RoboTwin/Libero evaluation helpers, and real-robot serving clients for Lift2 and Piper.
src/lerobot/policies/cubev2: CubeV2 policy, transforms, and model code.src/lerobot/policies/MagicBot_R0: MagicBot_R0 policy and dataset pipeline.launch/: training and finetuning entrypoints.evaluation/RoboTwin: RoboTwin 2.0 evaluation workflow.evaluation/Real_Piper: sync real-robot Piper serving and ROS1 client.evaluation/Real_Lift2: Lift2 real-robot serving and inference runtime.evaluation/Libero: Libero evaluation helpers.util_scripts/: dataset conversion, norm-stat computation, checkpoint
repacking, and submission packaging utilities.The core environment is tested with Python 3.10, CUDA 12.8, and PyTorch 2.7.1.
conda create -y -n magicbot python=3.10
conda activate magicbot
pip install --upgrade pip
conda install -c conda-forge ffmpeg=7.1.1 svt-av1 -y
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 \
--index-url https://download.pytorch.org/whl/cu128
pip install torchcodec numpy scipy transformers==4.57.1 mediapy loguru pytest omegaconf h5py
pip install -e .
For real-robot serving, also install:
pip install tyro matplotlib mediapy websockets msgpack
CubeV2 uses a patched Qwen3-VL implementation for cached inference. After
installing transformers==4.57.1, copy the repository patch into the installed
package:
TRANSFORMERS_DIR=${CONDA_PREFIX}/lib/python3.10/site-packages/transformers/
cp -r src/lerobot/policies/cubev2/transformers_replace/models ${TRANSFORMERS_DIR}
The detailed RoboTwin guide now lives in evaluation/RoboTwin/README.md.
Typical batch evaluation:
PRETRAINED_CKPT=zaleni/MagicBot-VGA-Robotwin \
QWEN3_VL_PRETRAINED_PATH=Qwen/Qwen3-VL-2B-Instruct \
QWEN3_VL_PROCESSOR_PATH=Qwen/Qwen3-VL-2B-Instruct \
COSMOS_TOKENIZER_PATH_OR_NAME=nvidia/Cosmos-Tokenizer-CI8x8 \
DISABLE_DA3_TEACHER_FOR_EVAL=true \
GPU_IDS=0,1 \
MAX_JOBS_PER_GPU=2 \
bash evaluation/RoboTwin/eval_randomized_50.sh
Piper deployment is documented in evaluation/Real_Piper/README.md.
Useful launch notes:
The Piper client supports sync inference, 7D real_piper state/action checks,
and Enter-triggered return-to-init/restart when INIT_JOINT_POSITION and
MANUAL_RESET=true are set.
Lift2 deployment docs live in evaluation/Real_Lift2/README.md.
The real-robot server code is shared by Lift2 and Piper where possible, while robot-side clients stay platform-specific.
See evaluation/Libero/README.md.
Common CubeV2 launch scripts:
launch/cubev2/cubev2_pretrain.shlaunch/cubev2/cubev2_finetune.shlaunch/cubev2/cubev2_finetune_robotwin.shlaunch/cubev2/cubev2_finetune_real_piper.shlaunch/cubev2/cubev2_finetune_real_lift2.shMagicBot_R0 launch scripts:
launch/magicbot_r0/magicbot_r0_pretrain.shlaunch/magicbot_r0/magicbot_r0_finetune_robotwin.shlaunch/magicbot_r0/magicbot_r0_finetune_real_piper.shlaunch/magicbot_r0/magicbot_r0_finetune_real_lift2.shNorm-stat utilities for real-robot delta-action models are under
launch/compute_norm/.
Depending on the model path, you may need local copies or Hugging Face repo ids for:
Qwen/Qwen3-VL-2B-Instructnvidia/Cosmos-Tokenizer-CI8x8For standard RoboTwin action evaluation with the released lightweight checkpoint,
passing DISABLE_DA3_TEACHER_FOR_EVAL=true is recommended.
MagicBot-VGA started from the excellent InternVLA framework and has since been extended for CubeV2, MagicBot_R0, real-robot deployment, and multiple evaluation workflows.
We also thank these open-source projects:
340 commits
Python
60.8%
Jupyter Notebook
26.6%
Shell
12.6%
MagicBot-VGA is a robot learning codebase for VLA policy training, simulation evaluation, and real-robot deployment. This repository contains the CubeV2 policy family, MagicBot_R0 experiments, RoboTwin/Libero evaluation helpers, and real-robot serving clients for Lift2 and Piper.
src/lerobot/policies/cubev2: CubeV2 policy, transforms, and model code.src/lerobot/policies/MagicBot_R0: MagicBot_R0 policy and dataset pipeline.launch/: training and finetuning entrypoints.evaluation/RoboTwin: RoboTwin 2.0 evaluation workflow.evaluation/Real_Piper: sync real-robot Piper serving and ROS1 client.evaluation/Real_Lift2: Lift2 real-robot serving and inference runtime.evaluation/Libero: Libero evaluation helpers.util_scripts/: dataset conversion, norm-stat computation, checkpoint
repacking, and submission packaging utilities.The core environment is tested with Python 3.10, CUDA 12.8, and PyTorch 2.7.1.
conda create -y -n magicbot python=3.10
conda activate magicbot
pip install --upgrade pip
conda install -c conda-forge ffmpeg=7.1.1 svt-av1 -y
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 \
--index-url https://download.pytorch.org/whl/cu128
pip install torchcodec numpy scipy transformers==4.57.1 mediapy loguru pytest omegaconf h5py
pip install -e .
For real-robot serving, also install:
pip install tyro matplotlib mediapy websockets msgpack
CubeV2 uses a patched Qwen3-VL implementation for cached inference. After
installing transformers==4.57.1, copy the repository patch into the installed
package:
TRANSFORMERS_DIR=${CONDA_PREFIX}/lib/python3.10/site-packages/transformers/
cp -r src/lerobot/policies/cubev2/transformers_replace/models ${TRANSFORMERS_DIR}
The detailed RoboTwin guide now lives in evaluation/RoboTwin/README.md.
Typical batch evaluation:
PRETRAINED_CKPT=zaleni/MagicBot-VGA-Robotwin \
QWEN3_VL_PRETRAINED_PATH=Qwen/Qwen3-VL-2B-Instruct \
QWEN3_VL_PROCESSOR_PATH=Qwen/Qwen3-VL-2B-Instruct \
COSMOS_TOKENIZER_PATH_OR_NAME=nvidia/Cosmos-Tokenizer-CI8x8 \
DISABLE_DA3_TEACHER_FOR_EVAL=true \
GPU_IDS=0,1 \
MAX_JOBS_PER_GPU=2 \
bash evaluation/RoboTwin/eval_randomized_50.sh
Piper deployment is documented in evaluation/Real_Piper/README.md.
Useful launch notes:
The Piper client supports sync inference, 7D real_piper state/action checks,
and Enter-triggered return-to-init/restart when INIT_JOINT_POSITION and
MANUAL_RESET=true are set.
Lift2 deployment docs live in evaluation/Real_Lift2/README.md.
The real-robot server code is shared by Lift2 and Piper where possible, while robot-side clients stay platform-specific.
See evaluation/Libero/README.md.
Common CubeV2 launch scripts:
launch/cubev2/cubev2_pretrain.shlaunch/cubev2/cubev2_finetune.shlaunch/cubev2/cubev2_finetune_robotwin.shlaunch/cubev2/cubev2_finetune_real_piper.shlaunch/cubev2/cubev2_finetune_real_lift2.shMagicBot_R0 launch scripts:
launch/magicbot_r0/magicbot_r0_pretrain.shlaunch/magicbot_r0/magicbot_r0_finetune_robotwin.shlaunch/magicbot_r0/magicbot_r0_finetune_real_piper.shlaunch/magicbot_r0/magicbot_r0_finetune_real_lift2.shNorm-stat utilities for real-robot delta-action models are under
launch/compute_norm/.
Depending on the model path, you may need local copies or Hugging Face repo ids for:
Qwen/Qwen3-VL-2B-Instructnvidia/Cosmos-Tokenizer-CI8x8For standard RoboTwin action evaluation with the released lightweight checkpoint,
passing DISABLE_DA3_TEACHER_FOR_EVAL=true is recommended.
MagicBot-VGA started from the excellent InternVLA framework and has since been extended for CubeV2, MagicBot_R0, real-robot deployment, and multiple evaluation workflows.
We also thank these open-source projects:
340 commits
Python
60.8%
Jupyter Notebook
26.6%
Shell
12.6%