mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 22:46:36 +00:00
669d8e5653
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
787 B
Python
29 lines
787 B
Python
"""CLI: python scripts/download_dataset.py euroc_mh01"""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from gps_denied.testing.download import DATASET_REGISTRY, download_dataset
|
|
|
|
|
|
def main(argv: list[str]) -> int:
|
|
if len(argv) != 2:
|
|
print(f"usage: {argv[0]} <dataset_name>", file=sys.stderr)
|
|
print(f"available: {', '.join(DATASET_REGISTRY)}", file=sys.stderr)
|
|
return 2
|
|
name = argv[1]
|
|
if name not in DATASET_REGISTRY:
|
|
print(f"unknown dataset: {name}", file=sys.stderr)
|
|
return 2
|
|
spec = DATASET_REGISTRY[name]
|
|
root = Path("datasets") / spec.target_subdir
|
|
dest = root / Path(spec.url).name
|
|
print(f"→ {dest}")
|
|
download_dataset(spec, dest)
|
|
print("OK")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main(sys.argv))
|