-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender_obs.sh
More file actions
27 lines (21 loc) · 829 Bytes
/
Copy pathrender_obs.sh
File metadata and controls
27 lines (21 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
set -euo pipefail
# Render robomimic image observations from a robosuite demonstration dataset.
# Usage: ./render_obs.sh demo_v15
DATASET="${1:-demo_v15}"
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INPUT_PATH="${ROOT_DIR}/code/datasets/raw_demos/${DATASET}.hdf5"
OUTPUT_PATH="${ROOT_DIR}/code/datasets/${DATASET}_obs.hdf5"
mkdir -p "$(dirname "${INPUT_PATH}")" "$(dirname "${OUTPUT_PATH}")"
echo "Rendering observations for: ${DATASET}"
echo "Input: ${INPUT_PATH}"
echo "Output: ${OUTPUT_PATH}"
uv run python -m robomimic.scripts.dataset_states_to_obs \
--dataset "${INPUT_PATH}" \
--output_name "${OUTPUT_PATH}" \
--camera_names agentview robot0_eye_in_hand \
--camera_height 84 \
--camera_width 84 \
--done_mode 2 \
--compress
echo "Done. Output saved to: ${OUTPUT_PATH}"