#!/usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 """Build (and optionally send) a ``POST /predict`` request for frnet-p150. Standard library only. # point cloud (.bin needs --fields; .npy / .npz / .pcd carry their own layout) python3 code/tt_frnet/server/client.py --points code/tt_frnet/samples/synthetic_ot128.npz \ --calib-preset synthetic_ot128 --out req.json curl -s localhost:20000/predict -H 'Content-Type: application/json' -d @req.json # send it directly and print the response python3 code/tt_frnet/server/client.py --points code/tt_frnet/samples/synthetic_ot128.npz \ --calib-preset synthetic_ot128 --url http://127.0.0.1:20000 # another cloud: its own sensor -> base_link transform for the ego crop box (a JSON file), or no box python3 code/tt_frnet/server/client.py --points my_scan.pcd --calib my_calib.json --out req.json The implementation is the vendored ``ttaw/server/client.py`` (C08); this file runs it from the model repository with any Python 3.9+, without numpy and without installing the package. In Python, use ``tt_frnet.ttaw.server.client`` (``build_request``, ``post``, ``wait_ready``, ...). """ import runpy from pathlib import Path if __name__ == "__main__": runpy.run_path(str(Path(__file__).resolve().parents[1] / "ttaw" / "server" / "client.py"), run_name="__main__")