106 const FTransform &Transform,
109 auto *World = GetWorld();
110 if (World ==
nullptr)
112 UE_LOG(LogCarla, Error, TEXT(
"ASensorFactory: cannot spawn sensor into an empty world."));
117 if (GameInstance ==
nullptr)
119 UE_LOG(LogCarla, Error, TEXT(
"ASensorFactory: cannot spawn sensor, incompatible game instance."));
123 auto *Sensor = World->SpawnActorDeferred<
ASensor>(
128 ESpawnActorCollisionHandlingMethod::AlwaysSpawn);
129 if (Sensor ==
nullptr)
131 UE_LOG(LogCarla, Error, TEXT(
"ASensorFactory: spawn sensor failed."));
136 check(Episode !=
nullptr);
138 Sensor->SetEpisode(*Episode);
139 Sensor->Set(Description);
159 UGameplayStatics::FinishSpawningActor(Sensor, Transform);
CompositeSerializer< std::pair< ACollisionSensor *, s11n::CollisionEventSerializer >, std::pair< ADepthCamera *, s11n::ImageSerializer >, std::pair< ANormalsCamera *, s11n::NormalsImageSerializer >, std::pair< ADVSCamera *, s11n::DVSEventArraySerializer >, std::pair< AGnssSensor *, s11n::GnssSerializer >, std::pair< AInertialMeasurementUnit *, s11n::IMUSerializer >, std::pair< ALaneInvasionSensor *, s11n::NoopSerializer >, std::pair< AObstacleDetectionSensor *, s11n::ObstacleDetectionEventSerializer >, std::pair< AOpticalFlowCamera *, s11n::OpticalFlowImageSerializer >, std::pair< ARadar *, s11n::RadarSerializer >, std::pair< ARayCastSemanticLidar *, s11n::SemanticLidarSerializer >, std::pair< ARayCastLidar *, s11n::LidarSerializer >, std::pair< ARssSensor *, s11n::NoopSerializer >, std::pair< ASceneCaptureCamera *, s11n::ImageSerializer >, std::pair< ASemanticSegmentationCamera *, s11n::ImageSerializer >, std::pair< AInstanceSegmentationCamera *, s11n::ImageSerializer >, std::pair< FWorldObserver *, s11n::EpisodeStateSerializer >, std::pair< FCameraGBufferUint8 *, s11n::GBufferUint8Serializer >, std::pair< FCameraGBufferFloat *, s11n::GBufferFloatSerializer >, std::pair< AV2XSensor *, s11n::CAMDataSerializer >, std::pair< ACustomV2XSensor *, s11n::CustomV2XDataSerializer > > SensorRegistry
Contains a registry of all the sensors available and allows serializing and deserializing sensor data...