@fleetless/contracts 15.1.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,57 @@ 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
+
47
+ ## [15.2.0] — 2026-11-13
48
+
49
+ ### Added
50
+
51
+ - **The `live` section of the configuration document**
52
+ (fleetless/fleetless#1115). `robotConfigDoc.live` is optional and strict;
53
+ its one key, `max_packet_bytes`, is an optional integer from 576 to 1350:
54
+ the largest RTP packet the bridge sends, before SRTP, retransmissions
55
+ included. 1350 is the ceiling because the bridge's SRTP library protects
56
+ no packet above 1356 bytes. A key present overrides the bridge's ROS parameter
57
+ `live.max_packet_bytes`. `liveSection` and the type `LiveSection` are
58
+ exported.
59
+ - `LIVE_DEFAULTS` (`{ max_packet_bytes: 1200 }`) and `LIVE_BOUNDS`
60
+ (`{ max_packet_bytes: { min: 576, max: 1350 } }`), exported and written
61
+ into `constants.json` for the bridge.
62
+
12
63
  ## [15.1.0] — 2026-11-12
13
64
 
14
65
  ### Added
@@ -45,5 +45,24 @@
45
45
  "datapoint_max_hz": 1,
46
46
  "camera": "reduce",
47
47
  "camera_bitrate_kbps": 300
48
+ },
49
+ "LIVE_DEFAULTS": {
50
+ "max_packet_bytes": 1200,
51
+ "encoder": "software"
52
+ },
53
+ "LIVE_BOUNDS": {
54
+ "max_packet_bytes": {
55
+ "min": 576,
56
+ "max": 1350
57
+ },
58
+ "encoder": {
59
+ "values": [
60
+ "software",
61
+ "auto",
62
+ "nvenc",
63
+ "vaapi",
64
+ "v4l2"
65
+ ]
66
+ }
48
67
  }
49
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,13 +32543,40 @@
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
32546
32550
  }
32547
32551
  },
32548
32552
  "additionalProperties": false
32553
+ },
32554
+ "live": {
32555
+ "description": "How the bridge sends live video, for every camera of the robot. Each key overrides the bridge's ROS parameter of the same name; an absent key leaves the parameter alone.",
32556
+ "type": "object",
32557
+ "properties": {
32558
+ "max_packet_bytes": {
32559
+ "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 1200. A change holds from the next frame, for running streams too.",
32560
+ "examples": [
32561
+ 1200
32562
+ ],
32563
+ "type": "integer",
32564
+ "minimum": 576,
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
+ ]
32577
+ }
32578
+ },
32579
+ "additionalProperties": false
32549
32580
  }
32550
32581
  },
32551
32582
  "required": [
@@ -33567,7 +33598,7 @@
33567
33598
  "type": "string",
33568
33599
  "maxLength": 255,
33569
33600
  "pattern": "^[a-z][a-z0-9_]*\\/(?:msg|srv|action)\\/[A-Za-z][A-Za-z0-9]*$",
33570
- "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.",
33571
33602
  "examples": [
33572
33603
  "sensor_msgs/msg/Image"
33573
33604
  ]
@@ -33587,7 +33618,7 @@
33587
33618
  "kind": {
33588
33619
  "type": "string",
33589
33620
  "const": "rtsp",
33590
- "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`."
33591
33622
  },
33592
33623
  "url": {
33593
33624
  "type": "string",
@@ -33607,6 +33638,10 @@
33607
33638
  "udp"
33608
33639
  ]
33609
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
+ },
33610
33645
  "credentials": {
33611
33646
  "type": "object",
33612
33647
  "properties": {
@@ -33718,7 +33753,7 @@
33718
33753
  "type": "integer",
33719
33754
  "exclusiveMinimum": 0,
33720
33755
  "maximum": 7680,
33721
- "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.",
33722
33757
  "examples": [
33723
33758
  1280
33724
33759
  ]
@@ -33727,7 +33762,7 @@
33727
33762
  "type": "integer",
33728
33763
  "exclusiveMinimum": 0,
33729
33764
  "maximum": 4320,
33730
- "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.",
33731
33766
  "examples": [
33732
33767
  720
33733
33768
  ]
@@ -33736,7 +33771,7 @@
33736
33771
  "type": "integer",
33737
33772
  "exclusiveMinimum": 0,
33738
33773
  "maximum": 60,
33739
- "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.",
33740
33775
  "examples": [
33741
33776
  15
33742
33777
  ]
@@ -33745,7 +33780,7 @@
33745
33780
  "type": "integer",
33746
33781
  "exclusiveMinimum": 0,
33747
33782
  "maximum": 50000,
33748
- "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.",
33749
33784
  "examples": [
33750
33785
  2000
33751
33786
  ]
@@ -33947,13 +33982,40 @@
33947
33982
  ]
33948
33983
  },
33949
33984
  "camera_bitrate_kbps": {
33950
- "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.",
33951
33986
  "type": "integer",
33952
33987
  "minimum": 50,
33953
33988
  "maximum": 20000
33954
33989
  }
33955
33990
  },
33956
33991
  "additionalProperties": false
33992
+ },
33993
+ "live": {
33994
+ "description": "How the bridge sends live video, for every camera of the robot. Each key overrides the bridge's ROS parameter of the same name; an absent key leaves the parameter alone.",
33995
+ "type": "object",
33996
+ "properties": {
33997
+ "max_packet_bytes": {
33998
+ "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 1200. A change holds from the next frame, for running streams too.",
33999
+ "examples": [
34000
+ 1200
34001
+ ],
34002
+ "type": "integer",
34003
+ "minimum": 576,
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
+ ]
34016
+ }
34017
+ },
34018
+ "additionalProperties": false
33957
34019
  }
33958
34020
  },
33959
34021
  "required": [
@@ -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,13 +2055,56 @@
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
2058
2062
  }
2059
2063
  },
2060
2064
  "additionalProperties": false
2065
+ },
2066
+ "live": {
2067
+ "description": "How the bridge sends live video, for every camera of the robot. Each key overrides the bridge's ROS parameter of the same name; an absent key leaves the parameter alone.",
2068
+ "defaultSnippets": [
2069
+ {
2070
+ "label": "live video, packet size",
2071
+ "description": "Caps every RTP packet the bridge sends. 1200 is the default; lower it for viewers behind a tunnel inside a tunnel.",
2072
+ "body": {
2073
+ "max_packet_bytes": 1200
2074
+ }
2075
+ }
2076
+ ],
2077
+ "type": "object",
2078
+ "properties": {
2079
+ "max_packet_bytes": {
2080
+ "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 1200. A change holds from the next frame, for running streams too.",
2081
+ "examples": [
2082
+ 1200
2083
+ ],
2084
+ "type": "integer",
2085
+ "minimum": 576,
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
+ ]
2105
+ }
2106
+ },
2107
+ "additionalProperties": false
2061
2108
  }
2062
2109
  },
2063
2110
  "required": [