CARLA
BaseCarlaMovementComponent.h
Go to the documentation of this file.
1 // Copyright (c) 2021 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 
10 #include "GameFramework/MovementComponent.h"
12 #include "BaseCarlaMovementComponent.generated.h"
13 
15 
16 UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent))
18 {
19  GENERATED_BODY()
20 
21 protected:
22 
23  UPROPERTY()
24  ACarlaWheeledVehicle* CarlaVehicle;
25 
26 public:
27 
28  virtual void BeginPlay() override;
29 
30  virtual void ProcessControl(FVehicleControl &Control);
31 
32  virtual FVector GetVelocity() const;
33 
34  virtual int32 GetVehicleCurrentGear() const;
35 
36  virtual float GetVehicleForwardSpeed() const;
37 
38 protected:
39 
40  void DisableUE4VehiclePhysics();
41 
42  void EnableUE4VehiclePhysics(bool bResetVelocity = true);
43 };
float GetVehicleForwardSpeed() const
Forward speed in cm/s. Might be negative if goes backwards.
virtual FVector GetVelocity() const override
virtual void BeginPlay() override
int32 GetVehicleCurrentGear() const
Active gear of the vehicle.
Base class for CARLA wheeled vehicles.