Skip to content

Commit 252d926

Browse files
authored
Merge pull request #17 from isaac-sim/xyao/sqa_fix
Fix doc and video recording image resize ops
2 parents 1b13433 + 01a8239 commit 252d926

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export TASK_NAME="nutpouring"
149149

150150
# Within IsaacLabEvalTasks directory
151151
# DATASET_ROOT_DIR is directory of where Mimic-generated HDF5 is saved locally
152-
python scripts/convert_hdf5_to_lerobot.py --task_name $TASK_NAME--data_root $DATASET_ROOT_DIR
152+
python scripts/convert_hdf5_to_lerobot.py --task_name $TASK_NAME --data_root $DATASET_ROOT_DIR
153153
```
154154

155155
The GR00T-LeRobot-compatible datasets will be available in `DATASET_ROOT_DIR`.
@@ -190,6 +190,12 @@ We finetuned the pre-trained [GR00T-N1-2B policy](https://huggingface.co/nvidia/
190190
```bash
191191
# Within IsaacLabEvalTasks directory
192192
cd submodules/Isaac-GR00T
193+
# Provide the directory where the GR00T-Lerobot data is stored as DATASET_PATH
194+
# Please use full path, instead of relative path
195+
# Nut pouring
196+
# E.g. export DATASET_PATH=/home/data/PhysicalAI-GR00T-Tuned-Tasks/nut_pouring_task/lerobot
197+
# Exhaust pipe sorting
198+
# E.g. export DATASET_PATH=/home/data/PhysicalAI-GR00T-Tuned-Tasks/Exhaust-Pipe-Sorting-task/lerobot
193199
python scripts/gr00t_finetune.py \
194200
--dataset_path=${DATASET_PATH} \
195201
--output_dir=${OUTPUT_DIR} \

scripts/config/args.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
import os
1617
import shutil
1718
from dataclasses import dataclass, field
1819
from enum import Enum
@@ -167,15 +168,17 @@ def __post_init__(self):
167168
self.model_path = config.model_path
168169
if self.language_instruction == "":
169170
self.language_instruction = config.language_instruction
170-
171+
# If model path is relative, return error
172+
if not os.path.isabs(self.model_path):
173+
raise ValueError("model_path must be an absolute path. Do not use relative paths.")
171174
assert (
172175
self.num_feedback_actions <= self.action_horizon
173176
), "num_feedback_actions must be less than or equal to action_horizon"
174177
# assert all paths exist
175178
assert Path(self.gr00t_joints_config_path).exists(), "gr00t_joints_config_path does not exist"
176179
assert Path(self.action_joints_config_path).exists(), "action_joints_config_path does not exist"
177180
assert Path(self.state_joints_config_path).exists(), "state_joints_config_path does not exist"
178-
assert Path(self.model_path).exists(), "model_path does not exist. Do not use relative paths."
181+
assert Path(self.model_path).exists(), "model_path does not exist."
179182
# embodiment_tag
180183
assert self.embodiment_tag in [
181184
"gr1",

scripts/evaluate_gn1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def run_closed_loop_policy(
7979
)
8080
video_writer = VideoWriter(
8181
video_fpath,
82-
# Reverse the first two elements of the image size, height and width due to cv2
83-
args.original_image_size[::-1][:2],
82+
# Height, width to be in the order of (width, height) for cv2
83+
args.original_image_size[:2][::-1],
8484
fps=20,
8585
)
8686

0 commit comments

Comments
 (0)