From b48422764fcfc2e424faec251e584a28c602f12e Mon Sep 17 00:00:00 2001 From: Shital Shah Date: Thu, 22 Mar 2018 00:07:02 -0700 Subject: [PATCH] increase keyboard steering to 0.5, CarControls contructor fix --- PythonClient/AirSimClient.py | 2 +- Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PythonClient/AirSimClient.py b/PythonClient/AirSimClient.py index 313f1a6a1a..b6f689dca8 100644 --- a/PythonClient/AirSimClient.py +++ b/PythonClient/AirSimClient.py @@ -159,7 +159,7 @@ class CarControls(MsgpackMixin): manual_gear = 0 gear_immediate = True - def __init__(self, throttle = np.float32(0), steering = np.float32(0), brake = np.float32(0), + def __init__(self, throttle = 0, steering = 0, brake = 0, handbrake = False, is_manual_gear = False, manual_gear = 0, gear_immediate = True): self.throttle = throttle self.steering = steering diff --git a/Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp b/Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp index 1cfbe5189b..f25de2b2dd 100644 --- a/Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp +++ b/Unreal/Plugins/AirSim/Source/Car/CarPawn.cpp @@ -298,10 +298,10 @@ void ACarPawn::setupInputBindings() UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveForward", EKeys::Down, -1), this, this, &ACarPawn::MoveForward); - UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Right, 0.1), this, + UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Right, 0.5), this, this, &ACarPawn::MoveRight); - UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Left, -0.1), this, + UAirBlueprintLib::BindAxisToKey(FInputAxisKeyMapping("MoveRight", EKeys::Left, -0.5), this, this, &ACarPawn::MoveRight); UAirBlueprintLib::BindActionToKey("Handbrake", EKeys::End, this, &ACarPawn::OnHandbrakePressed, true);