| 9 | |
| 10 | |
| 11 | def build_parser() -> argparse.ArgumentParser: |
| 12 | parser = argparse.ArgumentParser( |
| 13 | description="Export an Isaac Lab/RSL-RL checkpoint to ONNX plus deploy policy.yaml." |
| 14 | ) |
| 15 | parser.add_argument("--task", required=True, help="Isaac Lab task name.") |
| 16 | parser.add_argument("--checkpoint", required=True, help="Path to RSL-RL .pt checkpoint.") |
| 17 | parser.add_argument("--profile", default="config/revo3_right.yaml", help="Robot profile with policy joint order.") |
| 18 | parser.add_argument("--output-dir", required=True, help="Directory for policy.onnx and policy.yaml.") |
| 19 | parser.add_argument("--agent", default="rsl_rl_cfg_entry_point") |
| 20 | parser.add_argument("--num-envs", type=int, default=1) |
| 21 | parser.add_argument("--device", default=None) |
| 22 | parser.add_argument("--headless", action="store_true", default=True) |
| 23 | return parser |
| 24 | |
| 25 | |
| 26 | def main(argv: list[str] | None = None) -> int: |