7f39abb613
Add declarative single-leg import, fixed-anchor benchmark, masked shared-policy PPO prototype, regression tests, and consolidated documentation.
25 lines
792 B
Python
25 lines
792 B
Python
#!/usr/bin/env python3
|
|
"""Extract an explicitly described real single leg; no simulator startup."""
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from SkillFactory.legs import LegSpec
|
|
from SkillFactory.legs.urdf import extract_leg
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("--spec", type=Path, required=True)
|
|
parser.add_argument("--source-root", type=Path)
|
|
parser.add_argument("--output", type=Path)
|
|
args = parser.parse_args()
|
|
spec = LegSpec.load(args.spec, args.source_root)
|
|
output = args.output or Path("assets/generated/legs") / spec.part_id
|
|
bundle = extract_leg(spec, output)
|
|
print(f"Extracted {bundle['joint_order']} to {output}; source {bundle['source']['sha256']}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|