From 0f3b5ba1dd12868b691687c95c986dfdca7adb88 Mon Sep 17 00:00:00 2001 From: Alfonso Hernandez Date: Wed, 22 Sep 2021 18:38:38 +0200 Subject: [PATCH] Fix throttle scaling in simulator to match gas 1.0 to NIDEC_ACCEL_MAX in Honda CarControllerParams (#22310) old-commit-hash: 703d0cb832fb04119d88cb796ff6845eae0557d4 --- tools/sim/bridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sim/bridge.py b/tools/sim/bridge.py index 2bb89807fc..431cc7d138 100755 --- a/tools/sim/bridge.py +++ b/tools/sim/bridge.py @@ -297,7 +297,7 @@ def bridge(q): if is_openpilot_engaged: sm.update(0) # TODO gas and brake is deprecated - throttle_op = clip(sm['carControl'].actuators.accel/4.0, 0.0, 1.0) + throttle_op = clip(sm['carControl'].actuators.accel/1.6, 0.0, 1.0) brake_op = clip(-sm['carControl'].actuators.accel/4.0, 0.0, 1.0) steer_op = sm['carControl'].actuators.steeringAngleDeg