From 9e0b50a4eab557f892f30f293e38023b92ec46be Mon Sep 17 00:00:00 2001 From: cyy_mac Date: Sat, 20 Jun 2026 21:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index e63c912..ec4536e 100644 --- a/main.py +++ b/main.py @@ -214,12 +214,10 @@ class HTTPHandler(BaseHTTPRequestHandler): vx = float(body.get("vx", 0)) wz = float(body.get("wz", 0)) shared["cmd_speed"] = vx - # Bicycle model Vz→steer (matches firmware Vz_to_Akm_Angle) - # Axle_spacing=0.158, Wheel_spacing=0.162 + # Bicycle model wz→steer using simulation's Ackermann geometry if abs(vx) > 0.01 and abs(wz) > 1e-6: R_turn = vx / wz - steer = math.atan(0.158 / (R_turn + 0.05 * 0.162)) - shared["cmd_steer"] = steer if wz >= 0 else -steer + shared["cmd_steer"] = math.atan(L / R_turn) else: shared["cmd_steer"] = 0.0 self.send_response(200)