CARLA
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehiclePhysicsControl.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 // Copyright (c) 2019 Intel Corporation
4 //
5 // This work is licensed under the terms of the MIT license.
6 // For a copy, see <https://opensource.org/licenses/MIT>.
7 
8 #pragma once
9 
11 #include "VehiclePhysicsControl.generated.h"
12 
13 USTRUCT(BlueprintType)
15 {
16  GENERATED_USTRUCT_BODY()
17 
18  UPROPERTY(Category = "Gear Physics Control", EditAnywhere, BlueprintReadWrite)
19  float Ratio = 1.0f;
20 
21  UPROPERTY(Category = "Gear Physics Control", EditAnywhere, BlueprintReadWrite)
22  float DownRatio = 0.5f;
23 
24  UPROPERTY(Category = "Gear Physics Control", EditAnywhere, BlueprintReadWrite)
25  float UpRatio = 0.65f;
26 };
27 
28 USTRUCT(BlueprintType)
29 struct CARLA_API FVehiclePhysicsControl
30 {
31  GENERATED_BODY()
32 
33  // MECHANICAL SETUP
34 
35  // Engine Setup
36  FRichCurve TorqueCurve;
37 
38  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
39  float MaxRPM = 0.0f;
40 
41  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
42  float MOI = 0.0f;
43 
44  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
45  float DampingRateFullThrottle = 0.0f;
46 
47  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
48  float DampingRateZeroThrottleClutchEngaged = 0.0f;
49 
50  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
51  float DampingRateZeroThrottleClutchDisengaged = 0.0f;
52 
53  // // Transmission Setup
54  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
55  bool bUseGearAutoBox = 0.0f;
56 
57  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
58  float GearSwitchTime = 0.0f;
59 
60  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
61  float ClutchStrength = 0.0f;
62 
63  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
64  float FinalRatio = 1.0f;
65 
66  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
67  TArray<FGearPhysicsControl> ForwardGears;
68 
69  // Vehicle Setup
70  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
71  float Mass = 0.0f;
72 
73  UPROPERTY(Category = "Vehicle Engine Physics Control", EditAnywhere, BlueprintReadWrite)
74  float DragCoefficient = 0.0f;
75 
76  // Steering Setup
77  FRichCurve SteeringCurve;
78 
79  // Center Of Mass
80  UPROPERTY(Category = "Vehicle Center Of Mass", EditAnywhere, BlueprintReadWrite)
81  FVector CenterOfMass;
82 
83  // Wheels Setup
84  TArray<FWheelPhysicsControl> Wheels;
85 
86  UPROPERTY(Category = "Vehicle Wheels Configuration", EditAnywhere, BlueprintReadWrite)
87  bool UseSweepWheelCollision = false;
88 };