init commit

This commit is contained in:
zyhe
2026-03-16 11:44:10 +00:00
commit 94384a93c9
552 changed files with 363038 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
#!/bin/bash
# Download assets from HuggingFace.
# Usage:
# bash scripts/download_assets.sh [OPTIONS]
#
# Options:
# --min Download only required scene assets (for quick testing)
# --full Download all scene assets including all robots and tasks (default)
# --with-curobo Also download CuRobo package
# --with-drake Also download panda_drake package
# --local-dir DIR Where to save (default: current directory)
#
# Examples:
# bash scripts/download_assets.sh --min
# bash scripts/download_assets.sh --full --with-curobo --with-drake
# bash scripts/download_assets.sh --min --with-curobo --local-dir /data/assets
set -e
REPO_ID="InternRobotics/InternData-A1"
REPO_TYPE="dataset"
ASSET_PREFIX="InternDataAssets"
MODE="full"
LOCAL_DIR="."
WITH_CUROBO=false
WITH_DRAKE=false
while [[ $# -gt 0 ]]; do
case "$1" in
--min) MODE="min"; shift ;;
--full) MODE="full"; shift ;;
--with-curobo) WITH_CUROBO=true; shift ;;
--with-drake) WITH_DRAKE=true; shift ;;
--local-dir) LOCAL_DIR="$2"; shift 2 ;;
*) echo "Unknown option: $1"; exit 1 ;;
esac
done
info() { echo -e "\033[32m[INFO]\033[0m $*"; }
download() {
info "Downloading $2 ..."
huggingface-cli download "$REPO_ID" --repo-type "$REPO_TYPE" --include "$1" --local-dir "$LOCAL_DIR"
}
# --- Scene assets: required (both modes) ---
info "========== Downloading required scene assets =========="
REQUIRED_DIRS=("background_textures" "envmap_lib" "floor_textures" "table_textures" "table0")
for dir in "${REQUIRED_DIRS[@]}"; do
download "${ASSET_PREFIX}/assets/${dir}/*" "$dir"
done
download "${ASSET_PREFIX}/assets/table_info.json" "table_info.json"
# --- Scene assets: full only (all robots + all tasks) ---
if [[ "$MODE" == "full" ]]; then
info "========== Downloading all robots and tasks =========="
for robot in lift2 franka frankarobotiq split_aloha_mid_360 G1_120s; do
download "${ASSET_PREFIX}/assets/${robot}/*" "robot: ${robot}"
done
for task in basic art long_horizon pick_and_place; do
download "${ASSET_PREFIX}/assets/${task}/*" "task: ${task}"
done
fi
# --- CuRobo ---
if [[ "$WITH_CUROBO" == true ]]; then
info "========== Downloading CuRobo =========="
download "${ASSET_PREFIX}/curobo/*" "curobo"
fi
# --- panda_drake ---
if [[ "$WITH_DRAKE" == true ]]; then
info "========== Downloading panda_drake =========="
download "${ASSET_PREFIX}/panda_drake/*" "panda_drake"
fi
info "Done! (mode=${MODE}, curobo=${WITH_CUROBO}, drake=${WITH_DRAKE}, local-dir=${LOCAL_DIR})"

View File

@@ -0,0 +1,70 @@
#!/bin/bash
cfg_path="$1"
if [ $# -lt 1 ]; then
echo "Error: Missing required parameter"
echo "Usage: bash $0 <config_path> [random_num] [random_seed]"
echo ""
echo "Parameters:"
echo " config_path - Full path to the config file (with .yml/.yaml extension)"
echo " random_num - (Optional) Number of samples to generate (default: 10)"
echo " random_seed - (Optional) Random seed for reproducibility"
echo " scene_info - (Optional) Scene info key to use"
echo ""
echo "Example:"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42 living_room_scene_info"
exit 1
fi
cfg_path="$1"
random_num=10
if [ $# -ge 2 ]; then
random_num="$2"
fi
random_seed=""
if [ $# -ge 3 ]; then
random_seed="$3"
fi
scene_info=""
if [ $# -ge 4 ]; then
scene_info="$4"
fi
if [ -z "$cfg_path" ]; then
echo "Error: Config path parameter is required and cannot be empty"
exit 1
fi
# Extract custom_path and config_name from the full path
custom_path=$(dirname "$cfg_path")
config_name=$(basename "$cfg_path" .yaml)
echo "Config path: $cfg_path"
echo "Custom path: $custom_path"
echo "Config name: $config_name"
echo "Random num: $random_num"
if [ ! -f "$cfg_path" ]; then
echo "Error: Configuration file not found: $cfg_path"
exit 1
fi
name_with_split="${config_name}_pipe${random_seed:+_seed_${random_seed}}"
echo "Running with config: $cfg_path"
echo "Output name: $name_with_split"
set -x
/isaac-sim/python.sh launcher.py --config configs/simbox/de_pipe_template.yaml \
--name="$name_with_split" \
--load_stage.scene_loader.args.cfg_path="$cfg_path" \
--load_stage.layout_random_generator.args.random_num="$random_num" \
--dedump_stage.scene_loader.args.cfg_path="$cfg_path" \
--store_stage.writer.args.output_dir="output/$name_with_split/" \
${scene_info:+--load_stage.env_loader.args.scene_info="$scene_info"} \
${random_seed:+--random_seed="$random_seed"}
set +x

View File

@@ -0,0 +1,67 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Error: Missing required parameter"
echo "Usage: bash $0 <config_path> [random_num] [random_seed]"
echo ""
echo "Parameters:"
echo " config_path - Full path to the config file (with .yml extension)"
echo " random_num - (Optional) Number of samples to generate (default: 10)"
echo " random_seed - (Optional) Random seed for reproducibility"
echo " scene_info - (Optional) Scene info key to use"
echo ""
echo "Example:"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42 living_room_scene_info"
exit 1
fi
cfg_path="$1"
random_num=10
if [ $# -ge 2 ]; then
random_num="$2"
fi
random_seed=""
if [ $# -ge 3 ]; then
random_seed="$3"
fi
scene_info=""
if [ $# -ge 4 ]; then
scene_info="$4"
fi
if [ -z "$cfg_path" ]; then
echo "Error: Config path parameter is required and cannot be empty"
exit 1
fi
# Extract custom_path and config_name from the full path
custom_path=$(dirname "$cfg_path")
config_name=$(basename "$cfg_path" .yaml)
echo "Config path: $cfg_path"
echo "Custom path: $custom_path"
echo "Config name: $config_name"
echo "Random num: $random_num"
if [ ! -f "$cfg_path" ]; then
echo "Error: Configuration file not found: $cfg_path"
exit 1
fi
name_with_split="${config_name}_plan_and_render${random_seed:+_seed_${random_seed}}"
echo "Running with config: $cfg_path"
echo "Output name: $name_with_split"
set -x
/isaac-sim/python.sh launcher.py --config configs/simbox/de_plan_and_render_template.yaml \
--name="$name_with_split" \
--load_stage.scene_loader.args.cfg_path="$cfg_path" \
--load_stage.layout_random_generator.args.random_num="$random_num" \
--store_stage.writer.args.output_dir="output/$name_with_split/" \
${scene_info:+--load_stage.env_loader.args.scene_info="$scene_info"} \
${random_seed:+--random_seed="$random_seed"}
set +x

View File

@@ -0,0 +1,67 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Error: Missing required parameter"
echo "Usage: bash $0 <config_path> [random_num] [random_seed]"
echo ""
echo "Parameters:"
echo " config_path - Full path to the config file (with .yml extension)"
echo " random_num - (Optional) Number of samples to generate (default: 10)"
echo " random_seed - (Optional) Random seed for reproducibility"
echo " scene_info - (Optional) Scene info key to use"
echo ""
echo "Example:"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42"
echo " bash $0 workflows/simbox/core/configs/tasks/long_horizon/split_aloha/sort_the_rubbish/sort_the_rubbish_part0.yaml 10 42 living_room_scene_info"
exit 1
fi
cfg_path="$1"
random_num=10
if [ $# -ge 2 ]; then
random_num="$2"
fi
random_seed=""
if [ $# -ge 3 ]; then
random_seed="$3"
fi
scene_info=""
if [ $# -ge 4 ]; then
scene_info="$4"
fi
if [ -z "$cfg_path" ]; then
echo "Error: Config path parameter is required and cannot be empty"
exit 1
fi
# Extract custom_path and config_name from the full path
custom_path=$(dirname "$cfg_path")
config_name=$(basename "$cfg_path" .yaml)
echo "Config path: $cfg_path"
echo "Custom path: $custom_path"
echo "Config name: $config_name"
echo "Random num: $random_num"
if [ ! -f "$cfg_path" ]; then
echo "Error: Configuration file not found: $cfg_path"
exit 1
fi
name_with_split="${config_name}_plan_with_render${random_seed:+_seed_${random_seed}}"
echo "Running with config: $cfg_path"
echo "Output name: $name_with_split"
set -x
/isaac-sim/python.sh launcher.py --config configs/simbox/de_plan_with_render_template.yaml \
--name="$name_with_split" \
--load_stage.scene_loader.args.cfg_path="$cfg_path" \
--load_stage.layout_random_generator.args.random_num="$random_num" \
--store_stage.writer.args.output_dir="output/$name_with_split/" \
${scene_info:+--load_stage.env_loader.args.scene_info="$scene_info"} \
${random_seed:+--random_seed="$random_seed"}
set +x