Files
kinect/tests/contract_interop_driver.py
T
kinect-bot 0af22f1783
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python tracker (pytest) (push) Canceled after 0s
feat(calibration,contract,tracker): T-pose calibration + seqlock fix + articulated-depth wiring (wave 8a; todos 11,20,21 done)
2026-11-25 05:47:19 -05:00

42 lines
1.1 KiB
Python

"""CTest driver proving the C++ reader consumes Python publisher generations."""
from __future__ import annotations
import os
import subprocess
import sys
import uuid
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOT)
from tracker.fake_pose import make_fake_pose # noqa: E402
from tracker.publisher import FrameContractPublisher # noqa: E402
def main() -> int:
probe = sys.argv[1]
name = f"kinect_seqlock_{uuid.uuid4().hex}"
with FrameContractPublisher(
depth_size=(32, 24),
color_size=(32, 24),
name=name,
) as publisher:
for index in range(9):
publisher.publish(
make_fake_pose(index, image_width=32, image_height=24),
None,
)
result = subprocess.run(
[probe, name],
check=True,
capture_output=True,
text=True,
)
print(result.stdout, end="")
return 0 if "published=9 frame=9 slot_sequence=6" in result.stdout else 1
if __name__ == "__main__":
raise SystemExit(main())