@fleetless/contracts 15.2.0 → 15.3.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/CHANGELOG.md CHANGED
@@ -9,6 +9,41 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [15.3.0] — 2026-11-13
13
+
14
+ ### Added
15
+
16
+ - **`passthrough` on the RTSP camera source** (fleetless/fleetless#1117).
17
+ `cameraSource`'s `rtsp` member takes an optional boolean `passthrough`.
18
+ With `true` the bridge forwards the camera's H.264 to live viewers and
19
+ neither decodes nor encodes the live video; absent means `false`, today's
20
+ decode and re-encode. The other three source kinds refuse the key.
21
+ - The description of the ROS source's `type` names a third type,
22
+ `foxglove_msgs/msg/CompressedVideo`, and says when a
23
+ `sensor_msgs/msg/CompressedImage` is passed through (its `format` contains
24
+ `h264`, in any case). The schema accepted any ROS type name before and
25
+ still does; the editor snippet now offers all three.
26
+ - The descriptions of `width`, `height`, `fps` and `bitrate_kbps` say what
27
+ they mean for a passthrough camera: its live video is not scaled, so
28
+ `width` and `height` must equal the stream's own size; `fps` and
29
+ `bitrate_kbps` are not enforced, `fps` bounds how often a snapshot is
30
+ taken, `bitrate_kbps` is what the track declares.
31
+ - The description of `low_bandwidth.camera: reduce` names its exception: a
32
+ passthrough stream is not encoded by the bridge, so it ends as under
33
+ `stop`. `camera_bitrate_kbps` and `passthrough` say the same.
34
+ - **`live.encoder`** (fleetless/fleetless#894). An optional key of the `live`
35
+ section that names what encodes live video on the robot: `software` (the
36
+ bridge's own encoder on the CPU, as before), `auto`, `nvenc`, `vaapi` or
37
+ `v4l2`. Every value but `software` sends H.264 from a hardware encoder and
38
+ falls back to software H.264 for the session when that encoder does not
39
+ start. A key present overrides the bridge's ROS parameter `live.encoder`;
40
+ an absent key leaves the parameter in force. It does not apply to a camera
41
+ whose H.264 source is passed through. Each value carries its own
42
+ description for the editor.
43
+ - `LIVE_DEFAULTS.encoder` is `software`, and `LIVE_BOUNDS.encoder.values`
44
+ lists the five values in the schema's order, as a read-only tuple. Both
45
+ are written into `constants.json` for the bridge.
46
+
12
47
  ## [15.2.0] — 2026-11-13
13
48
 
14
49
  ### Added
@@ -47,12 +47,22 @@
47
47
  "camera_bitrate_kbps": 300
48
48
  },
49
49
  "LIVE_DEFAULTS": {
50
- "max_packet_bytes": 1200
50
+ "max_packet_bytes": 1200,
51
+ "encoder": "software"
51
52
  },
52
53
  "LIVE_BOUNDS": {
53
54
  "max_packet_bytes": {
54
55
  "min": 576,
55
56
  "max": 1350
57
+ },
58
+ "encoder": {
59
+ "values": [
60
+ "software",
61
+ "auto",
62
+ "nvenc",
63
+ "vaapi",
64
+ "v4l2"
65
+ ]
56
66
  }
57
67
  }
58
68
  }
@@ -32159,7 +32159,7 @@
32159
32159
  "type": "string",
32160
32160
  "maxLength": 255,
32161
32161
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
32162
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
32162
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
32163
32163
  "examples": [
32164
32164
  "sensor_msgs/msg/Image"
32165
32165
  ]
@@ -32179,7 +32179,7 @@
32179
32179
  "kind": {
32180
32180
  "type": "string",
32181
32181
  "const": "rtsp",
32182
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
32182
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
32183
32183
  },
32184
32184
  "url": {
32185
32185
  "type": "string",
@@ -32199,6 +32199,10 @@
32199
32199
  "udp"
32200
32200
  ]
32201
32201
  },
32202
+ "passthrough": {
32203
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
32204
+ "type": "boolean"
32205
+ },
32202
32206
  "credentials": {
32203
32207
  "type": "object",
32204
32208
  "properties": {
@@ -32310,7 +32314,7 @@
32310
32314
  "type": "integer",
32311
32315
  "exclusiveMinimum": 0,
32312
32316
  "maximum": 7680,
32313
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
32317
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
32314
32318
  "examples": [
32315
32319
  1280
32316
32320
  ]
@@ -32319,7 +32323,7 @@
32319
32323
  "type": "integer",
32320
32324
  "exclusiveMinimum": 0,
32321
32325
  "maximum": 4320,
32322
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
32326
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
32323
32327
  "examples": [
32324
32328
  720
32325
32329
  ]
@@ -32328,7 +32332,7 @@
32328
32332
  "type": "integer",
32329
32333
  "exclusiveMinimum": 0,
32330
32334
  "maximum": 60,
32331
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
32335
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
32332
32336
  "examples": [
32333
32337
  15
32334
32338
  ]
@@ -32337,7 +32341,7 @@
32337
32341
  "type": "integer",
32338
32342
  "exclusiveMinimum": 0,
32339
32343
  "maximum": 50000,
32340
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
32344
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
32341
32345
  "examples": [
32342
32346
  2000
32343
32347
  ]
@@ -32539,7 +32543,7 @@
32539
32543
  ]
32540
32544
  },
32541
32545
  "camera_bitrate_kbps": {
32542
- "description": "Bitrate applied to running streams under `reduce`.",
32546
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
32543
32547
  "type": "integer",
32544
32548
  "minimum": 50,
32545
32549
  "maximum": 20000
@@ -32559,6 +32563,17 @@
32559
32563
  "type": "integer",
32560
32564
  "minimum": 576,
32561
32565
  "maximum": 1350
32566
+ },
32567
+ "encoder": {
32568
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
32569
+ "type": "string",
32570
+ "enum": [
32571
+ "software",
32572
+ "auto",
32573
+ "nvenc",
32574
+ "vaapi",
32575
+ "v4l2"
32576
+ ]
32562
32577
  }
32563
32578
  },
32564
32579
  "additionalProperties": false
@@ -33583,7 +33598,7 @@
33583
33598
  "type": "string",
33584
33599
  "maxLength": 255,
33585
33600
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
33586
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
33601
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
33587
33602
  "examples": [
33588
33603
  "sensor_msgs/msg/Image"
33589
33604
  ]
@@ -33603,7 +33618,7 @@
33603
33618
  "kind": {
33604
33619
  "type": "string",
33605
33620
  "const": "rtsp",
33606
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
33621
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
33607
33622
  },
33608
33623
  "url": {
33609
33624
  "type": "string",
@@ -33623,6 +33638,10 @@
33623
33638
  "udp"
33624
33639
  ]
33625
33640
  },
33641
+ "passthrough": {
33642
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
33643
+ "type": "boolean"
33644
+ },
33626
33645
  "credentials": {
33627
33646
  "type": "object",
33628
33647
  "properties": {
@@ -33734,7 +33753,7 @@
33734
33753
  "type": "integer",
33735
33754
  "exclusiveMinimum": 0,
33736
33755
  "maximum": 7680,
33737
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
33756
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
33738
33757
  "examples": [
33739
33758
  1280
33740
33759
  ]
@@ -33743,7 +33762,7 @@
33743
33762
  "type": "integer",
33744
33763
  "exclusiveMinimum": 0,
33745
33764
  "maximum": 4320,
33746
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
33765
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
33747
33766
  "examples": [
33748
33767
  720
33749
33768
  ]
@@ -33752,7 +33771,7 @@
33752
33771
  "type": "integer",
33753
33772
  "exclusiveMinimum": 0,
33754
33773
  "maximum": 60,
33755
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
33774
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
33756
33775
  "examples": [
33757
33776
  15
33758
33777
  ]
@@ -33761,7 +33780,7 @@
33761
33780
  "type": "integer",
33762
33781
  "exclusiveMinimum": 0,
33763
33782
  "maximum": 50000,
33764
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
33783
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
33765
33784
  "examples": [
33766
33785
  2000
33767
33786
  ]
@@ -33963,7 +33982,7 @@
33963
33982
  ]
33964
33983
  },
33965
33984
  "camera_bitrate_kbps": {
33966
- "description": "Bitrate applied to running streams under `reduce`.",
33985
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
33967
33986
  "type": "integer",
33968
33987
  "minimum": 50,
33969
33988
  "maximum": 20000
@@ -33983,6 +34002,17 @@
33983
34002
  "type": "integer",
33984
34003
  "minimum": 576,
33985
34004
  "maximum": 1350
34005
+ },
34006
+ "encoder": {
34007
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
34008
+ "type": "string",
34009
+ "enum": [
34010
+ "software",
34011
+ "auto",
34012
+ "nvenc",
34013
+ "vaapi",
34014
+ "v4l2"
34015
+ ]
33986
34016
  }
33987
34017
  },
33988
34018
  "additionalProperties": false
@@ -23,7 +23,7 @@
23
23
  "type": "string",
24
24
  "maxLength": 255,
25
25
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
26
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
26
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
27
27
  "patternErrorMessage": "A ROS 2 type name has three segments: the package, then `msg`, `srv` or `action`, then the type — `sensor_msgs/msg/BatteryState`, `std_srvs/srv/Trigger`, `nav2_msgs/action/NavigateToPose`. The middle segment is the one usually left out. The package is lower-case with underscores; the type itself is letters and digits, conventionally CamelCase.",
28
28
  "examples": [
29
29
  "sensor_msgs/msg/Image"
@@ -44,7 +44,7 @@
44
44
  "body": {
45
45
  "kind": "ros",
46
46
  "topic": "${1:/camera/image_raw}",
47
- "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
47
+ "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
48
48
  }
49
49
  }
50
50
  ]
@@ -55,7 +55,7 @@
55
55
  "kind": {
56
56
  "type": "string",
57
57
  "const": "rtsp",
58
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
58
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
59
59
  },
60
60
  "url": {
61
61
  "type": "string",
@@ -80,6 +80,10 @@
80
80
  "udp"
81
81
  ]
82
82
  },
83
+ "passthrough": {
84
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
85
+ "type": "boolean"
86
+ },
83
87
  "credentials": {
84
88
  "type": "object",
85
89
  "properties": {
@@ -1444,7 +1444,7 @@
1444
1444
  "type": "string",
1445
1445
  "maxLength": 255,
1446
1446
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
1447
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1447
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1448
1448
  "patternErrorMessage": "A ROS 2 type name has three segments: the package, then `msg`, `srv` or `action`, then the type — `sensor_msgs/msg/BatteryState`, `std_srvs/srv/Trigger`, `nav2_msgs/action/NavigateToPose`. The middle segment is the one usually left out. The package is lower-case with underscores; the type itself is letters and digits, conventionally CamelCase.",
1449
1449
  "examples": [
1450
1450
  "sensor_msgs/msg/Image"
@@ -1465,7 +1465,7 @@
1465
1465
  "body": {
1466
1466
  "kind": "ros",
1467
1467
  "topic": "${1:/camera/image_raw}",
1468
- "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
1468
+ "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
1469
1469
  }
1470
1470
  }
1471
1471
  ]
@@ -1476,7 +1476,7 @@
1476
1476
  "kind": {
1477
1477
  "type": "string",
1478
1478
  "const": "rtsp",
1479
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
1479
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
1480
1480
  },
1481
1481
  "url": {
1482
1482
  "type": "string",
@@ -1501,6 +1501,10 @@
1501
1501
  "udp"
1502
1502
  ]
1503
1503
  },
1504
+ "passthrough": {
1505
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
1506
+ "type": "boolean"
1507
+ },
1504
1508
  "credentials": {
1505
1509
  "type": "object",
1506
1510
  "properties": {
@@ -1664,7 +1668,7 @@
1664
1668
  "type": "integer",
1665
1669
  "exclusiveMinimum": 0,
1666
1670
  "maximum": 7680,
1667
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
1671
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1668
1672
  "examples": [
1669
1673
  1280
1670
1674
  ]
@@ -1673,7 +1677,7 @@
1673
1677
  "type": "integer",
1674
1678
  "exclusiveMinimum": 0,
1675
1679
  "maximum": 4320,
1676
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
1680
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1677
1681
  "examples": [
1678
1682
  720
1679
1683
  ]
@@ -1682,7 +1686,7 @@
1682
1686
  "type": "integer",
1683
1687
  "exclusiveMinimum": 0,
1684
1688
  "maximum": 60,
1685
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
1689
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
1686
1690
  "examples": [
1687
1691
  15
1688
1692
  ]
@@ -1691,7 +1695,7 @@
1691
1695
  "type": "integer",
1692
1696
  "exclusiveMinimum": 0,
1693
1697
  "maximum": 50000,
1694
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
1698
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
1695
1699
  "examples": [
1696
1700
  2000
1697
1701
  ]
@@ -2041,7 +2045,7 @@
2041
2045
  "camera": {
2042
2046
  "description": "What happens to a running stream in the mode. New streams are refused either way.",
2043
2047
  "enumDescriptions": [
2044
- "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.",
2048
+ "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.",
2045
2049
  "A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have."
2046
2050
  ],
2047
2051
  "type": "string",
@@ -2051,7 +2055,7 @@
2051
2055
  ]
2052
2056
  },
2053
2057
  "camera_bitrate_kbps": {
2054
- "description": "Bitrate applied to running streams under `reduce`.",
2058
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
2055
2059
  "type": "integer",
2056
2060
  "minimum": 50,
2057
2061
  "maximum": 20000
@@ -2080,6 +2084,24 @@
2080
2084
  "type": "integer",
2081
2085
  "minimum": 576,
2082
2086
  "maximum": 1350
2087
+ },
2088
+ "encoder": {
2089
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2090
+ "enumDescriptions": [
2091
+ "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2092
+ "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2093
+ "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2094
+ "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2095
+ "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2096
+ ],
2097
+ "type": "string",
2098
+ "enum": [
2099
+ "software",
2100
+ "auto",
2101
+ "nvenc",
2102
+ "vaapi",
2103
+ "v4l2"
2104
+ ]
2083
2105
  }
2084
2106
  },
2085
2107
  "additionalProperties": false
@@ -1437,7 +1437,7 @@
1437
1437
  "type": "string",
1438
1438
  "maxLength": 255,
1439
1439
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
1440
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1440
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1441
1441
  "patternErrorMessage": "A ROS 2 type name has three segments: the package, then `msg`, `srv` or `action`, then the type — `sensor_msgs/msg/BatteryState`, `std_srvs/srv/Trigger`, `nav2_msgs/action/NavigateToPose`. The middle segment is the one usually left out. The package is lower-case with underscores; the type itself is letters and digits, conventionally CamelCase.",
1442
1442
  "examples": [
1443
1443
  "sensor_msgs/msg/Image"
@@ -1458,7 +1458,7 @@
1458
1458
  "body": {
1459
1459
  "kind": "ros",
1460
1460
  "topic": "${1:/camera/image_raw}",
1461
- "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
1461
+ "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
1462
1462
  }
1463
1463
  }
1464
1464
  ]
@@ -1469,7 +1469,7 @@
1469
1469
  "kind": {
1470
1470
  "type": "string",
1471
1471
  "const": "rtsp",
1472
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
1472
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
1473
1473
  },
1474
1474
  "url": {
1475
1475
  "type": "string",
@@ -1494,6 +1494,10 @@
1494
1494
  "udp"
1495
1495
  ]
1496
1496
  },
1497
+ "passthrough": {
1498
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
1499
+ "type": "boolean"
1500
+ },
1497
1501
  "credentials": {
1498
1502
  "type": "object",
1499
1503
  "properties": {
@@ -1657,7 +1661,7 @@
1657
1661
  "type": "integer",
1658
1662
  "exclusiveMinimum": 0,
1659
1663
  "maximum": 7680,
1660
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
1664
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1661
1665
  "examples": [
1662
1666
  1280
1663
1667
  ]
@@ -1666,7 +1670,7 @@
1666
1670
  "type": "integer",
1667
1671
  "exclusiveMinimum": 0,
1668
1672
  "maximum": 4320,
1669
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
1673
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1670
1674
  "examples": [
1671
1675
  720
1672
1676
  ]
@@ -1675,7 +1679,7 @@
1675
1679
  "type": "integer",
1676
1680
  "exclusiveMinimum": 0,
1677
1681
  "maximum": 60,
1678
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
1682
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
1679
1683
  "examples": [
1680
1684
  15
1681
1685
  ]
@@ -1684,7 +1688,7 @@
1684
1688
  "type": "integer",
1685
1689
  "exclusiveMinimum": 0,
1686
1690
  "maximum": 50000,
1687
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
1691
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
1688
1692
  "examples": [
1689
1693
  2000
1690
1694
  ]
@@ -2034,7 +2038,7 @@
2034
2038
  "camera": {
2035
2039
  "description": "What happens to a running stream in the mode. New streams are refused either way.",
2036
2040
  "enumDescriptions": [
2037
- "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.",
2041
+ "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.",
2038
2042
  "A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have."
2039
2043
  ],
2040
2044
  "type": "string",
@@ -2044,7 +2048,7 @@
2044
2048
  ]
2045
2049
  },
2046
2050
  "camera_bitrate_kbps": {
2047
- "description": "Bitrate applied to running streams under `reduce`.",
2051
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
2048
2052
  "type": "integer",
2049
2053
  "minimum": 50,
2050
2054
  "maximum": 20000
@@ -2073,6 +2077,24 @@
2073
2077
  "type": "integer",
2074
2078
  "minimum": 576,
2075
2079
  "maximum": 1350
2080
+ },
2081
+ "encoder": {
2082
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2083
+ "enumDescriptions": [
2084
+ "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2085
+ "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2086
+ "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2087
+ "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2088
+ "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2089
+ ],
2090
+ "type": "string",
2091
+ "enum": [
2092
+ "software",
2093
+ "auto",
2094
+ "nvenc",
2095
+ "vaapi",
2096
+ "v4l2"
2097
+ ]
2076
2098
  }
2077
2099
  },
2078
2100
  "additionalProperties": false
@@ -1475,7 +1475,7 @@
1475
1475
  "type": "string",
1476
1476
  "maxLength": 255,
1477
1477
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
1478
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1478
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1479
1479
  "patternErrorMessage": "A ROS 2 type name has three segments: the package, then `msg`, `srv` or `action`, then the type — `sensor_msgs/msg/BatteryState`, `std_srvs/srv/Trigger`, `nav2_msgs/action/NavigateToPose`. The middle segment is the one usually left out. The package is lower-case with underscores; the type itself is letters and digits, conventionally CamelCase.",
1480
1480
  "examples": [
1481
1481
  "sensor_msgs/msg/Image"
@@ -1496,7 +1496,7 @@
1496
1496
  "body": {
1497
1497
  "kind": "ros",
1498
1498
  "topic": "${1:/camera/image_raw}",
1499
- "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
1499
+ "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
1500
1500
  }
1501
1501
  }
1502
1502
  ]
@@ -1507,7 +1507,7 @@
1507
1507
  "kind": {
1508
1508
  "type": "string",
1509
1509
  "const": "rtsp",
1510
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
1510
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
1511
1511
  },
1512
1512
  "url": {
1513
1513
  "type": "string",
@@ -1532,6 +1532,10 @@
1532
1532
  "udp"
1533
1533
  ]
1534
1534
  },
1535
+ "passthrough": {
1536
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
1537
+ "type": "boolean"
1538
+ },
1535
1539
  "credentials": {
1536
1540
  "type": "object",
1537
1541
  "properties": {
@@ -1695,7 +1699,7 @@
1695
1699
  "type": "integer",
1696
1700
  "exclusiveMinimum": 0,
1697
1701
  "maximum": 7680,
1698
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
1702
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1699
1703
  "examples": [
1700
1704
  1280
1701
1705
  ]
@@ -1704,7 +1708,7 @@
1704
1708
  "type": "integer",
1705
1709
  "exclusiveMinimum": 0,
1706
1710
  "maximum": 4320,
1707
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
1711
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1708
1712
  "examples": [
1709
1713
  720
1710
1714
  ]
@@ -1713,7 +1717,7 @@
1713
1717
  "type": "integer",
1714
1718
  "exclusiveMinimum": 0,
1715
1719
  "maximum": 60,
1716
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
1720
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
1717
1721
  "examples": [
1718
1722
  15
1719
1723
  ]
@@ -1722,7 +1726,7 @@
1722
1726
  "type": "integer",
1723
1727
  "exclusiveMinimum": 0,
1724
1728
  "maximum": 50000,
1725
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
1729
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
1726
1730
  "examples": [
1727
1731
  2000
1728
1732
  ]
@@ -2072,7 +2076,7 @@
2072
2076
  "camera": {
2073
2077
  "description": "What happens to a running stream in the mode. New streams are refused either way.",
2074
2078
  "enumDescriptions": [
2075
- "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.",
2079
+ "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.",
2076
2080
  "A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have."
2077
2081
  ],
2078
2082
  "type": "string",
@@ -2082,7 +2086,7 @@
2082
2086
  ]
2083
2087
  },
2084
2088
  "camera_bitrate_kbps": {
2085
- "description": "Bitrate applied to running streams under `reduce`.",
2089
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
2086
2090
  "type": "integer",
2087
2091
  "minimum": 50,
2088
2092
  "maximum": 20000
@@ -2111,6 +2115,24 @@
2111
2115
  "type": "integer",
2112
2116
  "minimum": 576,
2113
2117
  "maximum": 1350
2118
+ },
2119
+ "encoder": {
2120
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2121
+ "enumDescriptions": [
2122
+ "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2123
+ "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2124
+ "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2125
+ "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2126
+ "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2127
+ ],
2128
+ "type": "string",
2129
+ "enum": [
2130
+ "software",
2131
+ "auto",
2132
+ "nvenc",
2133
+ "vaapi",
2134
+ "v4l2"
2135
+ ]
2114
2136
  }
2115
2137
  },
2116
2138
  "additionalProperties": false
@@ -1432,7 +1432,7 @@
1432
1432
  "type": "string",
1433
1433
  "maxLength": 255,
1434
1434
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
1435
- "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1435
+ "description": "The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream's size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.",
1436
1436
  "patternErrorMessage": "A ROS 2 type name has three segments: the package, then `msg`, `srv` or `action`, then the type — `sensor_msgs/msg/BatteryState`, `std_srvs/srv/Trigger`, `nav2_msgs/action/NavigateToPose`. The middle segment is the one usually left out. The package is lower-case with underscores; the type itself is letters and digits, conventionally CamelCase.",
1437
1437
  "examples": [
1438
1438
  "sensor_msgs/msg/Image"
@@ -1453,7 +1453,7 @@
1453
1453
  "body": {
1454
1454
  "kind": "ros",
1455
1455
  "topic": "${1:/camera/image_raw}",
1456
- "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}"
1456
+ "type": "${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}"
1457
1457
  }
1458
1458
  }
1459
1459
  ]
@@ -1464,7 +1464,7 @@
1464
1464
  "kind": {
1465
1465
  "type": "string",
1466
1466
  "const": "rtsp",
1467
- "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`."
1467
+ "description": "Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`."
1468
1468
  },
1469
1469
  "url": {
1470
1470
  "type": "string",
@@ -1489,6 +1489,10 @@
1489
1489
  "udp"
1490
1490
  ]
1491
1491
  },
1492
+ "passthrough": {
1493
+ "description": "Passes the camera's own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream's own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera's next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.",
1494
+ "type": "boolean"
1495
+ },
1492
1496
  "credentials": {
1493
1497
  "type": "object",
1494
1498
  "properties": {
@@ -1652,7 +1656,7 @@
1652
1656
  "type": "integer",
1653
1657
  "exclusiveMinimum": 0,
1654
1658
  "maximum": 7680,
1655
- "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed.",
1659
+ "description": "The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer's request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream's own size.",
1656
1660
  "examples": [
1657
1661
  1280
1658
1662
  ]
@@ -1661,7 +1665,7 @@
1661
1665
  "type": "integer",
1662
1666
  "exclusiveMinimum": 0,
1663
1667
  "maximum": 4320,
1664
- "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.",
1668
+ "description": "The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream's own size.",
1665
1669
  "examples": [
1666
1670
  720
1667
1671
  ]
@@ -1670,7 +1674,7 @@
1670
1674
  "type": "integer",
1671
1675
  "exclusiveMinimum": 0,
1672
1676
  "maximum": 60,
1673
- "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.",
1677
+ "description": "How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.",
1674
1678
  "examples": [
1675
1679
  15
1676
1680
  ]
@@ -1679,7 +1683,7 @@
1679
1683
  "type": "integer",
1680
1684
  "exclusiveMinimum": 0,
1681
1685
  "maximum": 50000,
1682
- "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.",
1686
+ "description": "The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot's uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.",
1683
1687
  "examples": [
1684
1688
  2000
1685
1689
  ]
@@ -2029,7 +2033,7 @@
2029
2033
  "camera": {
2030
2034
  "description": "What happens to a running stream in the mode. New streams are refused either way.",
2031
2035
  "enumDescriptions": [
2032
- "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.",
2036
+ "A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.",
2033
2037
  "A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have."
2034
2038
  ],
2035
2039
  "type": "string",
@@ -2039,7 +2043,7 @@
2039
2043
  ]
2040
2044
  },
2041
2045
  "camera_bitrate_kbps": {
2042
- "description": "Bitrate applied to running streams under `reduce`.",
2046
+ "description": "Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.",
2043
2047
  "type": "integer",
2044
2048
  "minimum": 50,
2045
2049
  "maximum": 20000
@@ -2068,6 +2072,24 @@
2068
2072
  "type": "integer",
2069
2073
  "minimum": 576,
2070
2074
  "maximum": 1350
2075
+ },
2076
+ "encoder": {
2077
+ "description": "What encodes live video on the robot. `software` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter `live.encoder`; without either, the bridge uses `software`. A change holds from the next live start; a running stream keeps its encoder.",
2078
+ "enumDescriptions": [
2079
+ "The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.",
2080
+ "Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.",
2081
+ "NVIDIA. On a Jetson the board's encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.",
2082
+ "Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.",
2083
+ "A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software."
2084
+ ],
2085
+ "type": "string",
2086
+ "enum": [
2087
+ "software",
2088
+ "auto",
2089
+ "nvenc",
2090
+ "vaapi",
2091
+ "v4l2"
2092
+ ]
2071
2093
  }
2072
2094
  },
2073
2095
  "additionalProperties": false
package/dist/config.d.ts CHANGED
@@ -544,6 +544,7 @@ export declare const cameraSource: z.ZodDiscriminatedUnion<[z.ZodObject<{
544
544
  tcp: "tcp";
545
545
  udp: "udp";
546
546
  }>>;
547
+ passthrough: z.ZodOptional<z.ZodBoolean>;
547
548
  credentials: z.ZodOptional<z.ZodObject<{
548
549
  username: z.ZodOptional<z.ZodString>;
549
550
  password: z.ZodOptional<z.ZodString>;
@@ -601,6 +602,7 @@ export declare const cameraConfig: z.ZodObject<{
601
602
  tcp: "tcp";
602
603
  udp: "udp";
603
604
  }>>;
605
+ passthrough: z.ZodOptional<z.ZodBoolean>;
604
606
  credentials: z.ZodOptional<z.ZodObject<{
605
607
  username: z.ZodOptional<z.ZodString>;
606
608
  password: z.ZodOptional<z.ZodString>;
@@ -683,9 +685,15 @@ export type LowBandwidthSection = z.infer<typeof lowBandwidthSection>;
683
685
  * smallest IPv6 guarantees, and what NetBird and Tailscale set — carries it:
684
686
  * the bytes a packet gains on the way (header extensions an SFU may add, the
685
687
  * SRTP tag, UDP, IP, TURN) come to about 80 at most.
688
+ *
689
+ * `software` is the encoder the bridge has always had, so a bridge upgrade
690
+ * changes no robot. Hardware is opt-in for a reason the fallback cannot
691
+ * cover: it catches an encoder that does not start, not one that starts and
692
+ * draws the wrong picture.
686
693
  */
687
694
  export declare const LIVE_DEFAULTS: {
688
695
  readonly max_packet_bytes: 1200;
696
+ readonly encoder: "software";
689
697
  };
690
698
  /**
691
699
  * The bounds of the `live` settings, exported into `constants.json` beside the
@@ -699,16 +707,24 @@ export declare const LIVE_DEFAULTS: {
699
707
  * larger setting is not a bigger packet but no video, and it is refused where
700
708
  * the configuration is saved. 1350 rather than 1356: a number a person can
701
709
  * remember, and nothing is lost in six bytes.
710
+ *
711
+ * An enum's bounds are its values: `encoder.values` is the list the schema
712
+ * accepts, in the schema's order, so the bridge's parameter callback refuses
713
+ * a sixth name with the list the cloud refuses it with.
702
714
  */
703
715
  export declare const LIVE_BOUNDS: {
704
716
  readonly max_packet_bytes: {
705
717
  readonly min: 576;
706
718
  readonly max: 1350;
707
719
  };
720
+ readonly encoder: {
721
+ readonly values: readonly ["software", "auto", "nvenc", "vaapi", "v4l2"];
722
+ };
708
723
  };
709
724
  /**
710
- * How the bridge sends live video: settings of the transport, which hold for
711
- * the whole robot and not for one camera. Every key is optional and layered
725
+ * How the bridge sends live video: settings of the transport and of the
726
+ * encoder, which hold for the whole robot and not for one camera — the path
727
+ * and the chip belong to the computer. Every key is optional and layered
712
728
  * as in `lowBandwidthSection`: a key present here overrides the bridge's ROS
713
729
  * parameter of the same name, an absent key falls through to it, and the
714
730
  * parameter falls through to `LIVE_DEFAULTS`.
@@ -720,6 +736,13 @@ export declare const LIVE_BOUNDS: {
720
736
  */
721
737
  export declare const liveSection: z.ZodObject<{
722
738
  max_packet_bytes: z.ZodOptional<z.ZodNumber>;
739
+ encoder: z.ZodOptional<z.ZodEnum<{
740
+ v4l2: "v4l2";
741
+ auto: "auto";
742
+ software: "software";
743
+ nvenc: "nvenc";
744
+ vaapi: "vaapi";
745
+ }>>;
723
746
  }, z.core.$strict>;
724
747
  export type LiveSection = z.infer<typeof liveSection>;
725
748
  /**
@@ -935,6 +958,7 @@ export declare const robotConfigDoc: z.ZodObject<{
935
958
  tcp: "tcp";
936
959
  udp: "udp";
937
960
  }>>;
961
+ passthrough: z.ZodOptional<z.ZodBoolean>;
938
962
  credentials: z.ZodOptional<z.ZodObject<{
939
963
  username: z.ZodOptional<z.ZodString>;
940
964
  password: z.ZodOptional<z.ZodString>;
@@ -990,6 +1014,13 @@ export declare const robotConfigDoc: z.ZodObject<{
990
1014
  }, z.core.$strict>>;
991
1015
  live: z.ZodOptional<z.ZodObject<{
992
1016
  max_packet_bytes: z.ZodOptional<z.ZodNumber>;
1017
+ encoder: z.ZodOptional<z.ZodEnum<{
1018
+ v4l2: "v4l2";
1019
+ auto: "auto";
1020
+ software: "software";
1021
+ nvenc: "nvenc";
1022
+ vaapi: "vaapi";
1023
+ }>>;
993
1024
  }, z.core.$strict>>;
994
1025
  }, z.core.$strict>;
995
1026
  export type RobotConfigDoc = z.infer<typeof robotConfigDoc>;
package/dist/config.js CHANGED
@@ -1627,7 +1627,7 @@ export const cameraSource = z.discriminatedUnion('kind', [
1627
1627
  examples: ['/camera/image_raw'],
1628
1628
  }),
1629
1629
  type: rosTypeName.meta({
1630
- description: 'The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.',
1630
+ description: 'The message type of `topic`: `sensor_msgs/msg/Image` for raw frames, `sensor_msgs/msg/CompressedImage` for a camera that already encodes, `foxglove_msgs/msg/CompressedVideo` for a topic that carries H.264. H.264 is passed through to live viewers without the bridge decoding or encoding it: always for `CompressedVideo`, and for a `CompressedImage` whose `format` contains `h264`, in any case. A `CompressedImage` that carries JPEG stays a picture source. A camera that is passed through follows what `passthrough` says on an RTSP source: `width` and `height` must equal the stream\'s size, B-frames are refused, a new viewer waits for the next keyframe, and low-bandwidth mode ends its stream. The bridge does not depend on `foxglove_msgs`; a robot without the package reports `unknown type` for that one camera. Declared here rather than introspected, so a camera can be configured for a robot that has never connected.',
1631
1631
  patternErrorMessage: ROS_TYPE_NAME_RULE,
1632
1632
  examples: ['sensor_msgs/msg/Image'],
1633
1633
  }),
@@ -1639,11 +1639,12 @@ export const cameraSource = z.discriminatedUnion('kind', [
1639
1639
  /**
1640
1640
  * `type` is a **choice**, not a literal, and that is a correction: it was
1641
1641
  * written out on the rule that a field the format fixes is written out,
1642
- * and `type` is not such a field. Its own description names two values
1642
+ * and `type` is not such a field. Its own description names three values
1643
1643
  * and says which applies when — `Image` for raw frames,
1644
- * `CompressedImage` for a camera that encodes itself. A snippet that
1645
- * picks one picks wrong for half the cameras, and picks it invisibly:
1646
- * `rosTypeName` accepts either, publish accepts either, no diagnostic
1644
+ * `CompressedImage` for a camera that encodes itself, `CompressedVideo`
1645
+ * for a topic that carries H.264. A snippet that
1646
+ * picks one picks wrong for most cameras, and picks it invisibly:
1647
+ * `rosTypeName` accepts any of them, publish accepts any, no diagnostic
1647
1648
  * fires anywhere, and the bridge then subscribes with the wrong type and
1648
1649
  * delivers no frames. A snippet supplying a wrong answer where it could
1649
1650
  * have supplied a question is a defect arriving through a hint the
@@ -1654,22 +1655,22 @@ export const cameraSource = z.discriminatedUnion('kind', [
1654
1655
  * Choice syntax is the one construct here that three layers must each
1655
1656
  * pass through unharmed: yaml-language-server's `stringifyObject` emits
1656
1657
  * the body verbatim, and monaco-editor's `SnippetParser` parses
1657
- * `${2|a,b|}` into a placeholder carrying both options whose
1658
+ * `${2|a,b,c|}` into a placeholder carrying every option whose
1658
1659
  * `toString()` — the text on the buffer before anyone chooses — is the
1659
1660
  * first one. So a developer who tabs past this gets a document
1660
1661
  * byte-identical to the literal it replaced, and one who opens the
1661
- * picker gets `CompressedImage`; both parse.
1662
+ * picker gets `CompressedImage` or `CompressedVideo`; all three parse.
1662
1663
  */
1663
1664
  body: {
1664
1665
  kind: 'ros',
1665
1666
  topic: '${1:/camera/image_raw}',
1666
- type: '${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage|}',
1667
+ type: '${2|sensor_msgs/msg/Image,sensor_msgs/msg/CompressedImage,foxglove_msgs/msg/CompressedVideo|}',
1667
1668
  },
1668
1669
  }],
1669
1670
  }),
1670
1671
  strictObject({
1671
1672
  kind: z.literal('rtsp').meta({
1672
- description: 'Selects the RTSP source: this camera then carries `url`, and optionally `transport` and `credentials`.',
1673
+ description: 'Selects the RTSP source: this camera then carries `url`, and optionally `transport`, `passthrough` and `credentials`.',
1673
1674
  }),
1674
1675
  /**
1675
1676
  * Scheme-constrained deliberately. The bridge opens these with libraries
@@ -1697,6 +1698,19 @@ export const cameraSource = z.discriminatedUnion('kind', [
1697
1698
  udp: 'The frames travel in their own UDP stream: lower latency on a quiet network, and silent frame loss on any other.',
1698
1699
  }),
1699
1700
  }),
1701
+ /**
1702
+ * Opt-in, and absent rather than defaulted: an RTSP camera that exists
1703
+ * today is decoded and encoded again after an upgrade exactly as before,
1704
+ * and a parse writes no `false` into a document nobody put one in. The
1705
+ * bridge reads absent as off (fleetless/fleetless#1117).
1706
+ *
1707
+ * RTSP is the one source that carries this switch. A ROS topic is passed
1708
+ * through by what it carries, see `type` on the `ros` member; MJPEG and
1709
+ * V4L2 are never passed through.
1710
+ */
1711
+ passthrough: z.boolean().optional().meta({
1712
+ description: 'Passes the camera\'s own H.264 through to live viewers: the bridge forwards the access units it receives and neither decodes nor encodes the live video. A snapshot is decoded from the newest keyframe, so it is at most one keyframe interval old. Omitted means `false`: the stream is decoded and encoded again, and `fps` and `bitrate_kbps` are enforced. With `true`, `width` and `height` must equal the stream\'s own size, or the camera reports an error naming both and publishes nothing. `fps` and `bitrate_kbps` are not enforced then: the bridge cannot drop or shrink frames it does not encode, so both are set at the camera. The stream must be H.264 without B-frames; anything else is refused with a camera error. A new viewer waits for the camera\'s next keyframe, so set its keyframe interval to one to two seconds. Low-bandwidth mode ends such a stream, under `camera: reduce` as under `stop`: there is no bitrate to lower.',
1713
+ }),
1700
1714
  credentials: cameraCredentials.optional(),
1701
1715
  }).meta({
1702
1716
  description: 'Frames come from an RTSP stream the robot itself can reach — a network camera on its own LAN. The bridge opens the connection; the cloud never does, and never needs a route to the camera.',
@@ -1852,19 +1866,19 @@ export const cameraConfig = strictObject({
1852
1866
  description: 'Where this camera\'s frames come from. `kind` picks one of four sources and fixes which other fields the source may carry, so an impossible camera is unrepresentable rather than merely invalid — there is no way to write an RTSP camera with a ROS topic.',
1853
1867
  }),
1854
1868
  width: z.number().int().positive().max(7680).meta({
1855
- description: 'The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer\'s request, so no client can make the robot encode a larger frame than the developer allowed.',
1869
+ description: 'The width the bridge scales frames to before sending, in pixels — what the bridge produces, not what the sensor captures; a snapshot can arrive narrower, since the bridge reduces both dimensions together to fit its JPEG byte ceiling. It stands in the configuration and never in a viewer\'s request, so no client can make the robot encode a larger frame than the developer allowed. A passthrough camera is the exception for live video: the bridge does not scale what it does not encode, so `width` and `height` must equal the stream\'s own size.',
1856
1870
  examples: [1280],
1857
1871
  }),
1858
1872
  height: z.number().int().positive().max(4320).meta({
1859
- description: 'The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded.',
1873
+ description: 'The height the bridge scales every frame to, in pixels; with `width` it is the size the live stream carries. A snapshot can arrive **smaller** than this — its JPEG has a byte ceiling, and the bridge gives up quality first and then resolution to fit, reporting the size it actually encoded. The live video of a passthrough camera is not scaled: `height` and `width` must equal the stream\'s own size.',
1860
1874
  examples: [720],
1861
1875
  }),
1862
1876
  fps: z.number().int().positive().max(60).meta({
1863
- description: 'How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be.',
1877
+ description: 'How many frames a second the bridge forwards, at most. It is a ceiling, not a clock: a camera that delivers ten frames a second stays at ten. Both modes read the same throttled pipeline, so this also bounds how fresh a snapshot can be. A passthrough camera is the exception: the bridge forwards its H.264 at the rate the source sends it, and `fps` only bounds how often a snapshot is taken.',
1864
1878
  examples: [15],
1865
1879
  }),
1866
1880
  bitrate_kbps: z.number().int().positive().max(50_000).meta({
1867
- description: 'The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot\'s uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail.',
1881
+ description: 'The ceiling for the **live** encoding, in kilobits per second — this is what bounds a watched camera against the robot\'s uplink. Snapshots are not covered by it: they are JPEGs under their own byte ceiling. Raising `width`, `height` or `fps` against a fixed bitrate buys blur, not detail. A passthrough camera is not encoded by the bridge, so nothing enforces this number there: the bitrate is set at the source, and this value is only what the track declares to the media server.',
1868
1882
  examples: [2000],
1869
1883
  }),
1870
1884
  snapshot_interval_seconds: snapshotIntervalSeconds.meta({
@@ -1933,11 +1947,11 @@ export const lowBandwidthSection = strictObject({
1933
1947
  camera: lowBandwidthCamera.optional().meta({
1934
1948
  description: 'What happens to a running stream in the mode. New streams are refused either way.',
1935
1949
  enumDescriptions: describeValues(lowBandwidthCamera.options, {
1936
- reduce: 'A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none.',
1950
+ reduce: 'A running stream is re-encoded at `camera_bitrate_kbps` and keeps running. A viewer sees a worse picture rather than none. A passthrough camera is the exception: the bridge does not encode it, so its stream ends as under `stop`.',
1937
1951
  stop: 'A running stream ends and the viewer is told why. The uplink is then free for datapoints, which is the right trade where video is the nice-to-have.',
1938
1952
  }),
1939
1953
  }),
1940
- camera_bitrate_kbps: z.number().int().min(50).max(20000).optional().meta({ description: 'Bitrate applied to running streams under `reduce`.' }),
1954
+ camera_bitrate_kbps: z.number().int().min(50).max(20000).optional().meta({ description: 'Bitrate applied to running streams under `reduce`. A passthrough stream is not encoded by the bridge, so there is no bitrate to reduce and the stream ends.' }),
1941
1955
  })
1942
1956
  .superRefine((s, ctx) => {
1943
1957
  if (s.enter_lag_ms !== undefined && s.exit_lag_ms !== undefined && s.exit_lag_ms > s.enter_lag_ms)
@@ -1953,10 +1967,32 @@ export const lowBandwidthSection = strictObject({
1953
1967
  * smallest IPv6 guarantees, and what NetBird and Tailscale set — carries it:
1954
1968
  * the bytes a packet gains on the way (header extensions an SFU may add, the
1955
1969
  * SRTP tag, UDP, IP, TURN) come to about 80 at most.
1970
+ *
1971
+ * `software` is the encoder the bridge has always had, so a bridge upgrade
1972
+ * changes no robot. Hardware is opt-in for a reason the fallback cannot
1973
+ * cover: it catches an encoder that does not start, not one that starts and
1974
+ * draws the wrong picture.
1956
1975
  */
1957
1976
  export const LIVE_DEFAULTS = {
1958
1977
  max_packet_bytes: 1200,
1978
+ encoder: 'software',
1959
1979
  };
1980
+ /**
1981
+ * What may encode live video, declared once as a tuple: the enum is built
1982
+ * from it and `LIVE_BOUNDS` exports it. Its own array and `readonly` in the
1983
+ * type, so a consumer that sorted the exported list could not reorder the
1984
+ * enum's options with it.
1985
+ *
1986
+ * `auto` tries the three hardware names in the order they stand here. The
1987
+ * vendor-specific ones come before the generic `v4l2`, which on some boards
1988
+ * finds a device it cannot drive.
1989
+ */
1990
+ const LIVE_ENCODERS = ['software', 'auto', 'nvenc', 'vaapi', 'v4l2'];
1991
+ /**
1992
+ * Named rather than inlined, for `chartStyle`'s reason: `describeValues`
1993
+ * reads `.options`, and the per-value sentences are then keyed by value.
1994
+ */
1995
+ const liveEncoder = z.enum(LIVE_ENCODERS);
1960
1996
  /**
1961
1997
  * The bounds of the `live` settings, exported into `constants.json` beside the
1962
1998
  * defaults: the bridge refuses a ROS parameter outside them with the same
@@ -1969,13 +2005,19 @@ export const LIVE_DEFAULTS = {
1969
2005
  * larger setting is not a bigger packet but no video, and it is refused where
1970
2006
  * the configuration is saved. 1350 rather than 1356: a number a person can
1971
2007
  * remember, and nothing is lost in six bytes.
2008
+ *
2009
+ * An enum's bounds are its values: `encoder.values` is the list the schema
2010
+ * accepts, in the schema's order, so the bridge's parameter callback refuses
2011
+ * a sixth name with the list the cloud refuses it with.
1972
2012
  */
1973
2013
  export const LIVE_BOUNDS = {
1974
2014
  max_packet_bytes: { min: 576, max: 1350 },
2015
+ encoder: { values: LIVE_ENCODERS },
1975
2016
  };
1976
2017
  /**
1977
- * How the bridge sends live video: settings of the transport, which hold for
1978
- * the whole robot and not for one camera. Every key is optional and layered
2018
+ * How the bridge sends live video: settings of the transport and of the
2019
+ * encoder, which hold for the whole robot and not for one camera — the path
2020
+ * and the chip belong to the computer. Every key is optional and layered
1979
2021
  * as in `lowBandwidthSection`: a key present here overrides the bridge's ROS
1980
2022
  * parameter of the same name, an absent key falls through to it, and the
1981
2023
  * parameter falls through to `LIVE_DEFAULTS`.
@@ -1990,6 +2032,16 @@ export const liveSection = strictObject({
1990
2032
  description: `The largest RTP packet the bridge sends, in bytes: fixed header, header extensions and payload, before SRTP adds its tag, retransmissions included. It is not an MTU: the MTU belongs to the path to each viewer, which the robot does not know. On the wire a packet is up to about 80 bytes longer. Lower it when a viewer's path carries less, such as a tunnel inside a tunnel. The ceiling sits just under what the bridge's SRTP library protects (1356 bytes); past that, live video stops. Overrides the bridge's ROS parameter \`live.max_packet_bytes\`; without either, the bridge sends ${LIVE_DEFAULTS.max_packet_bytes}. A change holds from the next frame, for running streams too.`,
1991
2033
  examples: [LIVE_DEFAULTS.max_packet_bytes],
1992
2034
  }),
2035
+ encoder: liveEncoder.optional().meta({
2036
+ description: `What encodes live video on the robot. \`software\` is the bridge's own encoder on the CPU. Every other value sends H.264 from a hardware encoder, reached through GStreamer, which the robot has to have installed. An encoder that does not start, or stops delivering, is replaced by software H.264 for the rest of that session, with one warning in the bridge's log; one that did not start is not tried again until this setting changes or the bridge restarts. The fallback catches an encoder that fails, not one that draws a wrong picture, so look at the stream once after choosing one. The hardware encoders are written from the documentation of their GStreamer elements and tested through a software stand-in; the reference page of this section says which have been proven on hardware. It is one setting for the robot, not one per camera: the chip is part of the computer. It does not apply to a camera whose source already delivers H.264 and is passed through: that video is forwarded, not encoded. Overrides the bridge's ROS parameter \`live.encoder\`; without either, the bridge uses \`${LIVE_DEFAULTS.encoder}\`. A change holds from the next live start; a running stream keeps its encoder.`,
2037
+ enumDescriptions: describeValues(liveEncoder.options, {
2038
+ software: 'The bridge encodes on the CPU: VP8 or H.264, whichever the media server picks, as every robot did before the setting existed.',
2039
+ auto: 'Tries `nvenc`, then `vaapi`, then `v4l2`, and uses the first that starts. With none of them, software H.264.',
2040
+ nvenc: 'NVIDIA. On a Jetson the board\'s encoder (`nvv4l2h264enc`); a Jetson Orin Nano has none and ends on software. On a desktop card `nvh264enc`.',
2041
+ vaapi: 'Intel and AMD graphics through VA-API: `vah264enc` where the installed GStreamer has it, else `vaapih264enc`.',
2042
+ v4l2: 'A V4L2 encoder (`v4l2h264enc`), as on a Raspberry Pi 4. A Raspberry Pi 5 has no hardware encoder and ends on software.',
2043
+ }),
2044
+ }),
1993
2045
  });
1994
2046
  /**
1995
2047
  * The format version of a `fleetless.yaml`. Deliberately not called
@@ -539,6 +539,7 @@ export declare const cloudConfig: z.ZodObject<{
539
539
  tcp: "tcp";
540
540
  udp: "udp";
541
541
  }>>;
542
+ passthrough: z.ZodOptional<z.ZodBoolean>;
542
543
  credentials: z.ZodOptional<z.ZodObject<{
543
544
  username: z.ZodOptional<z.ZodString>;
544
545
  password: z.ZodOptional<z.ZodString>;
@@ -594,6 +595,13 @@ export declare const cloudConfig: z.ZodObject<{
594
595
  }, z.core.$strict>>;
595
596
  live: z.ZodOptional<z.ZodObject<{
596
597
  max_packet_bytes: z.ZodOptional<z.ZodNumber>;
598
+ encoder: z.ZodOptional<z.ZodEnum<{
599
+ v4l2: "v4l2";
600
+ auto: "auto";
601
+ software: "software";
602
+ nvenc: "nvenc";
603
+ vaapi: "vaapi";
604
+ }>>;
597
605
  }, z.core.$strict>>;
598
606
  }, z.core.$strict>;
599
607
  }, z.core.$strip>;
package/dist/rest.d.ts CHANGED
@@ -449,6 +449,7 @@ export declare const configDraftResponse: z.ZodObject<{
449
449
  tcp: "tcp";
450
450
  udp: "udp";
451
451
  }>>;
452
+ passthrough: z.ZodOptional<z.ZodBoolean>;
452
453
  credentials: z.ZodOptional<z.ZodObject<{
453
454
  username: z.ZodOptional<z.ZodString>;
454
455
  password: z.ZodOptional<z.ZodString>;
@@ -504,6 +505,13 @@ export declare const configDraftResponse: z.ZodObject<{
504
505
  }, z.core.$strict>>;
505
506
  live: z.ZodOptional<z.ZodObject<{
506
507
  max_packet_bytes: z.ZodOptional<z.ZodNumber>;
508
+ encoder: z.ZodOptional<z.ZodEnum<{
509
+ v4l2: "v4l2";
510
+ auto: "auto";
511
+ software: "software";
512
+ nvenc: "nvenc";
513
+ vaapi: "vaapi";
514
+ }>>;
507
515
  }, z.core.$strict>>;
508
516
  }, z.core.$strict>>;
509
517
  source: z.ZodString;
@@ -746,6 +754,7 @@ export declare const configVersionResponse: z.ZodObject<{
746
754
  tcp: "tcp";
747
755
  udp: "udp";
748
756
  }>>;
757
+ passthrough: z.ZodOptional<z.ZodBoolean>;
749
758
  credentials: z.ZodOptional<z.ZodObject<{
750
759
  username: z.ZodOptional<z.ZodString>;
751
760
  password: z.ZodOptional<z.ZodString>;
@@ -801,6 +810,13 @@ export declare const configVersionResponse: z.ZodObject<{
801
810
  }, z.core.$strict>>;
802
811
  live: z.ZodOptional<z.ZodObject<{
803
812
  max_packet_bytes: z.ZodOptional<z.ZodNumber>;
813
+ encoder: z.ZodOptional<z.ZodEnum<{
814
+ v4l2: "v4l2";
815
+ auto: "auto";
816
+ software: "software";
817
+ nvenc: "nvenc";
818
+ vaapi: "vaapi";
819
+ }>>;
804
820
  }, z.core.$strict>>;
805
821
  }, z.core.$strict>;
806
822
  source: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",