CARLA
SpeedLimitComponent.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 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
9 #include "CoreMinimal.h"
10 #include "SignComponent.h"
11 #include "SpeedLimitComponent.generated.h"
12 
13 UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
14 class CARLA_API USpeedLimitComponent : public USignComponent
15 {
16  GENERATED_BODY()
17 
18 public:
19 
20  virtual void InitializeSign(const carla::road::Map &Map) override;
21 
22  void SetSpeedLimit(float Limit);
23 
24 private:
25 
26  void GenerateSpeedBox(const FTransform BoxTransform, float BoxSize);
27 
28  UFUNCTION(BlueprintCallable)
29  void OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *OverlappedComp,
30  AActor *OtherActor,
31  UPrimitiveComponent *OtherComp,
32  int32 OtherBodyIndex,
33  bool bFromSweep,
34  const FHitResult &SweepResult);
35 
36  UPROPERTY(Category = "Speed Limit", EditAnywhere)
37  float SpeedLimit = 30;
38 
39 };
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133