File size: 1,461 Bytes
51defdc | 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 | #!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# Download the public sample data that meteor-p150 may NOT redistribute (license unstated or non-commercial)
# into ${METEOR_SAMPLES:-$HOME/.cache/tt_meteor/samples}, sha256-checked. Tests and benchmarks read it from there.
# Nothing downloaded here is executed; parse it with numpy / sqlite3 only.
set -euo pipefail
DEST="${METEOR_SAMPLES:-$HOME/.cache/tt_meteor/samples}"
mkdir -p "$DEST"
fetch() { # fetch <url> <sha256> <file name>
local url="$1" sum="$2" name="$3"
if [ -f "$DEST/$name" ] && echo "$sum $DEST/$name" | sha256sum -c --status; then
echo "ok $name"; return
fi
curl -fL --retry 3 -o "$DEST/$name.part" "$url"
echo "$sum $DEST/$name.part" | sha256sum -c --status || { echo "sha256 mismatch: $name" >&2; exit 1; }
mv "$DEST/$name.part" "$DEST/$name"; echo "fetched $name"
}
# Example (Autoware demo rosbag; pinned in autoware/ansible/roles/demo_artifacts/tasks/main.yaml:48-53):
# fetch https://autoware-files.s3.us-west-2.amazonaws.com/recordings/bags/demos/sample-rosbag.zip \
# 5f9d36353393b3d249212153c19049822b1298db56512aa045b4f7f6fc37cf88 sample-rosbag.zip
# METEOR demo scenes (research / demonstration use only) and nuScenes-derived inputs (CC BY-NC-SA 4.0) are never shipped;
# fetch AutowareFoundation/meteor-demo-scenes at the pinned revision bd5f94dc79a0fbbd1836ad5e7198b1feb1b614d3 (research/meteor/SPEC.md section 7)
echo "samples in $DEST"
|