@@ -25,7 +25,7 @@ Generic ROS 2 video bridge that subscribes to a raw `sensor_msgs/Image` topic an
2525 - `transport.reconnect.max_attempts`
2626
2727- Codec parameters:
28- - `codec.name` (`h264`, `h265`, `mjpeg`)
28+ - `codec.name` (`auto`, ` h264`, `h265`, `mjpeg`)
2929 - `codec.profile`
3030 - `codec.tune`
3131 - `codec.rate_control`
@@ -119,6 +119,16 @@ ros2 launch ros2_gst_video_bridge gst_video_bridge_minimal.launch.py \
119119 " sink_uri:=srt://0.0.0.0:9000?mode=listener"
120120```
121121
122+ For Bayer cameras, enable optional debayer (color output before bridge):
123+
124+ ``` bash
125+ ros2 launch ros2_gst_video_bridge gst_video_bridge_minimal.launch.py \
126+ input_topic:=/camera_driver_uv_example/vis/image_raw \
127+ enable_debayer:=true \
128+ debayer_output_topic:=/camera_driver_uv_example/vis/image_color \
129+ " sink_uri:=srt://0.0.0.0:9000?mode=listener"
130+ ```
131+
122132### 4) Launch SRT receiver as caller (Terminal C)
123133
124134``` bash
@@ -180,13 +190,101 @@ Under `config/profiles/`:
180190
181191### Runtime metrics
182192
183- The node publishes runtime metrics on ` ~/runtime_metrics ` (` std_msgs/msg/String ` ), including:
193+ The node publishes runtime metrics on ` ~/runtime_metrics ` (` std_msgs/msg/String ` ) for backward compatibility, and typed control-plane topics via ` ros2_gst_video_bridge_msgs ` :
194+
195+ - ` ~/runtime_status ` (` ros2_gst_video_bridge_msgs/msg/RuntimeStatus ` )
196+ - ` ~/runtime_events ` (` ros2_gst_video_bridge_msgs/msg/RuntimeEvent ` )
197+ - ` ~/set_streaming_profile ` (` ros2_gst_video_bridge_msgs/srv/SetStreamingProfile ` )
198+
199+ Fields include:
184200
185201- state (` connecting|streaming|degraded|reconnecting|failed ` )
186202- ` fps_in ` , ` fps_out `
187203- dropped frame counters
188204- reconnect counter
189205- latency estimate in milliseconds
206+ - selected codec/encoder and fallback flags
207+ - adaptation profile and current adaptation level
208+
209+ Operator runtime command example:
210+
211+ ``` bash
212+ ros2 service call /gst_video_bridge/set_streaming_profile ros2_gst_video_bridge_msgs/srv/SetStreamingProfile " {adaptation_profile: balanced, reset_counters: false}"
213+ ```
214+
215+ First-failure snapshot:
216+
217+ - On the first streaming failure in a session, the bridge publishes ` FIRST_FAILURE_SNAPSHOT ` on ` ~/runtime_events ` .
218+ - Payload includes session/stream IDs, runtime state, selected codec/encoder, sink URI, fallback status, and effective pipeline string.
219+
220+ ### Automatic codec selection (` codec.name:=auto ` )
221+
222+ When ` codec.name ` is set to ` auto ` , the node inspects available encoder implementations via
223+ ` gst-inspect-1.0 ` and resolves to the best codec for the selected machine profile.
224+
225+ Selection order by machine profile:
226+
227+ | Machine profile | Preferred implementation classes |
228+ | ---| ---|
229+ | ` jetson ` | ` hw:nvidia-v4l2 ` -> ` hw:nvidia ` -> other HW (` v4l2 ` /` omx ` /` vaapi ` ) -> ` sw ` |
230+ | ` x86 ` | ` hw:vaapi ` -> ` hw:v4l2 ` -> NVIDIA HW -> ` sw ` |
231+ | ` raspi ` | ` hw:v4l2 ` -> ` hw:omx ` -> ` sw ` |
232+ | ` generic ` | ` hw:vaapi ` -> ` hw:v4l2 ` -> NVIDIA HW -> ` hw:omx ` -> ` sw ` |
233+
234+ Codec tie-break preference is stable: ` h264 ` -> ` h265 ` -> ` mjpeg ` .
235+
236+ If ` codec.name:=auto ` picks a hardware encoder and runtime fails repeatedly while streaming,
237+ the bridge now falls back automatically to a software encoder for the same codec.
238+ This fallback is cross-platform (Jetson/x86/Raspberry/generic) and uses detected encoders from
239+ ` gst-inspect-1.0 ` , not Jetson-only logic.
240+
241+ Fallback sensitivity can be tuned with:
242+
243+ ``` bash
244+ -p runtime.hw_fallback_failures:=3
245+ ```
246+
247+ Adaptive resilience controls:
248+
249+ ``` bash
250+ -p runtime.adaptation.enabled:=true \
251+ -p runtime.adaptation.profile:=balanced \
252+ -p runtime.adaptation.interval_ms:=2000 \
253+ -p runtime.adaptation.cooldown_ms:=5000
254+ ```
255+
256+ Supported adaptation profiles:
257+
258+ - ` conservative `
259+ - ` balanced `
260+ - ` aggressive `
261+
262+ ### Validation automation
263+
264+ Codec/transport matrix script:
265+
266+ ``` bash
267+ chmod +x /home/ccu-001/ws_dev/src/ros2_gst_video_bridge/scripts/run_transport_codec_matrix.zsh
268+ /home/ccu-001/ws_dev/src/ros2_gst_video_bridge/scripts/run_transport_codec_matrix.zsh /home/ccu-001/ws_dev /tmp/matrix.csv
269+ ```
270+
271+ Soak run script:
272+
273+ ``` bash
274+ chmod +x /home/ccu-001/ws_dev/src/ros2_gst_video_bridge/scripts/run_soak_profile.zsh
275+ /home/ccu-001/ws_dev/src/ros2_gst_video_bridge/scripts/run_soak_profile.zsh /home/ccu-001/ws_dev 1800 generic low_latency /camera/image_raw
276+ ```
277+
278+ Release/versioning policy documents:
279+
280+ - ` docs/VERSIONING.md `
281+ - ` docs/RELEASE.md `
282+
283+ Example:
284+
285+ ``` bash
286+ ros2 run ros2_gst_video_bridge gst_video_bridge_node --ros-args -p codec.name:=auto
287+ ```
190288
191289### Discoverability modes (Phase 3)
192290
0 commit comments