File size: 1,951 Bytes
21e1acb | 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | """CLI argument definitions for Task E demo collection.
"""
def add_collect_demo_args(parser) -> None:
parser.add_argument(
"--num_demos", type=int, default=50,
help="Number of successful demos to collect.",
)
parser.add_argument(
"--output_dir", type=str, default="./datasets/atec_task_e",
help="Directory to save trajectory.hdf5 and trajectory.json.",
)
parser.add_argument(
"--pick_objects", type=int, nargs="+", default=[3, 2, 1],
metavar="N",
help="Which objects to pick, in execution order. Default clears near-to-far: 3 2 1.",
)
parser.add_argument(
"--save_video", action="store_true", default=False,
help="Save an MP4 per demo for visualization "
"(requires: pip install imageio imageio-ffmpeg).",
)
parser.add_argument(
"--video_dir", type=str, default=None,
help="Output directory for MP4 files. Defaults to <output_dir>/videos/.",
)
parser.add_argument(
"--save_images", action="store_true", default=False,
help="Save raw RGB frames into HDF5 under traj_N/images/rgb (T,H,W,3) "
"for ACT RGBD training. Shares the camera with --save_video.",
)
parser.add_argument(
"--only_success", action="store_true", default=False,
help="Discard demos where not all picked objects ended up in the basket.",
)
parser.add_argument(
"--max_attempts", type=int, default=0,
help="Stop after this many attempts even if num_demos is not reached. 0 means unlimited.",
)
parser.add_argument(
"--trace", action="store_true", default=False,
help="Print compact grasp/basket diagnostics for failed scripted demos.",
)
parser.add_argument(
"--abort_failed_lift", action="store_true", default=False,
help="Abort an attempt as soon as the current object fails the post-LIFT height gate.",
)
|