CARLA
Loading...
Searching...
No Matches
SpeedLimitComponent.h
Go to the documentation of this file.
1// Copyright (c) 2026 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 "SignComponent.h"
10
11#include <util/ue-header-guard-begin.h>
12#include "CoreMinimal.h"
13#include <util/ue-header-guard-end.h>
14
15#include "SpeedLimitComponent.generated.h"
16
17UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
18class CARLA_API USpeedLimitComponent : public USignComponent
19{
20 GENERATED_BODY()
21
22public:
23
24 virtual void InitializeSign(const carla::road::Map &Map) override;
25
26 void SetSpeedLimit(float Limit);
27
28private:
29
30 void GenerateSpeedBox(const FTransform BoxTransform, float BoxSize);
31
32 UFUNCTION(BlueprintCallable)
33 void OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *OverlappedComp,
34 AActor *OtherActor,
35 UPrimitiveComponent *OtherComp,
36 int32 OtherBodyIndex,
37 bool bFromSweep,
38 const FHitResult &SweepResult);
39
40 UPROPERTY(Category = "Speed Limit", EditAnywhere)
41 float SpeedLimit = 30;
42
43};
std::map< std::string, unsigned int > road
This file contains definitions of common data structures used in traffic manager.