Skip to content

openvla policy intergration #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a8e37cb
openvla intergration
DelinQu Jul 4, 2024
7bed3d4
intergrate openvla policy and PR
DelinQu Jul 5, 2024
f0674e7
openvla policy intergration pull request
DelinQu Jul 6, 2024
2905379
update openvla inference scripts
xuanlinli17 Jul 28, 2024
52727f9
update readme
xuanlinli17 Jul 28, 2024
37d8fa8
Add OpenVLA metrics
xuanlinli17 Aug 18, 2024
3667e65
update readme
xuanlinli17 Aug 18, 2024
2b0ecc8
add openvla simple inference
xuanlinli17 Aug 18, 2024
2cd7aae
minor readme modification
xuanlinli17 Aug 18, 2024
8a08029
fix drawer bugs and auto params
DelinQu Dec 29, 2024
0281e63
Update README.md
DelinQu Jan 7, 2025
0936b9e
add spatialvla support, make sure transformers >= 4.47.0
DelinQu Feb 6, 2025
8e9aaaa
add spatialvla support, transformers >= 4.47.0
DelinQu Feb 6, 2025
a192b89
Update README.md
DelinQu Mar 12, 2025
32143c8
Update README.md
DelinQu Mar 24, 2025
4a5cab5
support openpi and fast
DelinQu May 8, 2025
e755709
testing gr00t
DelinQu May 8, 2025
879f73c
support gr00t🎄
DelinQu May 19, 2025
ec87a8a
Update README.md
DelinQu May 19, 2025
df102d9
add dockerfiler
DelinQu May 23, 2025
bbaa86d
add google sheet
DelinQu May 27, 2025
cdcbbae
Update README.md
DelinQu May 27, 2025
06b0cf2
Update openvla_model.py
huihanl Jun 5, 2025
710a9de
Merge pull request #16 from huihanl/main
DelinQu Jun 7, 2025
e61f531
Update main_inference.py
huihanl Jun 8, 2025
e194828
Merge pull request #18 from huihanl/main
DelinQu Jun 9, 2025
7b6cf5f
support action queue
DelinQu Jun 20, 2025
ccfe380
gr00t support action queue
DelinQu Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions scripts/openvla_bridge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
gpu_id=0
policy_model=openvla
ckpt_path="openvla/openvla-7b"

scene_name=bridge_table_1_v1
robot=widowx
rgb_overlay_path=ManiSkill2_real2sim/data/real_inpainting/bridge_real_eval_1.png
robot_init_x=0.147
robot_init_y=0.028
export DISPLAY=:1.0
# VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
# python simpler_env/main_inference.py --policy-model ${policy_model} --ckpt-path ${ckpt_path} \
# --robot ${robot} --policy-setup widowx_bridge \
# --control-freq 5 --sim-freq 500 --max-episode-steps 60 \
# --env-name PutCarrotOnPlateInScene-v0 --scene-name ${scene_name} \
# --rgb-overlay-path ${rgb_overlay_path} \
# --robot-init-x ${robot_init_x} ${robot_init_x} 1 --robot-init-y ${robot_init_y} ${robot_init_y} 1 --obj-variation-mode episode --obj-episode-range 0 24 \
# --robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1;
#
# python simpler_env/main_inference.py --policy-model ${policy_model} --ckpt-path ${ckpt_path} \
# --robot ${robot} --policy-setup widowx_bridge \
# --control-freq 5 --sim-freq 500 --max-episode-steps 60 \
# --env-name StackGreenCubeOnYellowCubeBakedTexInScene-v0 --scene-name ${scene_name} \
# --rgb-overlay-path ${rgb_overlay_path} \
# --robot-init-x ${robot_init_x} ${robot_init_x} 1 --robot-init-y ${robot_init_y} ${robot_init_y} 1 --obj-variation-mode episode --obj-episode-range 0 24 \
# --robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1;
#
# python simpler_env/main_inference.py --policy-model ${policy_model} --ckpt-path ${ckpt_path} \
# --robot ${robot} --policy-setup widowx_bridge \
# --control-freq 5 --sim-freq 500 --max-episode-steps 60 \
# --env-name PutSpoonOnTableClothInScene-v0 --scene-name ${scene_name} \
# --rgb-overlay-path ${rgb_overlay_path} \
# --robot-init-x ${robot_init_x} ${robot_init_x} 1 --robot-init-y ${robot_init_y} ${robot_init_y} 1 --obj-variation-mode episode --obj-episode-range 0 24 \
# --robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1;


scene_name=bridge_table_1_v2
robot=widowx_sink_camera_setup
rgb_overlay_path=ManiSkill2_real2sim/data/real_inpainting/bridge_sink.png
robot_init_x=0.127
robot_init_y=0.06

python simpler_env/main_inference.py --policy-model ${policy_model} --ckpt-path ${ckpt_path} \
--robot ${robot} --policy-setup widowx_bridge \
--control-freq 5 --sim-freq 500 --max-episode-steps 120 \
--env-name PutEggplantInBasketScene-v0 --scene-name ${scene_name} \
--rgb-overlay-path ${rgb_overlay_path} \
--robot-init-x ${robot_init_x} ${robot_init_x} 1 --robot-init-y ${robot_init_y} ${robot_init_y} 1 --obj-variation-mode episode --obj-episode-range 0 24 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1;

82 changes: 82 additions & 0 deletions scripts/openvla_drawer_variant_agg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# shader_dir=rt means that we turn on ray-tracing rendering; this is quite crucial for the open / close drawer task as policies often rely on shadows to infer depth
declare -a ckpt_paths=(
"openvla/openvla-7b"
)

declare -a env_names=(
OpenTopDrawerCustomInScene-v0
OpenMiddleDrawerCustomInScene-v0
OpenBottomDrawerCustomInScene-v0
CloseTopDrawerCustomInScene-v0
CloseMiddleDrawerCustomInScene-v0
CloseBottomDrawerCustomInScene-v0
)

EXTRA_ARGS="--enable-raytracing"


# base setup
scene_name=frl_apartment_stage_simple

EvalSim() {
echo ${ckpt_path} ${env_name}

python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name ${scene_name} \
--robot-init-x 0.65 0.85 3 --robot-init-y -0.2 0.2 3 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0.0 0.0 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
${EXTRA_ARGS}
}


for ckpt_path in "${ckpt_paths[@]}"; do
for env_name in "${env_names[@]}"; do
EvalSim
done
done


# backgrounds

declare -a scene_names=(
"modern_bedroom_no_roof"
"modern_office_no_roof"
)

for scene_name in "${scene_names[@]}"; do
for ckpt_path in "${ckpt_paths[@]}"; do
for env_name in "${env_names[@]}"; do
EXTRA_ARGS="--additional-env-build-kwargs shader_dir=rt"
EvalSim
done
done
done


# lightings
scene_name=frl_apartment_stage_simple

for ckpt_path in "${ckpt_paths[@]}"; do
for env_name in "${env_names[@]}"; do
EXTRA_ARGS="--additional-env-build-kwargs shader_dir=rt light_mode=brighter"
EvalSim
EXTRA_ARGS="--additional-env-build-kwargs shader_dir=rt light_mode=darker"
EvalSim
done
done


# new cabinets
scene_name=frl_apartment_stage_simple

for ckpt_path in "${ckpt_paths[@]}"; do
for env_name in "${env_names[@]}"; do
EXTRA_ARGS="--additional-env-build-kwargs shader_dir=rt station_name=mk_station2"
EvalSim
EXTRA_ARGS="--additional-env-build-kwargs shader_dir=rt station_name=mk_station3"
EvalSim
done
done
132 changes: 132 additions & 0 deletions scripts/openvla_drawer_visual_matching.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# shader_dir=rt means that we turn on ray-tracing rendering; this is quite crucial for the open / close drawer task as policies often rely on shadows to infer depth
declare -a ckpt_paths=(
"openvla/openvla-7b"
)

declare -a env_names=(
OpenTopDrawerCustomInScene-v0
OpenMiddleDrawerCustomInScene-v0
OpenBottomDrawerCustomInScene-v0
CloseTopDrawerCustomInScene-v0
CloseMiddleDrawerCustomInScene-v0
CloseBottomDrawerCustomInScene-v0
)

# URDF variations
declare -a urdf_version_arr=("recolor_cabinet_visual_matching_1" "recolor_tabletop_visual_matching_1" "recolor_tabletop_visual_matching_2" None)

for urdf_version in "${urdf_version_arr[@]}"; do

EXTRA_ARGS="--enable-raytracing --additional-env-build-kwargs station_name=mk_station_recolor light_mode=simple disable_bad_material=True urdf_version=${urdf_version}"

EvalOverlay() {
# A0
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.644 0.644 1 --robot-init-y -0.179 -0.179 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 -0.03 -0.03 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_a0.png \
${EXTRA_ARGS}

# A1
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.765 0.765 1 --robot-init-y -0.182 -0.182 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 -0.02 -0.02 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_a1.png \
${EXTRA_ARGS}

# A2
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.889 0.889 1 --robot-init-y -0.203 -0.203 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 -0.06 -0.06 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_a2.png \
${EXTRA_ARGS}

# B0
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.652 0.652 1 --robot-init-y 0.009 0.009 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_b0.png \
${EXTRA_ARGS}

# B1
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.752 0.752 1 --robot-init-y 0.009 0.009 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_b1.png \
${EXTRA_ARGS}

# B2
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.851 0.851 1 --robot-init-y 0.035 0.035 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_b2.png \
${EXTRA_ARGS}

# C0
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.665 0.665 1 --robot-init-y 0.224 0.224 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 0 0 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_c0.png \
${EXTRA_ARGS}

# C1
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.765 0.765 1 --robot-init-y 0.222 0.222 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 -0.025 -0.025 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_c1.png \
${EXTRA_ARGS}

# C2
python simpler_env/main_inference.py --policy-model openvla --ckpt-path ${ckpt_path} \
--robot google_robot_static \
--control-freq 3 --sim-freq 513 --max-episode-steps 113 \
--env-name ${env_name} --scene-name dummy_drawer \
--robot-init-x 0.865 0.865 1 --robot-init-y 0.222 0.222 1 \
--robot-init-rot-quat-center 0 0 0 1 --robot-init-rot-rpy-range 0 0 1 0 0 1 -0.025 -0.025 1 \
--obj-init-x-range 0 0 1 --obj-init-y-range 0 0 1 \
--rgb-overlay-path ./ManiSkill2_real2sim/data/real_inpainting/open_drawer_c2.png \
${EXTRA_ARGS}
}


for ckpt_path in "${ckpt_paths[@]}"; do
for env_name in "${env_names[@]}"; do
EvalOverlay
done
done



done
Loading