/
/
/
Ansible role that deployes services on my runner machine
1# ==============================================================================
2# CAMERA RECEIVER - receives, records and previews the table camera
3# ==============================================================================
4# DND_SESSION_DIR is deliberately absent: it is per-session and the Chamberlain
5# injects it. Without it the receiver serves a preview and records nothing, which
6# is the correct behaviour for a camera running outside a session.
7
8# Must match dnd_table_camera_rtp_port on the Pi -- this is the receiving end.
9CAMERA_RTP_PORT={{ dnd_camera_rtp_port }}
10CAMERA_HTTP_PORT={{ dnd_camera_http_port }}
11CAMERA_JITTER_MS={{ dnd_camera_jitter_ms }}
12
13CAMERA_SEGMENT_MINUTES={{ dnd_camera_segment_minutes }}
14
15CAMERA_PREVIEW_FPS={{ dnd_camera_preview_fps }}
16CAMERA_PREVIEW_WIDTH={{ dnd_camera_preview_width }}
17CAMERA_PREVIEW_HEIGHT={{ dnd_camera_preview_height }}
18CAMERA_PREVIEW_QUALITY={{ dnd_camera_preview_quality }}
19
20# The tracking tap. A second decode with no consumer yet.
21CAMERA_FRAMES_ENABLED={{ dnd_camera_frames_enabled | lower }}
22
23# Subscribed, not published: the Pi owns dnd/camera/state and reports `paused`
24# when the projector sleeps. Recording follows it, so the two ends agree without
25# either polling the other.
26CAMERA_MQTT_HOST={{ mqtt_host }}
27CAMERA_MQTT_PORT={{ mqtt_port }}
28CAMERA_MQTT_USERNAME={{ mqtt_username }}
29CAMERA_MQTT_PASSWORD={{ mqtt_password }}
30CAMERA_BASE_TOPIC=dnd
31
32# --- mini tracking -----------------------------------------------------------
33# AprilTags on the minis, read from the frame tap, published as reveal tokens.
34# Three independent flags: they fail independently, and any of them must be
35# switchable mid-session without a redeploy (POST /tracking/flags).
36#
37# Off by default. This drives what the table sees, so a detector misfiring is
38# one setting away from gone.
39CAMERA_TRACK_MINIS={{ dnd_camera_track_minis | lower }}
40# How the tag is read. tagCircle21h7 is NOT in OpenCV's ArUco dictionary set,
41# so this needs the pupil_apriltags backend -- see the defaults for the
42# measurement. Upscale 3 is measured and must not be lowered: against a busy
43# projected map, x1 detects nothing at all.
44CAMERA_DETECTOR_BACKEND={{ dnd_camera_detector_backend }}
45CAMERA_TAG_FAMILY={{ dnd_camera_tag_family }}
46CAMERA_STREAM_UPSCALE={{ dnd_camera_stream_upscale }}
47CAMERA_CROP_TO_SURFACE={{ dnd_camera_crop_to_surface | lower }}
48CAMERA_CROP_MARGIN={{ dnd_camera_crop_margin }}
49CAMERA_FOG_OF_WAR={{ dnd_camera_fog_of_war | lower }}
50CAMERA_SPOT_BANNER={{ dnd_camera_spot_banner | lower }}
51
52# Detection rate. Measured cost is 2.0 ms per frame including the JPEG decode,
53# so 3 Hz is well under 1% of a core -- the limit is how fresh the overlay needs
54# to feel, not CPU.
55CAMERA_TRACK_HZ={{ dnd_camera_track_hz }}
56
57# How long a tag keeps its last position after it stops being seen.
58CAMERA_TRACK_HOLD_SECONDS={{ dnd_camera_track_hold_seconds }}
59
60# Normalised to the projected surface. fog: "a few paces" (15 ft on a
61# 5 ft/square map ~= 75 mm on a 1.2 m table). spot: about one mini base --
62# a literal square millimetre is sub-pixel and aliases into nothing.
63CAMERA_FOG_RADIUS={{ dnd_camera_fog_radius }}
64CAMERA_SPOT_RADIUS={{ dnd_camera_spot_radius }}
65# The name band's radius. Was reaching the token from the tracker's default and
66# had no env var, so it could not be tuned without a rebuild -- easy to miss
67# because the token carried a plausible value the whole time.
68CAMERA_BANNER_RADIUS={{ dnd_camera_banner_radius }}
69
70# Solved once from the projected chessboard and kept: the camera and projector
71# are on one rigid mount, so it holds until somebody unbolts something.
72CAMERA_CALIBRATION=/data/homography.yml
73
74# Where a tag id becomes a name. The tower number IS the AprilTag id, so this
75# reads the mini forge's registry rather than keeping a second mapping.
76CAMERA_FORGE_URL={{ chamberlain_forge_url }}
77
78CAMERA_LOG_LEVEL=INFO
79