From 2f2e4449788106581e4e77bca4376c66fb35c1a0 Mon Sep 17 00:00:00 2001 From: SkyLi Date: Thu, 4 Jun 2026 14:17:16 +0800 Subject: [PATCH] =?UTF-8?q?PID=20=E9=85=8D=E7=BD=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E9=80=9A=E8=BF=87=20HTTP=20API=20=E5=AD=98=E5=8F=96=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20rosbridge=20=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 页面初始化时 GET /api/pid/config 加载已保存的配置 - 点击保存通过 POST /api/pid/config 持久化到后端 - 新增「加载配置」按钮支持手动从后端重新拉取 - 移除 PID_CONFIG_TOPIC 及 rosbridge 发布逻辑 --- src/config.js | 2 - src/views/DebugMode.vue | 97 ++++++++++++++++++++++++++++++++++------- 2 files changed, 81 insertions(+), 18 deletions(-) diff --git a/src/config.js b/src/config.js index 1ba7e14..93a0e05 100644 --- a/src/config.js +++ b/src/config.js @@ -9,8 +9,6 @@ export const MJPEG_MANUAL_URL = 'http://192.168.0.11/stream?topic=/vision/result // ROS 话题 export const CMD_WHEEL_TOPIC = '/cmd_wheel' export const CMD_GIMBAL_TOPIC = '/cmd_gimbal' -export const PID_CONFIG_TOPIC = '/pid_config' - // 键盘控制参数 export const MAX_LINEAR = 0.5 // m/s export const MAX_ANGULAR = 1.0 // rad/s diff --git a/src/views/DebugMode.vue b/src/views/DebugMode.vue index 630815b..60b09cc 100644 --- a/src/views/DebugMode.vue +++ b/src/views/DebugMode.vue @@ -44,27 +44,62 @@ - + +