CARLA
 
载入中...
搜索中...
未找到
StopSignComponent.h
浏览该文件的文档.
1// Copyright (c) 2020 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"
12#include "StopSignComponent.generated.h"
13
14UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
15class CARLA_API UStopSignComponent : public USignComponent
16{
17 GENERATED_BODY()
18
19public:
20
21 virtual void InitializeSign(const carla::road::Map &Map) override;
22
23private:
24
25 void GenerateStopBox(const FTransform BoxTransform,
26 const FVector BoxSize);
27
28 void GenerateCheckBox(const FTransform BoxTransform,
29 float BoxSize);
30
31 /// 尽量给停车标志处的车辆让路,检查复选框中的车辆数量
32 UFUNCTION(BlueprintCallable)
33 void GiveWayIfPossible();
34
35 void DelayedGiveWay(float Delay);
36
37 UFUNCTION(BlueprintCallable)
38 void OnOverlapBeginStopEffectBox(UPrimitiveComponent *OverlappedComp,
39 AActor *OtherActor,
40 UPrimitiveComponent *OtherComp,
41 int32 OtherBodyIndex,
42 bool bFromSweep,
43 const FHitResult &SweepResult);
44
45 UFUNCTION(BlueprintCallable)
46 void OnOverlapEndStopEffectBox(UPrimitiveComponent *OverlappedComp,
47 AActor *OtherActor,
48 UPrimitiveComponent *OtherComp,
49 int32 OtherBodyIndex);
50
51 UFUNCTION(BlueprintCallable)
52 void OnOverlapBeginStopCheckBox(UPrimitiveComponent *OverlappedComp,
53 AActor *OtherActor,
54 UPrimitiveComponent *OtherComp,
55 int32 OtherBodyIndex,
56 bool bFromSweep,
57 const FHitResult &SweepResult);
58
59 UFUNCTION(BlueprintCallable)
60 void OnOverlapEndStopCheckBox(UPrimitiveComponent *OverlappedComp,
61 AActor *OtherActor,
62 UPrimitiveComponent *OtherComp,
63 int32 OtherBodyIndex);
64
65 void RemoveSameVehicleInBothLists();
66
67 UPROPERTY()
68 TSet<ACarlaWheeledVehicle*> VehiclesInStop;
69
70 UPROPERTY()
71 TMap<ACarlaWheeledVehicle*, int> VehiclesToCheck;
72};
sode override
Definition ActorData.h:280
Base class for CARLA wheeled vehicles.
地图类的前向声明,用于在LaneInvasionSensor类中可能的引用。
CARLA模拟器的主命名空间。
Definition Carla.cpp:139