AIC Cable Insert SFT OpenPI Pi0.5 UR5e
์ด ์ ์ฅ์๋ AIC cable insertion ์์ ์ ์ํด UR5e ๊ธฐ์ค์ผ๋ก ํ์ตํ RLinf/OpenPI Pi0.5 SFT checkpoint๋ฅผ ์ ๊ณตํฉ๋๋ค.
ํ์ต ๋ฐ inference์ ์ฌ์ฉํ๋ RLinf OpenPI config ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
pi05_aic_cable_insert_ur5e
ํ์ํ RLinf PR
์ด checkpoint๋ฅผ ์คํํ๋ ค๋ฉด RLinf์ AIC UR5e OpenPI config, policy transform, normalization stats, inference script๊ฐ ํ์ํฉ๋๋ค.
ํด๋น ์ต์ ๋ณ๊ฒฝ์ ์๋ PR์ ์์ต๋๋ค.
https://github.com/Phy-Lab-aic/RLinf/pull/6
PR์ด merge๋๊ธฐ ์ ์๋ PR branch๋ฅผ checkoutํด์ ์คํํฉ๋๋ค.
git clone https://github.com/Phy-Lab-aic/RLinf.git
cd RLinf
git fetch origin pull/6/head:aic-ur5e-openpi-inference
git checkout aic-ur5e-openpi-inference
RLinf ํ๊ฒฝ ์ค๋น
RLinf venv ๊ธฐ์ค์ผ๋ก ์คํํฉ๋๋ค.
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[embodied,openpi]"
์ด๋ฏธ RLinf venv๊ฐ ์ค๋น๋์ด ์๋ค๋ฉด source .venv/bin/activate๋ง ์ํํ๋ฉด ๋ฉ๋๋ค.
Checkpoint ๊ตฌ์ฑ
๊ฐ checkpoint๋ ๋ณ๋ ํด๋๋ก ์ ์ฅ๋์ด ์์ต๋๋ค.
global_step_2208
global_step_4416
global_step_6624
global_step_8832
global_step_11040
๊ธฐ๋ณธ inference checkpoint๋ global_step_11040์
๋๋ค.
๊ฐ checkpoint ํด๋์๋ ๋ค์ ํ์ผ๋ค์ด ํฌํจ๋์ด ์์ต๋๋ค.
actor/model_state_dict/full_weights.pt
actor/dcp_checkpoint/
Phy-lab/pretrained_dataset_v3_lerobot_v21_compat/norm_stats.json
norm_stats.json์ OpenPI ์
๋ ฅ/์ถ๋ ฅ normalization์ ํ์ํฉ๋๋ค.
์ ๋ ฅ Observation ํ์
AIC UR5e policy๋ RGB ์นด๋ฉ๋ผ 3๊ฐ์ 7D state๋ฅผ ์ ๋ ฅ์ผ๋ก ๋ฐ์ต๋๋ค.
env_obs = {
"main_images": center_rgb_image,
"wrist_images": left_or_wrist_rgb_image,
"extra_view_images": right_or_extra_rgb_image,
"states": ur5e_state_tensor,
"task_descriptions": ["Insert the SFP-to-SC cable into the target port"],
}
7D state/action ์์๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[shoulder_pan, shoulder_lift, elbow, wrist_1, wrist_2, wrist_3, gripper]
policy ์ถ๋ ฅ action chunk์ shape์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
[batch, 5, 7]
๋ง์ง๋ง ์ฐจ์์ 7๋ฒ์งธ ๊ฐ์ gripper command์ ๋๋ค.
๋ฐ๋ก ์คํ
RLinf PR branch ์์์ ์๋ ๋ช
๋ น์ ์คํํ๋ฉด Hugging Face์์ global_step_11040 checkpoint๋ฅผ ๋ด๋ ค๋ฐ๊ณ , zero image/zero state๋ก inference ๊ฒฝ๋ก๋ฅผ ํ์ธํฉ๋๋ค.
python examples/sft/aic_ur5e_openpi_inference.py \
--model-path Phy-lab/aic_cable_insert_sft_openpi_pi05_pretrained_v3_bs128_mb16_step11040 \
--checkpoint global_step_11040
๋ค๋ฅธ checkpoint๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด --checkpoint ๊ฐ์ ๋ฐ๊ฟ๋๋ค.
python examples/sft/aic_ur5e_openpi_inference.py \
--model-path Phy-lab/aic_cable_insert_sft_openpi_pi05_pretrained_v3_bs128_mb16_step11040 \
--checkpoint global_step_8832
์ค์ UR5e ์ ๋ ฅ์ผ๋ก ์คํ
ํ์ฌ UR5e 7D state๋ฅผ JSON ํ์ผ๋ก ์ค๋นํฉ๋๋ค.
[-0.49, -1.74, -1.55, -1.56, 1.88, 1.11, 0.007]
๊ทธ ๋ค์ RGB ์ด๋ฏธ์ง 3์ฅ๊ณผ state JSON์ ์ง์ ํด์ ์คํํฉ๋๋ค.
python examples/sft/aic_ur5e_openpi_inference.py \
--model-path Phy-lab/aic_cable_insert_sft_openpi_pi05_pretrained_v3_bs128_mb16_step11040 \
--checkpoint global_step_11040 \
--center-image /path/to/center.png \
--left-image /path/to/left_or_wrist.png \
--right-image /path/to/right_or_extra.png \
--state-json /path/to/ur5e_state.json
์ถ๋ ฅ์ JSON ํ์์ ๋๋ค.
{"actions": [[[... seven action values ...]]]}
PR ๋ฒ์
PR #6์ Hugging Face checkpoint๋ฅผ UR5e OpenPI inference๋ก ์คํํ๊ธฐ ์ํ ์ต์ ๋ณ๊ฒฝ๋ง ํฌํจํฉ๋๋ค. IsaacLab, Gazebo, RL runtime integration์ ํ์ PR์์ ๋ค๋ฃน๋๋ค.