|
CARLA
|
#include <SensorSpawnerActor.h>
Inheritance diagram for ASensorSpawnerActor:Public Member Functions | |
| ASensorSpawnerActor () | |
| void | SpawnSensors () |
| void | StartRecordingSensorData () |
| void | StopRecordingSensorData () |
| void | ToggleRadarVisibility () |
Protected Member Functions | |
| virtual void | BeginPlay () override |
| virtual void | Tick (float DeltaSeconds) override |
Protected Attributes | |
| TSubclassOf< AActor > | AttachActorClass |
| bool | bSaveDataAtBeginPlay = false |
| float | DelayBetweenSpawns = 0.f |
| float | InitialDelay = 4.f |
| FVector | MaxSpawnLocation {-110000.f, -100000.f, 9600.f} |
| FVector | MinSpawnLocation {-120000.f, -110000.f, 9300.f} |
| float | PointSize = 15.0f |
| FString | SaveImagePath |
| TObjectPtr< USceneComponent > | SceneComp |
| TSubclassOf< class ASensor > | SensorClassToCapture |
| TArray< FSensorTuple > | SensorsToSpawn |
| float | VelocityRange = 0.075 |
Private Member Functions | |
| void | AddSensorToSaveDataArray (AActor *Actor) |
| void | AttachSensorToActor (AActor *SensorActor) |
| void | DrawRadarSensorPoints () const |
| void | GenerateSensorActorDescription (const FActorDefinition *Definition, FActorDescription &SensorDescription) const |
| const FActorDefinition * | GetActorDefinitionByClass (const TSubclassOf< AActor > ActorClass) const |
| void | GetRandomTransform (FTransform &Transform) const |
| void | OnEpisodeInitialised (UCarlaEpisode *InitialisedEpisode) |
| void | SaveSensorData (float DeltaSeconds) |
| void | SpawnSensorActor (const FActorDescription &SensorDescription, bool bAttachToActor) |
| void | SpawnSensorsDelayed () |
Private Attributes | |
| bool | bRadarVisibility = false |
| bool | bRecordingData = false |
| TObjectPtr< UCarlaEpisode > | CarlaEpisode |
| FTimerHandle | InitialDelaySpawnTimerHandle |
| TArray< FSensorTuple > | SensorsToSpawnCopy |
| TArray< TObjectPtr< ASensor > > | SpawnedSensorsArray |
| FTimerHandle | SpawnSensorsDelayedTimerHandle |
Definition at line 38 of file SensorSpawnerActor.h.
| ASensorSpawnerActor::ASensorSpawnerActor | ( | ) |
Definition at line 21 of file SensorSpawnerActor.cpp.
References SaveImagePath, SceneComp, and SensorClassToCapture.
|
private |
Definition at line 208 of file SensorSpawnerActor.cpp.
References bRecordingData, SensorClassToCapture, and SpawnedSensorsArray.
Referenced by SpawnSensorActor().
|
private |
Definition at line 279 of file SensorSpawnerActor.cpp.
References AttachActorClass.
Referenced by SpawnSensorActor().
|
overrideprotectedvirtual |
Definition at line 33 of file SensorSpawnerActor.cpp.
References bRecordingData, bSaveDataAtBeginPlay, OnEpisodeInitialised(), and SaveImagePath.
|
private |
Definition at line 294 of file SensorSpawnerActor.cpp.
References PointSize, SpawnedSensorsArray, and VelocityRange.
Referenced by Tick().
|
private |
Definition at line 156 of file SensorSpawnerActor.cpp.
References FActorDefinition::Class, FActorDescription::Class, FActorAttribute::Id, FActorDefinition::Id, FActorDescription::Id, FActorAttribute::Type, FActorDefinition::UId, FActorDescription::UId, FActorAttribute::Value, FActorDefinition::Variations, and FActorDescription::Variations.
Referenced by SpawnSensors(), and SpawnSensorsDelayed().
|
private |
Definition at line 120 of file SensorSpawnerActor.cpp.
References CarlaEpisode, FActorDefinition::Class, and IsValid().
Referenced by SpawnSensors(), and SpawnSensorsDelayed().
|
private |
Definition at line 176 of file SensorSpawnerActor.cpp.
References MaxSpawnLocation, and MinSpawnLocation.
Referenced by SpawnSensorActor().
|
private |
Definition at line 47 of file SensorSpawnerActor.cpp.
References CarlaEpisode, InitialDelay, InitialDelaySpawnTimerHandle, IsValid(), and SpawnSensors().
Referenced by BeginPlay().
|
private |
Definition at line 235 of file SensorSpawnerActor.cpp.
References FCarlaEngine::GetFrameCounter(), UJsonFileManagerLibrary::SaveGnssDataToJson(), SaveImagePath, UJsonFileManagerLibrary::SaveIMUDataToJson(), UJsonFileManagerLibrary::SaveLidarDataToPly(), UJsonFileManagerLibrary::SaveRadarDataToJson(), and SpawnedSensorsArray.
Referenced by Tick().
|
private |
Definition at line 134 of file SensorSpawnerActor.cpp.
References AddSensorToSaveDataArray(), AttachSensorToActor(), CarlaEpisode, GetRandomTransform(), and IsValid().
Referenced by SpawnSensors(), and SpawnSensorsDelayed().
| void ASensorSpawnerActor::SpawnSensors | ( | ) |
Definition at line 58 of file SensorSpawnerActor.cpp.
References DelayBetweenSpawns, GenerateSensorActorDescription(), GetActorDefinitionByClass(), SensorsToSpawn, SensorsToSpawnCopy, SpawnSensorActor(), SpawnSensorsDelayed(), and SpawnSensorsDelayedTimerHandle.
Referenced by OnEpisodeInitialised().
|
private |
Definition at line 185 of file SensorSpawnerActor.cpp.
References GenerateSensorActorDescription(), GetActorDefinitionByClass(), SensorsToSpawnCopy, SpawnSensorActor(), and SpawnSensorsDelayedTimerHandle.
Referenced by SpawnSensors().
| void ASensorSpawnerActor::StartRecordingSensorData | ( | ) |
Definition at line 89 of file SensorSpawnerActor.cpp.
References bRecordingData, and SpawnedSensorsArray.
| void ASensorSpawnerActor::StopRecordingSensorData | ( | ) |
Definition at line 102 of file SensorSpawnerActor.cpp.
References bRecordingData, and SpawnedSensorsArray.
|
overrideprotectedvirtual |
Definition at line 220 of file SensorSpawnerActor.cpp.
References bRadarVisibility, bRecordingData, DrawRadarSensorPoints(), SaveSensorData(), and Tick().
Referenced by Tick().
| void ASensorSpawnerActor::ToggleRadarVisibility | ( | ) |
Definition at line 115 of file SensorSpawnerActor.cpp.
References bRadarVisibility.
|
protected |
Definition at line 74 of file SensorSpawnerActor.h.
Referenced by AttachSensorToActor().
|
private |
Definition at line 116 of file SensorSpawnerActor.h.
Referenced by Tick(), and ToggleRadarVisibility().
|
private |
Definition at line 114 of file SensorSpawnerActor.h.
Referenced by AddSensorToSaveDataArray(), BeginPlay(), StartRecordingSensorData(), StopRecordingSensorData(), and Tick().
|
protected |
Definition at line 94 of file SensorSpawnerActor.h.
Referenced by BeginPlay().
|
private |
Definition at line 142 of file SensorSpawnerActor.h.
Referenced by GetActorDefinitionByClass(), OnEpisodeInitialised(), and SpawnSensorActor().
|
protected |
Definition at line 82 of file SensorSpawnerActor.h.
Referenced by SpawnSensors().
|
protected |
Definition at line 78 of file SensorSpawnerActor.h.
Referenced by OnEpisodeInitialised().
|
private |
Definition at line 144 of file SensorSpawnerActor.h.
Referenced by OnEpisodeInitialised().
|
protected |
Definition at line 86 of file SensorSpawnerActor.h.
Referenced by GetRandomTransform().
|
protected |
Definition at line 90 of file SensorSpawnerActor.h.
Referenced by GetRandomTransform().
|
protected |
Definition at line 109 of file SensorSpawnerActor.h.
Referenced by DrawRadarSensorPoints().
|
protected |
Definition at line 102 of file SensorSpawnerActor.h.
Referenced by ASensorSpawnerActor(), BeginPlay(), and SaveSensorData().
|
protected |
Definition at line 66 of file SensorSpawnerActor.h.
Referenced by ASensorSpawnerActor().
|
protected |
Definition at line 98 of file SensorSpawnerActor.h.
Referenced by AddSensorToSaveDataArray(), and ASensorSpawnerActor().
|
protected |
Definition at line 70 of file SensorSpawnerActor.h.
Referenced by SpawnSensors().
|
private |
Definition at line 150 of file SensorSpawnerActor.h.
Referenced by SpawnSensors(), and SpawnSensorsDelayed().
|
private |
Definition at line 154 of file SensorSpawnerActor.h.
Referenced by AddSensorToSaveDataArray(), DrawRadarSensorPoints(), SaveSensorData(), StartRecordingSensorData(), and StopRecordingSensorData().
|
private |
Definition at line 147 of file SensorSpawnerActor.h.
Referenced by SpawnSensors(), and SpawnSensorsDelayed().
|
protected |
Definition at line 106 of file SensorSpawnerActor.h.
Referenced by DrawRadarSensorPoints().