capture_inject_sync
Capture a feedback topic while injecting an excitation signal in one call, enabling closed-loop controller tuning without disk I/O.
Instructions
Capture a topic in memory while injecting an excitation signal — one call, zero disk I/O.
Preferred closed-loop tuning path in simulation (target_mode="sim") or high-bandwidth wired setups: combines capture_topic_sync-style in-memory sampling with inject_signal-style safe publishing, server-side.
Parameters:
capture_topic: Feedback ROS topic to sample (e.g. "/controllers/gimbal_controller/pos_state").
inject_topic: Command topic to publish to — inject at the controller INPUT (e.g. "/controllers/gimbal_controller/command"), NOT the PID output stage.
field: Message field to drive (e.g. "traj_yaw").
waveform / amplitude / frequency / duration_sec / publish_rate_hz / extra_fields / force / confirm_token: forwarded verbatim to inject_signal — all safety gates (red-tier confirm_token handshake, exclusive publisher arbitration, quiet-state restoration) are owned by inject_signal and NOT pre-consumed here.
dry_run: if True, skip the capture subscriber and perform only the inject_signal schema/no-publish check. Safe for e2e schema validation without a live ROS master; all confirmation semantics remain delegated to inject_signal.
quiet_window_sec: extra capture time AFTER the injection ends so the quiet-state restoration is fully sampled.
fields: capture field paths; omit for auto-discovery (GimbalPosState / PidState).
max_messages: capture sample cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| force | No | ||
| fields | No | ||
| dry_run | No | ||
| waveform | No | step | |
| amplitude | No | ||
| frequency | No | ||
| duration_sec | No | ||
| extra_fields | No | ||
| inject_topic | Yes | ||
| max_messages | No | ||
| capture_topic | Yes | ||
| confirm_token | No | ||
| publish_rate_hz | No | ||
| quiet_window_sec | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |