From 07f942027d26c373b28dfb8d248ce3456e69073d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alptu=C4=9F=20C=C4=B1r=C4=B1t?= <33583972+mozhoku@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:05:16 +0300 Subject: [PATCH] fix: wheel flicker (#172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alptuğ Cırıt --- .../Vehicles/VPP Integration/AutowareVPPAdapter.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs b/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs index badea5750..6c97b6bb2 100644 --- a/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs +++ b/Assets/AWSIM/Scripts/Vehicles/VPP Integration/AutowareVPPAdapter.cs @@ -173,10 +173,6 @@ private void Start() // Set initial vehicle gear to Park to prevent movement _vehicleController.data.bus[Channel.Input][InputData.AutomaticGear] = (int)Gearbox.AutomaticGear.P; - // reset vpp stuff for multi-scene loading (no idea why, but it works) - _vehicleController.enabled = false; - _vehicleController.enabled = true; - // Subscribe to events _egoVehiclePositionManager = FindObjectOfType(); if (_egoVehiclePositionManager != null) @@ -268,10 +264,8 @@ public void HandleSteer() private void SetWheelSteerAngleDirectly(float angle) { - foreach (var wheel in _frontWheels) - { - wheel.steerAngle = angle; - } + _vehicleController.wheelState[1].steerAngle = angle; + _vehicleController.wheelState[0].steerAngle = angle; } // temp method to simulate steering wheel input with delay, also inaccurate (mozzz)