Download examples/read_first_task.py from YanCORANV/RoboSteer: direct link, hf CLI and curl.
- Browser
- Download file 887 Bytes
-
https://huggingface.co/datasets/YanCORANV/RoboSteer/resolve/main/examples/read_first_task.py
- Command line
-
hf download hf://datasets/YanCORANV/RoboSteer/examples/read_first_task.py
-
curl -L -o read_first_task.py https://huggingface.co/datasets/YanCORANV/RoboSteer/resolve/main/examples/read_first_task.py
887 Bytes
| import csv | |
| import json | |
| from pathlib import Path | |
| root = Path(input("Extracted dataset root: ").strip().strip('"')).expanduser().resolve() | |
| task_path = root / 'Tasks/Level1/full_conditioning_reproduction/text_to_motion_generation/L1_text_to_motion_generation_text_--04DHOI32k_00009_38_121.json' | |
| task = json.loads(task_path.read_text(encoding="utf-8-sig")) | |
| print("Task:", task["metadata"]["task_id"]) | |
| print("Instruction:", task["input"]["prompts"]["general_instruction"]) | |
| print("Text condition:", task["input"]["modalities"]["text"]) | |
| motion = root / task["ground_truth"]["motion_parameters"] | |
| with (motion / "joint_pos.csv").open(encoding="utf-8-sig", newline="") as f: | |
| reader = csv.reader(f) | |
| columns = next(reader) | |
| first_frame = [float(value) for value in next(reader)] | |
| print("Motion directory:", motion) | |
| print("Joint columns:", len(columns)) | |
| print("First frame:", first_frame) | |