obsbot-mcp 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -60,7 +60,7 @@ With the installed binary, use `"command": "obsbot-mcp"` and `"args": ["--debug"
60
60
 
61
61
  ## Tools
62
62
 
63
- 34 tools total. All names below are current as of v0.4.0 — **every tool was renamed in this
63
+ 35 tools total. All names below are current as of v0.4.0 — **every tool was renamed in this
64
64
  release and there is no backward-compatible alias**; see [CHANGELOG.md](./CHANGELOG.md) for the
65
65
  full old→new mapping if you're updating a caller.
66
66
 
@@ -92,7 +92,7 @@ with no serial, since it can't be opened to read one.
92
92
  | `obsbot_devices` | — | List attached OBSBOT cameras with each one's serial (where obtainable), name, and status (`available`/`bound`/`busy`). A `busy` camera is held by another process. |
93
93
  | `obsbot_wake` | `camera`? | Wake the camera/gimbal (sends `"run"`). **Moves the camera:** un-stows the gimbal back to level (pitch ~0). Most control commands also wake it implicitly. |
94
94
  | `obsbot_sleep` | `camera`? | Sleep the camera/gimbal (sends `"sleep"`). **Moves the camera:** stows the gimbal face-down at roughly pitch `84`, so `obsbot_gimbal_position` reads ~84 rather than the pose you left. |
95
- | `obsbot_status` | `camera`? | Read the live status block: `{ awake, hdr, faceAe, aiMode, trackSpeed }` (`faceAe` = auto-exposure metering for a detected face). Under `--debug`, also returns the raw 60-byte block as hex. |
95
+ | `obsbot_status` | `camera`? | Read the live status block: `{ awake, hdr, faceAe, aiMode, trackSpeed, fovMode, zoomPercent }` (`faceAe` = auto-exposure metering for a detected face; `fovMode` = `wide`\|`medium`\|`narrow`\|`custom`\|`unknown`, where `custom` means a continuous zoom overrode the discrete modes; `zoomPercent` = zoom position, `0`-`100`). Under `--debug`, also returns the raw 60-byte block as hex. |
96
96
 
97
97
  ### Gimbal (PTZ)
98
98
 
@@ -102,6 +102,33 @@ with no serial, since it can't be opened to read one.
102
102
  | `obsbot_gimbal_move_speed` | `yaw`, `pitch`, `roll` (deg/s, clamped to `±150`, `roll` defaults `0`), `autoStopMs` (default `800`), `camera`? | Drive the gimbal at a speed, then auto-stop after `autoStopMs` so it can't run away. Same yaw/pitch sign convention as `gimbal_move`. Returns the speeds actually used. Past its limit the firmware ignores the command outright rather than saturating — 180 deg/s and above move the gimbal exactly 0° — so requests are clamped into the hardware-verified band. **Not available on Linux** — see [limitations](#linux-gimbal-position-feedback-is-not-live). |
103
103
  | `obsbot_gimbal_recenter` | `camera`? | Recenter the gimbal — drives it to yaw `0` / pitch `0`. Returns as soon as the command is sent, so poll `obsbot_gimbal_position` if you need to know it arrived. |
104
104
  | `obsbot_gimbal_position` | `camera`? | Read the gimbal's current absolute `{ yaw, pitch }` in degrees via standard UVC Pan/Tilt. Valid during a move as well as after one. On Linux this is the last-*commanded* value, not a live in-flight reading — see [limitations](#linux-gimbal-position-feedback-is-not-live). |
105
+ | `obsbot_aim_at_pixel` | `x`, `y`, `frameWidth`, `frameHeight`, `camera`? | Point the camera at a pixel from a frame you just captured. Reads the camera's own FOV mode rather than taking one. Refuses while AI tracking or a custom zoom is active, and refuses if the camera had to be woken (waking moves the gimbal, invalidating the frame you measured). It reads the live pose to compute the aim, so on Linux it is affected the same way `obsbot_gimbal_position` is — see [limitations](#linux-gimbal-position-feedback-is-not-live). Returns `clamped:true` if the target was outside the gimbal's range, in which case the camera still moves — to the nearest reachable pose. Refuses (`ok:false`) instead of moving when the pixel lies past vertical from the current pose, since the only rotation that reaches it would swing the camera toward the opposite side of the room; tilt toward the pixel first, then re-aim. |
106
+
107
+ #### Aiming at what you can see
108
+
109
+ `obsbot_capture_snapshot` returns the frame as an image plus its `width`/`height`, so a model can
110
+ locate something in the picture and then point the camera at it:
111
+
112
+ 1. `obsbot_capture_snapshot` — look at the frame
113
+ 2. `obsbot_aim_at_pixel` — pass the target's pixel and that frame's dimensions
114
+ 3. `obsbot_capture_snapshot` again — confirm it landed, and repeat if needed
115
+
116
+ Pass the `frameWidth`/`frameHeight` from the same snapshot the pixel came from. Mixing a pixel from
117
+ one frame with dimensions from another aims at the wrong place, and nothing can detect it.
118
+
119
+ **The snapshot must be `source: "device"`.** `obsbot_capture_snapshot` can also read from
120
+ `source: "virtual"` or `"ndi"`, which come from OBSBOT Center's own output rather than the camera's
121
+ raw stream. Those are framed and cropped by OBSBOT Center, not by this camera's optics, so the
122
+ measured field-of-view constants this tool relies on don't describe them — aiming from a virtual or
123
+ NDI frame lands in the wrong place with no way to detect it. Only use a `device`-source snapshot's
124
+ pixel and dimensions here.
125
+
126
+ The tool reads the camera's field-of-view mode itself, so there is no FOV argument to get wrong. It
127
+ refuses rather than guessing when AI tracking is on (tracking drives the gimbal and would fight the
128
+ aim), when a custom zoom is set (the magnification is measured — `3*ratio-2` — but not applied here
129
+ yet), or when the camera had to
130
+ be woken from sleep (waking moves the gimbal, so the frame you measured no longer matches where the
131
+ camera is pointing — take a fresh snapshot and retry).
105
132
 
106
133
  ### Gimbal presets
107
134
 
@@ -225,14 +252,14 @@ make install # copies to native/prebuilt/linux-x64/
225
252
  ### Linux gimbal position feedback is not live
226
253
 
227
254
  `obsbot_gimbal_position` on Linux reports the last position `obsbot_gimbal_move`/
228
- `obsbot_gimbal_recenter` commanded — not a live, in-flight reading. This is a Linux kernel-driver
229
- gap, not a firmware limitation: hardware testing (2026-07-21) confirmed the OBSBOT Tiny 2's
230
- `CT_PANTILT_ABSOLUTE` control genuinely tracks live position — a raw USB read of that same control,
231
- bypassing the kernel, showed a real slew progressing in real time. The reason plain V4L2
232
- (`VIDIOC_G_CTRL`) never sees that is that `uvcvideo` doesn't mark `V4L2_CID_PAN_ABSOLUTE`/
233
- `TILT_ABSOLUTE` as `V4L2_CTRL_FLAG_VOLATILE` on this kernel (confirmed via `VIDIOC_QUERY_EXT_CTRL`),
234
- so the V4L2 core control framework serves its own cache of the last `VIDIOC_S_CTRL` value instead of
235
- re-querying the device.
255
+ `obsbot_gimbal_recenter` commanded — not a live, in-flight reading. Hardware testing (2026-07-21)
256
+ confirmed the OBSBOT Tiny 2's `CT_PANTILT_ABSOLUTE` control genuinely tracks live position — a raw
257
+ USB read of that same control, bypassing the kernel, showed a real slew progressing in real time.
258
+ The reason plain V4L2 (`VIDIOC_G_CTRL`) never sees that is that `uvcvideo` caches the control's
259
+ value and serves the cache instead of re-querying the device (confirmed via
260
+ `VIDIOC_QUERY_EXT_CTRL`, which reports no `V4L2_CTRL_FLAG_VOLATILE`). The driver invalidates that
261
+ cache when the device sends a UVC Control Change interrupt — which this camera's firmware never
262
+ does, and never advertises support for.
236
263
 
237
264
  Getting a genuinely live reading through V4L2 requires briefly detaching the kernel driver from
238
265
  the camera's control interface and reading the control directly over raw USB — but detaching that
@@ -241,10 +268,12 @@ device: streaming and control share one kernel-managed USB function, so pulling
241
268
  takes both down together. That makes a libusb-based workaround incompatible with anything actually
242
269
  using the camera as a webcam at the same time, which ruled it out as a shipped default.
243
270
 
244
- **A kernel patch has been submitted upstream** to mark these controls volatile in `uvcvideo`,
245
- matching precedent — this device already has one OBSBOT-specific quirk merged
246
- (`UVC_QUIRK_OBSBOT_MIN_SETTINGS`, a different bug). If it lands, `obsbot_gimbal_position` would
247
- become live through plain V4L2 with no code changes needed here. Until then:
271
+ **A kernel patch has been submitted upstream** ([`media: uvcvideo: query pan/tilt position from
272
+ the device on every read`](https://lore.kernel.org/linux-media/20260725212332.64927-1-jordan.mymail@gmail.com/),
273
+ July 2026 — awaiting review, not merged). It marks `CT_PANTILT_ABSOLUTE` volatile so the driver
274
+ queries the device on every read; verified on this hardware to track a live slew through plain
275
+ `VIDIOC_G_CTRL`, concurrently with streaming. If it is accepted, `obsbot_gimbal_position` becomes
276
+ live on Linux with no code changes needed here. Until it ships in a kernel near you:
248
277
 
249
278
  - `obsbot_gimbal_move` and `obsbot_gimbal_recenter` work normally — hardware-verified,
250
279
  repeatedly, via direct V4L2 `VIDIOC_S_CTRL` writes. Their target values are known and clamped
@@ -351,8 +380,11 @@ What has actually been exercised against hardware, and what hasn't:
351
380
  wasn't available). Single-camera use is unaffected either way.
352
381
  - **Linux gimbal position feedback is not live, and `obsbot_gimbal_move_speed` is unavailable
353
382
  there as a result.** See ["Linux gimbal position feedback is not live"](#linux-gimbal-position-feedback-is-not-live)
354
- above — a kernel patch has been submitted to fix this at the source. `obsbot_gimbal_move` and
383
+ above — a kernel patch fixing this at the source [has been submitted upstream](https://lore.kernel.org/linux-media/20260725212332.64927-1-jordan.mymail@gmail.com/)
384
+ (July 2026, awaiting review). `obsbot_gimbal_move` and
355
385
  `obsbot_gimbal_recenter` are unaffected; both are hardware-verified to work normally.
386
+ `obsbot_aim_at_pixel` **is** affected — it depends on a live pose reading to compute the aim, the
387
+ same way `obsbot_gimbal_position` does.
356
388
  - **`obsbot_zoom_vendor`'s ratio scale doesn't match `obsbot_zoom_uvc`'s at the same `ratio`.** A
357
389
  hardware snapshot comparison at `ratio: 2.0` showed the vendor path framed tighter than the UVC
358
390
  path. Whether the vendor-side ratio encoding is off by a scale factor, or the two zoom controls
@@ -395,3 +427,44 @@ only run it under supervision:**
395
427
  npm run build
396
428
  node scripts/e2e.mjs
397
429
  ```
430
+
431
+ ### Testing changes through the live MCP tools
432
+
433
+ Two traps make it easy to test the wrong thing and believe the result. Both cost real time on
434
+ 2026-07-25.
435
+
436
+ **Rebuilding and reloading is not enough — kill stale server processes first.** The MCP server runs
437
+ from `dist/`, so a source change is invisible until `npm run build`. But reloading the server in your
438
+ MCP client does *not* guarantee your new code executes: this project coordinates concurrent clients
439
+ by electing a single owner process (see `IPC-DESIGN.md`), and a reload spawns a *new* client that
440
+ **forwards its tool calls to whatever owner is already running**. An orphaned server from a previous
441
+ session stays the owner, so the new process advertises its own up-to-date tool list while every call
442
+ is executed by old code.
443
+
444
+ That failure is deceptive rather than loud: a newly added tool *appears* in the tool list and can be
445
+ called, but behaves like the old build. Two reloads in a row will not fix it. Check for orphans
446
+ before concluding anything:
447
+
448
+ ```powershell
449
+ # Windows
450
+ Get-CimInstance Win32_Process -Filter "Name='node.exe'" |
451
+ Where-Object { $_.CommandLine -like "*Obsbot*" } |
452
+ Select-Object ProcessId, CreationDate
453
+ ```
454
+
455
+ ```bash
456
+ # Linux / macOS
457
+ pgrep -af "obsbot.*dist/index.js"
458
+ ```
459
+
460
+ Kill everything older than your build, then reload. The cheapest positive confirmation is to call a
461
+ tool whose *output* changed — `obsbot_status` gaining a field, say — rather than one whose
462
+ description changed, since descriptions come from the new process either way.
463
+
464
+ **A preview holds the camera stream, so snapshots fail while one is open.** `obsbot_capture_preview`
465
+ and `obsbot_capture_snapshot` both need the device stream, and on Windows the second one gets
466
+ `Camera is in use by another application`. This matters for the aim loop above, which is
467
+ snapshot → aim → snapshot: stop the preview around each snapshot, or work without one. Gimbal control
468
+ is unaffected — it uses control transfers, not the stream — so `obsbot_aim_at_pixel` itself works fine
469
+ with a preview running. The error text suggests `source: "virtual"` or `"ndi"` as a workaround; do not
470
+ take it when aiming, since those frames are framed by OBSBOT Center rather than this camera's optics.
@@ -86,6 +86,21 @@ export function buildRecordArgs(o) {
86
86
  "-y", o.outputPath,
87
87
  ];
88
88
  }
89
+ // The preview is for a human to watch the gimbal move, so smooth motion is the
90
+ // point of it. Left to negotiate, dshow settles on 1080p30 — but the Tiny 2
91
+ // advertises mjpeg 1920x1080 all the way to 60fps (`ffmpeg -list_options`,
92
+ // confirmed 2026-07-25, and the 60fps stream verified to actually sustain 60
93
+ // rather than merely claim it). Pinning the codec is what makes 60 reachable:
94
+ // yuyv422 tops out at 30 for 1080p, so without -vcodec the negotiation can land
95
+ // on a format that cannot deliver it.
96
+ //
97
+ // Deliberately NOT here: -fflags nobuffer / -flags low_delay / -framedrop. Those
98
+ // were tried against an apparent half-second lag on 2026-07-25 and appeared to
99
+ // fix it, but re-running the untouched arguments showed them equally fast — the
100
+ // lag was CPU contention from a concurrent test suite, not these flags. Adding
101
+ // them would have been treating a symptom that no longer reproduced. -framedrop
102
+ // in particular is a real trade (drop frames under load instead of running
103
+ // permanently late) and should be a deliberate choice, not a leftover.
89
104
  export function buildPreviewArgs(o) {
90
105
  const isV4l2 = o.videoName.startsWith("/dev/");
91
106
  if (isV4l2) {
@@ -94,6 +109,7 @@ export function buildPreviewArgs(o) {
94
109
  "-f", "v4l2",
95
110
  "-input_format", "mjpeg",
96
111
  "-video_size", "1920x1080",
112
+ "-framerate", "60",
97
113
  "-i", o.videoName,
98
114
  "-window_title", "OBSBOT preview",
99
115
  ];
@@ -101,6 +117,7 @@ export function buildPreviewArgs(o) {
101
117
  // dshow path
102
118
  return [
103
119
  "-hide_banner", "-loglevel", "warning", "-f", "dshow",
120
+ "-framerate", "60", "-video_size", "1920x1080", "-vcodec", "mjpeg",
104
121
  "-i", `video=${o.videoName}`,
105
122
  "-window_title", "OBSBOT preview",
106
123
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"ffmpeg-args.js","sourceRoot":"","sources":["../../src/capture/ffmpeg-args.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,gFAAgF;AAChF,oDAAoD;AAsBpD,gDAAgD;AAEhD,sEAAsE;AACtE,yCAAyC;AACzC,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACrD,IAAI,CAAC,CAAC;YAAE,SAAS;QACjB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;YAClC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,gBAAgB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SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,IAAI,EAAE,CAAC,CAAC,UAAU;KACnB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,CAAyB;IAC3D,OAAO;QACL,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc;QAC5D,IAAI,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE;QACvB,eAAe,EAAE,gBAAgB;KAClC,CAAC;AACJ,CAAC"}
@@ -101,11 +101,14 @@ export declare const IMAGE_CONTROLS: ImageControl[];
101
101
  export declare const percentToRange: (pct: number, min: number, max: number) => number;
102
102
  export type AiModeStatus = "no-tracking" | "normal" | "upper-body" | "close-up" | "headless" | "lower-body" | "desk" | "whiteboard" | "hand" | "group" | "unknown";
103
103
  export type TrackSpeedStatus = "standard" | "sport" | "unknown";
104
+ export type FovModeStatus = "wide" | "medium" | "narrow" | "custom" | "unknown";
104
105
  export interface CameraStatus {
105
106
  awake: boolean;
106
107
  hdr: boolean;
107
108
  faceAe: boolean;
108
109
  aiMode: AiModeStatus;
109
110
  trackSpeed: TrackSpeedStatus;
111
+ fovMode: FovModeStatus;
112
+ zoomPercent: number;
110
113
  }
111
114
  export declare const decodeStatus: (block: Buffer) => CameraStatus;
@@ -224,6 +224,14 @@ const STATUS_OFF_AI_MODE_N = 0x1c; // AI mode tuple, second value
224
224
  // a constant here). Offset found + value map (0=standard, 2=sport) confirmed on
225
225
  // hardware 2026-07-13 against the OBSBOT Center Standard/Sport control.
226
226
  const STATUS_OFF_TRACK_SPEED = 0x24;
227
+ // Measured on hardware 2026-07-25 by diffing the raw status block across control
228
+ // changes. block[0x11] is the FOV mode enum (same values as FOV_VALUE), with 3 =
229
+ // the vendor SDK's FovTypeNull, reported when a continuous zoom has overridden
230
+ // the discrete modes. block[0x04] is zoom position, 0-100 over the UVC 1.0-2.0
231
+ // range. NOTE: a sleeping camera serves a stale block — read these only after
232
+ // the readiness gate.
233
+ const STATUS_OFF_FOV_MODE = 0x11;
234
+ const STATUS_OFF_ZOOM_PCT = 0x04;
227
235
  const AI_MODE_TABLE = {
228
236
  "0,0": "no-tracking",
229
237
  "2,0": "normal",
@@ -251,6 +259,12 @@ const TRACK_SPEED_TABLE = {
251
259
  0: "standard",
252
260
  2: "sport",
253
261
  };
262
+ const FOV_MODE_TABLE = {
263
+ 0: "wide",
264
+ 1: "medium",
265
+ 2: "narrow",
266
+ 3: "custom",
267
+ };
254
268
  export const decodeStatus = (block) => {
255
269
  if (block.length <= STATUS_OFF_TRACK_SPEED) {
256
270
  throw new Error(`status block too short: ${block.length} bytes`);
@@ -263,6 +277,8 @@ export const decodeStatus = (block) => {
263
277
  faceAe: block[STATUS_OFF_FACE_AE] === 1,
264
278
  aiMode: AI_MODE_TABLE[`${m},${n}`] ?? "unknown",
265
279
  trackSpeed: TRACK_SPEED_TABLE[block[STATUS_OFF_TRACK_SPEED]] ?? "unknown",
280
+ fovMode: FOV_MODE_TABLE[block[STATUS_OFF_FOV_MODE]] ?? "unknown",
281
+ zoomPercent: block[STATUS_OFF_ZOOM_PCT],
266
282
  };
267
283
  };
268
284
  //# sourceMappingURL=commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/codec/commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,6EAA6E;AAC7E,8EAA8E;AAC9E,4EAA4E;AAC5E,oDAAoD;AACpD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,KAAc,EAAe,EAAE;IAC9E,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,C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E,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,OAAO;CACf,CAAC;AAKF,MAAM,iBAAiB,GAAqC;IAC1D,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,OAAO;CACX,CAAC;AAIF,MAAM,cAAc,GAAkC;IACpD,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;CACZ,CAAC;AAYF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAgB,EAAE;IAC1D,IAAI,KAAK,CAAC,MAAM,IAAI,sBAAsB,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,2BAA2B,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,CAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACtC,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC;QACpC,GAAG,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;QAChC,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC;QACvC,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,SAAS;QAC/C,UAAU,EAAE,iBAAiB,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,IAAI,SAAS;QACzE,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,IAAI,SAAS;QAChE,WAAW,EAAE,KAAK,CAAC,mBAAmB,CAAC;KACxC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,226 @@
1
+ import type { FovType } from "../codec/commands.js";
2
+ export interface Frame {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ export interface Pose {
7
+ yaw: number;
8
+ pitch: number;
9
+ }
10
+ export interface Optics {
11
+ fov: FovType;
12
+ /** Zoom factor, >= 1. Zoom is a crop, so it divides the tangent. Defaults to 1. */
13
+ zoom?: number;
14
+ /**
15
+ * Whether the capture path horizontally flips the preview. This inverts the
16
+ * yaw correction, so it is an explicit input rather than a baked-in
17
+ * assumption — see the spec's section 3. Defaults to false.
18
+ */
19
+ mirrored?: boolean;
20
+ }
21
+ /**
22
+ * Horizontal field of view of the CAPTURE STREAM for each FOV setting, in
23
+ * degrees — DERIVED, not three separate measurements.
24
+ *
25
+ * Earlier revisions carried wide/medium/narrow as three independently measured
26
+ * absolutes at +/-3 degrees each. That threw away the most precise thing known
27
+ * about them: the RATIOS between the modes are measured to ~0.05%, roughly 60x
28
+ * better than any of the absolutes, so three free values let the modes drift out
29
+ * of proportion with each other for no reason.
30
+ *
31
+ * One anchor plus measured magnifications instead. The anchor's uncertainty
32
+ * still propagates, but it now moves all three together, which is the honest
33
+ * representation of what is known.
34
+ *
35
+ * MEASURED 2026-07-25 by solving the camera intrinsics from pure gimbal
36
+ * rotations. A camera that only rotates induces an exact homography
37
+ * H = K R K^-1 between views, with no dependence on scene depth, so frames at
38
+ * known gimbal angles determine the focal lengths outright. No distance is
39
+ * measured anywhere — the gimbal angle is the ruler. That is what makes this
40
+ * tighter than the tape-measured letter sheet behind the old +/-3 degrees.
41
+ *
42
+ * Six rotations (pitch +/-10, +/-20; yaw +/-10) over a static scene, 313-1243
43
+ * inliers each, gave fx = 1452-1455 px on a 1920-wide frame across every subset
44
+ * — a spread of 0.2% — which is HFOV 66.84-66.90. Rounded to 67. This also
45
+ * independently reproduces an earlier pan-and-track measurement of 66.4.
46
+ *
47
+ * The per-mode magnifications come from fitting a similarity transform between
48
+ * frames at each setting on a fixed scene (275 and 683 inliers, 0.48 and 0.44 px
49
+ * residual). They are pure ratios, so they are unaffected by which capture
50
+ * format the measurement went through — which matters, because the 1080p pixel
51
+ * formats do NOT share a field of view (see the note on the capture path below).
52
+ *
53
+ * Verified head-to-head on hardware, same feature and same start pose with only
54
+ * the constant differing: a target at u = +0.91 left a yaw residual of -0.823
55
+ * degrees under the old 68 and -0.274 under 67.
56
+ *
57
+ * CAPTURE FORMAT WARNING: MJPEG 1920x1080 is a 1.201x crop of YUYV 1920x1080 on
58
+ * this camera — same resolution, different window onto the sensor. These
59
+ * constants describe the WIDE field, which is what `obsbot_capture_snapshot`
60
+ * delivers. `obsbot_capture_preview` pins MJPEG and therefore shows ~20% less.
61
+ * Any future measurement through ffmpeg must state its pixel format; a
62
+ * resolution alone does not identify the field.
63
+ *
64
+ * SCOPE: 16:9 capture at any resolution. A 4:3 path would need re-measuring.
65
+ */
66
+ export declare const WIDE_HFOV_DEG = 67;
67
+ /**
68
+ * Linear magnification of each FOV setting relative to the wide field.
69
+ *
70
+ * MEASURED 2026-07-25. These are the precise part of the pair: the ratios are
71
+ * good to ~0.05% where the anchor above is good to perhaps 0.5%.
72
+ *
73
+ * The continuous zoom writes to this same scale rather than multiplying on top
74
+ * of it — `narrow` plus zoom ratio 1.5 measures 2.509, the same as `wide` plus
75
+ * 1.5 (2.501), not 1.47 x 2.5. The discrete modes and the zoom control are two
76
+ * ways of writing to one magnification scale, which is why setting zoom ratio
77
+ * 1.0 does not reliably clear `custom`: it is the same optical state as `wide`.
78
+ */
79
+ export declare const FOV_MAGNIFICATION: Record<FovType, number>;
80
+ export declare const HORIZONTAL_FOV_DEG: Record<FovType, number>;
81
+ /**
82
+ * Empirical correction applied on top of the aspect-derived vertical half-angle.
83
+ * MEASURED, not geometric.
84
+ *
85
+ * Square-pixel geometry says tan(V) = tan(H) * (height/width) — 0.5625 at 16:9.
86
+ * Hardware says the vertical field is shorter than that; this factor carries the
87
+ * difference.
88
+ *
89
+ * MEASURED 2026-07-25 from the same intrinsics solve as WIDE_HFOV_DEG above.
90
+ * fy came out 1502-1520 px across every subset of six rotations, implying this
91
+ * factor at 0.957-0.967. Rounded to 0.957.
92
+ *
93
+ * This REPLACES an earlier value of 0.898, which was 7% low. That figure came
94
+ * from a measurement this project's own history recorded as inconclusive: the
95
+ * constant itself was off by about 6.2%, versus the ~4.3% effect it was trying
96
+ * to capture — roughly 1.4x the effect itself, not an order of magnitude off.
97
+ *
98
+ * The up/down asymmetry is ~1%, not the ~5% once believed: solving from the
99
+ * up-tilt alone gives 0.957 and from the down-tilt alone 0.967. One constant
100
+ * captures that comfortably. Do NOT reintroduce a two-branch vertical constant
101
+ * on the strength of the old figure. Both candidate explanations for a genuine
102
+ * asymmetry were tested and eliminated — the principal point is centred (cx, cy
103
+ * within a few px of frame centre in every solve) and radial distortion is
104
+ * negligible (k1 ~= -0.02).
105
+ *
106
+ * Verified head-to-head on hardware, same feature and same start pose with only
107
+ * this constant differing: a target at v = -0.83 left a pitch residual of -0.597
108
+ * degrees under 0.898 and +0.072 under 0.957, an 8x improvement that lands
109
+ * inside the noise.
110
+ *
111
+ * Known limit: the intrinsics fit carries 2.4-2.8 px rms, not sub-pixel, so
112
+ * something is unmodelled — most likely the entrance pupil sitting off the
113
+ * gimbal's rotation axes, which translates the lens as it turns and is
114
+ * depth-dependent. Sampling was symmetric so it should not bias fx or fy, but do
115
+ * not claim more precision than that.
116
+ *
117
+ * SCOPE: measured on the 16:9 capture path. A 4:3 path needs its own measurement.
118
+ */
119
+ export declare const VERTICAL_TANGENT_CORRECTION = 0.957;
120
+ /** Effective half-angles of the visible field, in degrees, after zoom and aspect. */
121
+ export declare function halfAngles(optics: Optics, frame: Frame): {
122
+ h: number;
123
+ v: number;
124
+ };
125
+ export interface Offset {
126
+ dYaw: number;
127
+ dPitch: number;
128
+ }
129
+ /**
130
+ * Convert a pixel in a captured frame to the yaw/pitch delta that would bring
131
+ * that point to the center of frame, treating each axis independently.
132
+ *
133
+ * PER-AXIS ONLY — this does NOT account for axis coupling. The gimbal's yaw
134
+ * axis is world-vertical, so yawing while pitched sweeps a cone; the two axes
135
+ * commute only at zero pitch or zero horizontal offset (see `aimAtPixel`,
136
+ * which composes a rotation instead and is what every tool actually points
137
+ * the camera with). Adding this function's dYaw/dPitch to a pose that is not
138
+ * level reproduces the additive bug `aimAtPixel` was fixed to remove. It is
139
+ * used only by tests now, to pin the per-axis tangent mapping in isolation
140
+ * from the coupling — do not reach for it as a general "point the camera"
141
+ * answer.
142
+ *
143
+ * A rectilinear lens maps angle through a tangent: tan(theta) = u * tan(hfov/2),
144
+ * where u is the normalized offset from center. The linear approximation is
145
+ * exact at the center and again at the edge, and wrong in between — always low,
146
+ * peaking near 1.58 degrees at u ~= 0.55 on the wide setting (WIDE_HFOV_DEG =
147
+ * 67). That error is the difference between landing on target and visibly
148
+ * hunting, so the tangent form is not optional.
149
+ *
150
+ * Signs: +yaw pans camera-LEFT and image x grows rightward, so the yaw term is
151
+ * negated. +pitch tilts DOWN and image y grows downward, so the pitch term is
152
+ * not. Both conventions are hardware-verified.
153
+ */
154
+ export declare function pixelToOffset(x: number, y: number, frame: Frame, optics: Optics): Offset;
155
+ /**
156
+ * Mechanical limits of the Tiny 2's gimbal, in degrees. Hardware-verified.
157
+ *
158
+ * These live here rather than in the tool layer so there is exactly one
159
+ * definition: `obsbot_gimbal_move` imports them for its own clamping. Two copies
160
+ * of a bound that must agree is a defect waiting to happen.
161
+ *
162
+ * ±150 is the mechanical yaw range on EVERY platform, and these limits are not
163
+ * platform-conditional. Measured 2026-07-25: commanded 145 reads back 145, and
164
+ * 150 reads back 149. Position feedback comes from the camera's physical
165
+ * encoder, which is a property of the hardware and does not vary by OS.
166
+ *
167
+ * Do not "fix" this to 130. `transport/linux.ts` and `transport/macos.ts` record
168
+ * a `CT_PANTILT_ABSOLUTE` range of ±468000 arcsec = ±130°, which reads like a
169
+ * conflict and was raised as one during review. It is not: that is the range the
170
+ * UVC control *advertises* — a descriptor value that under-reports the mechanism
171
+ * it describes — not where the gimbal stops. Nothing clamps to it either;
172
+ * `LinuxTransport.gimbalSet` writes `yawDeg * ARCSEC_PER_DEG` unclamped, so the
173
+ * arcsec figure lives only in comments. See the spec's §8.
174
+ */
175
+ export declare const GIMBAL_YAW_LIMIT_DEG = 150;
176
+ export declare const GIMBAL_PITCH_LIMIT_DEG = 90;
177
+ export interface Aim {
178
+ target: Pose;
179
+ /**
180
+ * The rotation REQUESTED to reach the raw, unclamped target —
181
+ * `rawTarget - current` — not the rotation actually applied. When `clamped`
182
+ * is true, `target` stops short of `current + offset`; `offset` still
183
+ * reports what was asked for, not what the gimbal was told to do.
184
+ */
185
+ offset: Offset;
186
+ /** True if either axis saturated, meaning the target was not reachable. */
187
+ clamped: boolean;
188
+ /**
189
+ * True when the target ray's horizontal direction points opposite the
190
+ * camera's current heading — an "over the top" solution. The pixel lies
191
+ * past vertical from the current pose and is not reachable by any rotation
192
+ * that keeps the image upright; clamping it to the nearest yaw would slew
193
+ * the camera toward the far side of the room, not toward the target.
194
+ */
195
+ overTheTop: boolean;
196
+ }
197
+ /**
198
+ * Absolute pose that brings the given pixel to the centre of frame.
199
+ *
200
+ * Composes a rotation rather than adding two scalars. The gimbal's yaw axis is
201
+ * world-vertical, so yawing while pitched sweeps a CONE: the two rotations do
202
+ * not commute, and `target = current + offset` is exact only at zero pitch or
203
+ * zero horizontal offset. Adding them cost 0.98 degrees at pitch 7.6 / yaw 31 on
204
+ * hardware, against `pitch * (1 - cos yaw)` = 1.09 predicted.
205
+ *
206
+ * The ray to the target in camera coordinates (x right, y down, z forward) is
207
+ * rotated into world coordinates by the current orientation, and the target pose
208
+ * is read back off that direction. The two axes reduce to the old additive sum
209
+ * under DIFFERENT conditions, not the same one: yaw reduces exactly to the old
210
+ * sum whenever pitch = 0, for any pixel, because yaw and pitch commute at zero
211
+ * tilt. Pitch reduces to the old sum only when u = 0 (the pixel sits on the
212
+ * vertical centre line) — composed pitch is asin(dy/n) where n includes dx, so
213
+ * away from u = 0 it differs from the old atan(dy) even when pitch is 0. That is
214
+ * what the invariant tests pin.
215
+ *
216
+ * Saturation is REPORTED, not silent: if the target lies outside the gimbal's
217
+ * range the caller has to know it landed short rather than assume the aim
218
+ * succeeded, since a silent clamp presents as "the camera aimed and missed".
219
+ *
220
+ * `current` must be where the camera actually was when the frame was captured.
221
+ * The module cannot verify that — see the spec's section 5 for what breaks it.
222
+ * Note that on Windows the pose the caller reads is FLOORED to whole degrees
223
+ * (spec section 4.2), which costs up to another degree; that is a separate
224
+ * defect in the pose source, not in this function.
225
+ */
226
+ export declare function aimAtPixel(x: number, y: number, frame: Frame, optics: Optics, current: Pose): Aim;