inject_signal
Inject step, sine, square, or triangle signals into ROS command topics to test controller responses and analyze PID behavior.
Instructions
Inject a step or sinusoidal excitation signal into a command topic.
Choosing the right injection point: inject at controller INPUT (e.g. /controllers/gimbal_controller/command, rm_msgs/GimbalCmd: extra_fields={"mode": 3}, (GimbalCmd mode constants: 0: RATE, 1: TRACK, 2: DIRECT, 3: TRAJ). field="traj_yaw"/"traj_pitch") — NOT */controllers//command (std_msgs/Float64), which is PID-computed OUTPUT. Quiet state restoration (0.0 signal) occurs automatically upon completion (1-loop RealtimeBuffer update delay).
Timestamps: after extra_fields are applied, a zero/absent top-level stamp or
header.stamp is filled with rospy.Time.now() on every published message
(quiet-state restoration included); an explicit nonzero stamp is preserved —
eliminating 0-timestamp artifacts in rosbag-based analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| force | No | ||
| topic | Yes | ||
| dry_run | No | ||
| waveform | No | step | |
| amplitude | No | ||
| frequency | No | ||
| duration_sec | No | ||
| extra_fields | No | ||
| confirm_token | No | ||
| publish_rate_hz | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |