@fleetless/contracts 15.2.0 → 15.4.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,68 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [15.4.0] — 2026-11-13
13
+
14
+ ### Changed
15
+
16
+ - **A hardware encoder takes no camera of odd size**
17
+ (fleetless/fleetless#1143). With `live.encoder` present and not
18
+ `software`, `robotConfigDoc` refuses every camera whose `width` or `height`
19
+ is odd, passthrough cameras included: one issue per odd key, at
20
+ `cameras.<slug>.width` or `cameras.<slug>.height`, with zod's `custom` code
21
+ and a sentence that names the setting, the odd value and the two ways out.
22
+ Such a camera was accepted before and gave no picture: H.264 as the bridge
23
+ sends it has no odd size, in a hardware encoder or in the software H.264 it
24
+ falls back to. `software` and an absent key accept an odd size as before.
25
+ The rule spans two sections, so it is a refinement on the document and not
26
+ in the JSON Schema export. It is reported beside the document's other
27
+ refusals, except a fraction on an integer key anywhere in the document,
28
+ which zod treats as final: the finding then arrives once the fraction is
29
+ fixed.
30
+ - With that refinement on it, zod refuses to derive from `robotConfigDoc`:
31
+ `.pick()`, `.omit()`, `.partial()`, `.merge()` and `.extend()` of a key it
32
+ already has throw at runtime, and the type does not show it. `.shape`,
33
+ `.safeExtend()` and `.extend()` with a new key still work. The type and
34
+ the JSON Schema are unchanged.
35
+ - The descriptions of a camera's `width` and `height` and of `live.encoder`
36
+ say the rule. The description of `vaapi` names three elements in the order
37
+ the bridge tries them: `vah264enc`, `vah264lpenc`, `vaapih264enc`.
38
+
39
+ ## [15.3.0] — 2026-11-13
40
+
41
+ ### Added
42
+
43
+ - **`passthrough` on the RTSP camera source** (fleetless/fleetless#1117).
44
+ `cameraSource`'s `rtsp` member takes an optional boolean `passthrough`.
45
+ With `true` the bridge forwards the camera's H.264 to live viewers and
46
+ neither decodes nor encodes the live video; absent means `false`, today's
47
+ decode and re-encode. The other three source kinds refuse the key.
48
+ - The description of the ROS source's `type` names a third type,
49
+ `foxglove_msgs/msg/CompressedVideo`, and says when a
50
+ `sensor_msgs/msg/CompressedImage` is passed through (its `format` contains
51
+ `h264`, in any case). The schema accepted any ROS type name before and
52
+ still does; the editor snippet now offers all three.
53
+ - The descriptions of `width`, `height`, `fps` and `bitrate_kbps` say what
54
+ they mean for a passthrough camera: its live video is not scaled, so
55
+ `width` and `height` must equal the stream's own size; `fps` and
56
+ `bitrate_kbps` are not enforced, `fps` bounds how often a snapshot is
57
+ taken, `bitrate_kbps` is what the track declares.
58
+ - The description of `low_bandwidth.camera: reduce` names its exception: a
59
+ passthrough stream is not encoded by the bridge, so it ends as under
60
+ `stop`. `camera_bitrate_kbps` and `passthrough` say the same.
61
+ - **`live.encoder`** (fleetless/fleetless#894). An optional key of the `live`
62
+ section that names what encodes live video on the robot: `software` (the
63
+ bridge's own encoder on the CPU, as before), `auto`, `nvenc`, `vaapi` or
64
+ `v4l2`. Every value but `software` sends H.264 from a hardware encoder and
65
+ falls back to software H.264 for the session when that encoder does not
66
+ start. A key present overrides the bridge's ROS parameter `live.encoder`;
67
+ an absent key leaves the parameter in force. It does not apply to a camera
68
+ whose H.264 source is passed through. Each value carries its own
69
+ description for the editor.
70
+ - `LIVE_DEFAULTS.encoder` is `software`, and `LIVE_BOUNDS.encoder.values`
71
+ lists the five values in the schema's order, as a read-only tuple. Both
72
+ are written into `constants.json` for the bridge.
73
+
12
74
  ## [15.2.0] — 2026-11-13
13
75
 
14
76
  ### 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. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. 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. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. 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. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. 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`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
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. With any `live.encoder` but `software` the width must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. With any `live.encoder` but `software` the height must be even: the bridge then sends H.264, which takes no odd size, and a document with an odd one is refused.",
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. H.264 takes no odd size, so with any value but `software` every camera's `width` and `height` must be even, passthrough cameras included, and a document with an odd one is refused. 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`, then `vah264lpenc`, then `vaapih264enc`, the first that starts. `vah264lpenc` is the low-power encoder, the only one some Intel chips encode H.264 with.",
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