sl-firmware
19a30a1c4f
feat: PID auto-tune for balance mode (Issue #531 )
...
Implement Ziegler-Nichols relay feedback auto-tuning with flash persistence:
Firmware (STM32F722):
- pid_flash.c/h: erase+write Kp/Ki/Kd to flash sector 7 (0x0807FFC0),
magic-validated; load on boot to restore saved tune
- jlink.h: add JLINK_CMD_PID_SAVE (0x0A) and JLINK_TLM_PID_RESULT (0x83)
with jlink_tlm_pid_result_t struct and pid_save_req flag in JLinkState
- jlink.c: dispatch JLINK_CMD_PID_SAVE -> pid_save_req; add
jlink_send_pid_result() to confirm flash write outcome over USART1
- main.c: load saved PID from flash after balance_init(); handle
pid_save_req in main loop (disarmed-only, erase stalls CPU ~1s)
Jetson ROS2 (saltybot_pid_autotune):
- pid_autotune_node.py: add Ki to Ziegler-Nichols formula (ZN PID:
Kp=0.6Ku, Ki=1.2Ku/Tu, Kd=0.075KuTu); add JLink serial client that
sends JLINK_CMD_PID_SET + JLINK_CMD_PID_SAVE after tuning completes
- autotune_config.yaml: add jlink_serial_port and jlink_baud_rate params
Trigger: ros2 service call /saltybot/autotune_pid std_srvs/srv/Trigger
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 09:56:19 -05:00
..
2026-03-02 12:22:58 -05:00
2026-03-03 18:17:41 -05:00
2026-03-02 09:38:46 -05:00
2026-03-02 11:07:35 -05:00
2026-03-02 11:07:35 -05:00
2026-03-05 08:53:43 -05:00
2026-03-06 10:30:58 -05:00
2026-03-05 17:08:21 -05:00
2026-03-04 22:40:40 -05:00
2026-03-03 00:46:12 -05:00
2026-03-02 12:48:16 -05:00
2026-03-04 12:17:56 -05:00
2026-03-03 00:41:39 -05:00
2026-03-06 16:42:38 -05:00
2026-03-02 08:38:24 -05:00
2026-02-28 22:59:13 -05:00
2026-03-06 10:25:04 -05:00
2026-03-02 20:45:21 -05:00
2026-03-02 12:01:00 -05:00
2026-03-02 12:11:37 -05:00
2026-03-05 12:09:07 -05:00
2026-03-05 14:48:46 -05:00
2026-03-05 14:42:49 -05:00
2026-03-05 09:06:18 -05:00
2026-03-05 17:08:48 -05:00
2026-03-02 10:19:22 -05:00
2026-03-02 10:44:32 -05:00
2026-03-02 10:44:32 -05:00
2026-03-02 10:39:37 -05:00
2026-03-02 10:39:37 -05:00
2026-03-05 09:19:31 -05:00
2026-03-05 08:53:56 -05:00
2026-03-05 12:09:07 -05:00
2026-03-04 12:44:33 -05:00
2026-03-04 13:12:47 -05:00
2026-03-02 09:36:17 -05:00
2026-03-02 09:36:17 -05:00
2026-03-01 00:48:03 -05:00
2026-03-05 08:53:56 -05:00
2026-03-05 09:05:55 -05:00
2026-03-05 09:19:43 -05:00
2026-03-03 12:47:22 -05:00
2026-03-03 12:47:22 -05:00
2026-03-05 08:52:52 -05:00
2026-03-02 17:35:30 -05:00
2026-03-05 08:55:41 -05:00
2026-03-03 17:29:14 -05:00
2026-03-05 14:46:33 -05:00
2026-03-02 08:38:49 -05:00
2026-03-06 23:02:57 -05:00
2026-03-02 11:57:17 -05:00
2026-03-04 23:33:18 -05:00
2026-03-04 23:35:15 -05:00
2026-03-05 09:05:16 -05:00
2026-03-02 10:36:21 -05:00
2026-03-02 11:17:19 -05:00
2026-03-05 12:14:50 -05:00
2026-03-05 12:14:50 -05:00
2026-03-05 09:21:30 -05:00
2026-03-02 11:50:13 -05:00
2026-03-05 17:04:27 -05:00
2026-03-01 00:52:54 -05:00
2026-03-04 08:44:51 -05:00
2026-03-02 08:41:40 -05:00
2026-03-05 12:10:33 -05:00
2026-03-05 09:04:10 -05:00
2026-03-02 12:12:57 -05:00
2026-03-02 11:39:21 -05:00
2026-03-02 11:39:21 -05:00
2026-03-05 08:55:47 -05:00
2026-03-05 11:09:41 -05:00
2026-03-07 09:56:19 -05:00
2026-03-02 21:37:08 -05:00
2026-03-05 14:34:37 -05:00
2026-03-03 06:47:45 -05:00
2026-03-04 23:33:55 -05:00
2026-03-01 01:07:06 -05:00
2026-03-02 09:03:28 -05:00
2026-03-02 09:59:53 -05:00
2026-03-03 16:48:17 -05:00
2026-03-01 01:15:13 -05:00
2026-03-01 01:15:13 -05:00
2026-03-05 19:25:23 -05:00
2026-03-05 11:09:32 -05:00
2026-03-04 13:14:44 -05:00
2026-03-04 13:32:20 -05:00
2026-03-02 12:05:24 -05:00
2026-03-05 09:04:49 -05:00
2026-03-05 09:04:49 -05:00
2026-03-05 14:34:37 -05:00
2026-03-01 23:15:00 -05:00
2026-03-01 23:56:05 -05:00
2026-03-02 08:50:22 -05:00
2026-03-01 23:59:10 -05:00
2026-03-05 09:19:21 -05:00
2026-03-01 01:06:50 -05:00
2026-03-02 11:14:10 -05:00
2026-02-28 23:19:23 -05:00
2026-03-02 09:14:37 -05:00
2026-03-02 10:04:36 -05:00
2026-03-06 16:43:21 -05:00
2026-03-02 10:04:36 -05:00
2026-03-06 23:10:42 -05:00
2026-03-02 11:21:18 -05:00
2026-03-05 08:53:55 -05:00
2026-03-05 19:25:23 -05:00
2026-03-04 23:32:21 -05:00
2026-03-01 23:25:08 -05:00
2026-03-01 23:25:08 -05:00
2026-03-03 00:23:53 -05:00
2026-03-04 07:05:46 -05:00
2026-03-02 10:15:32 -05:00
2026-03-04 22:40:40 -05:00
2026-03-05 17:05:02 -05:00
2026-03-02 17:29:03 -05:00
2026-03-05 09:20:42 -05:00
2026-03-05 09:20:42 -05:00