|
CARLA
|
A simulation episode. More...
#include <CarlaEpisode.h>
Inheritance diagram for UCarlaEpisode:Public Member Functions | |
| void | AddRosParentNames (FCarlaActor &Child) |
| ROS 2: registers the ros_name of each of Child's ancestors as one of its parent frames. | |
| void | ApplySettings (const FEpisodeSettings &Settings) |
| void | AttachActors (AActor *Child, AActor *Parent, EAttachmentType InAttachmentType=EAttachmentType::Rigid) |
| Attach Child to Parent. | |
| bool | DestroyActor (AActor *Actor) |
| bool | DestroyActor (carla::rpc::ActorId ActorId) |
| bool | DrawWalkerIsCrosser () |
| Draw once per walker at navigation start: crosser or not. | |
| FCarlaActor * | FindCarlaActor (AActor *Actor) const |
| Find the actor view of Actor. | |
| FCarlaActor * | FindCarlaActor (FCarlaActor::IdType ActorId) |
| Find a Carla actor by id. | |
| FCarlaActor * | FindCarlaActorFromStream (carla::streaming::detail::stream_id_type StreamId) |
| Find the Carla actor (sensor) that owns the stream StreamId, or nullptr. | |
| const TArray< FActorDefinition > & | GetActorDefinitions () const |
| Return the list of actor definitions that are available to be spawned this episode. | |
| FString | GetActorDescriptionFromStream (carla::streaming::detail::stream_id_type StreamId) |
| Get the description of the Carla actor (sensor) using specific stream id. | |
| FActorRegistry & | GetActorRegistry () |
| const FActorRegistry & | GetActorRegistry () const |
| FIntVector | GetCurrentMapOrigin () const |
| double | GetElapsedGameTime () const |
| Game seconds since the start of this episode. | |
| FFrameData & | GetFrameData () |
| const carla::geom::GeoProjection & | GetGeoProjection () const |
| Return the geo projection of the map loaded. | |
| auto | GetId () const |
| Return the unique id of this episode. | |
| const FString & | GetMapName () const |
| FPrimaryWorldState & | GetMultiGpuWorldState () |
| Multi-GPU primary: the world state the frames sent so far carried. | |
| TArray< FTransform > | GetRecommendedSpawnPoints () const |
| Return the list of recommended spawn points for vehicles. | |
| ACarlaRecorder * | GetRecorder () const |
| CarlaReplayer * | GetReplayer () const |
| FSensorManager & | GetSensorManager () |
| const FEpisodeSettings & | GetSettings () const |
| APawn * | GetSpectatorPawn () const |
| double | GetVisualGameTime () const |
| Visual game seconds. | |
| AWeather * | GetWeather () const |
| bool | LoadNewEpisode (const FString &MapString, bool ResetSettings=true) |
| Load a new map and start a new episode. | |
| bool | LoadNewOpendriveEpisode (const FString &OpenDriveString, const carla::rpc::OpendriveGenerationParameters &Params) |
| Load a new map generating the mesh from OpenDRIVE data and start a new episode. | |
| void | MarkSceneLightChanged (int32 LightId) |
| A scene light changed: Multi-GPU secondaries get its new state. | |
| void | PutActorToSleep (carla::rpc::ActorId ActorId) |
| AActor * | ReSpawnActorWithInfo (const FTransform &Transform, FActorDescription thisActorDescription) |
| Spawns an actor based on ActorDescription at Transform. | |
| carla::rpc::Actor | SerializeActor (AActor *Actor) const |
| Create a serializable object describing the actor. | |
| carla::rpc::Actor | SerializeActor (FCarlaActor *CarlaActor) const |
| Create a serializable object describing the actor. | |
| carla::rpc::Actor | SerializeActorWithPrimaryIds (AActor *Actor) const |
| SerializeActor, with the ids the primary's clients know on a Multi-GPU secondary (for data a sensor streams to them). | |
| void | SetCurrentMapOrigin (const FIntVector &NewOrigin) |
| void | SetPedestriansCrossFactor (float InCrossFactor) |
| Probability that a walker whose navigation starts after this call is a "crosser" (may traverse crosswalk/road nav areas). | |
| void | SetPedestriansSeed (uint32 InSeed) |
| Seed the RNG behind the crosser draw (and any future navigation randomness). | |
| void | SetRecorder (ACarlaRecorder *Rec) |
| void | SetVisualGameTime (double Time) |
| AActor * | SpawnActor (const FTransform &Transform, FActorDescription ActorDescription) |
| Spawns an actor based on ActorDescription at Transform. | |
| TPair< EActorSpawnResultStatus, FCarlaActor * > | SpawnActorWithInfo (const FTransform &Transform, FActorDescription thisActorDescription, FCarlaActor::IdType DesiredId=0) |
| Spawns an actor based on ActorDescription at Transform. | |
| std::string | StartRecorder (std::string name, bool AdditionalData, bool StopReplayer) |
| UCarlaEpisode (const FObjectInitializer &ObjectInitializer) | |
| void | WakeActorUp (carla::rpc::ActorId ActorId) |
Static Public Member Functions | |
| static void | ClearGeneratedWorldFiles () |
| Delete Saved/OpenDrive|Nav/OpenDriveMap. | |
| static bool | WaitForPendingNavigationBuild (double TimeoutSeconds) |
| Return the name of the map loaded in this episode. | |
Public Attributes | |
| bool | bIsPrimaryServer = true |
Private Member Functions | |
| void | EndPlay () |
| void | InitializeAtBeginPlay () |
| void | RegisterActorFactory (ACarlaActorFactory &ActorFactory) |
| bool | SetActorCollisions (FCarlaActor &CarlaActor, bool bEnabled) |
| bool | SetActorDead (FCarlaActor &CarlaActor) |
| bool | SetActorSimulatePhysics (FCarlaActor &CarlaActor, bool bEnabled) |
| void | SetTimers (double InElapsedGameTime, double InVisualGameTime) |
| Multi-GPU secondary: adopt the primary's clocks for the frame being played. | |
| void | TickTimers (float DeltaSeconds) |
| std::pair< int, FCarlaActor & > | TryToCreateReplayerActor (FVector &Location, FVector &Rotation, FActorDescription &ActorDesc, unsigned int desiredId) |
Private Attributes | |
| UActorDispatcher * | ActorDispatcher = nullptr |
| FIntVector | CurrentMapOrigin |
| double | ElapsedGameTime = 0.0 |
| FEpisodeSettings | EpisodeSettings |
| FFrameData | FrameData |
| const uint64 | Id = 0u |
| carla::geom::GeoProjection | MapGeoProjection |
| FString | MapName |
| UMaterialParameterCollectionInstance * | MaterialParameters = nullptr |
| FPrimaryWorldState | MultiGpuWorldState |
| float | PedestriansCrossFactor = 0.0f |
| FRandomStream | PedestriansNavRNG = FRandomStream(0) |
| ACarlaRecorder * | Recorder = nullptr |
| FSensorManager | SensorManager |
| APawn * | Spectator = nullptr |
| double | VisualGameTime = 0.0 |
| AWeather * | Weather = nullptr |
Friends | |
| class | AAutowareGameModeBase |
| class | ACarlaGameModeBase |
| class | FCarlaEngine |
A simulation episode.
Each time the level is restarted a new episode is created.
Definition at line 42 of file CarlaEpisode.h.
| UCarlaEpisode::UCarlaEpisode | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 138 of file CarlaEpisode.cpp.
References ActorDispatcher, BuildRecastBuilderFile(), FrameData, and FFrameData::SetEpisode().
| void UCarlaEpisode::AddRosParentNames | ( | FCarlaActor & | Child | ) |
ROS 2: registers the ros_name of each of Child's ancestors as one of its parent frames.
Definition at line 401 of file CarlaEpisode.cpp.
References FActorInfo::Description, FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorInfo(), carla::ros2::ROS2::GetInstance(), FCarlaActor::GetParent(), and FActorDescription::Variations.
Referenced by FCarlaServer::FPimpl::BindActions(), and FFrameData::ProcessReplayerEventParent().
| void UCarlaEpisode::ApplySettings | ( | const FEpisodeSettings & | Settings | ) |
Definition at line 343 of file CarlaEpisode.cpp.
References FEpisodeSettings::ActorActiveDistance, EpisodeSettings, FCarlaStaticDelegates::OnEpisodeSettingsChange, and FEpisodeSettings::TileStreamingDistance.
Referenced by FCarlaServer::FPimpl::BindActions(), LoadNewEpisode(), FCarlaEngine::MirrorPrimarySettings(), FCarlaEngine::NotifyBeginEpisode(), and FCarlaEngine::OnPreTick().
| void UCarlaEpisode::AttachActors | ( | AActor * | Child, |
| AActor * | Parent, | ||
| EAttachmentType | InAttachmentType = EAttachmentType::Rigid |
||
| ) |
Attach Child to Parent.
Definition at line 458 of file CarlaEpisode.cpp.
References FFrameData::AddEvent(), ACarlaRecorder::AddEvent(), UActorAttacher::AttachActors(), bIsPrimaryServer, CurrentMapOrigin, FindCarlaActor(), FCarlaActor::GetActorId(), GetFrameData(), ACarlaRecorder::IsEnabled(), and Recorder.
Referenced by FCarlaServer::FPimpl::BindActions(), CarlaReplayerHelper::ProcessReplayerEventParent(), and FActorRegistry::WakeActorUp().
|
static |
Delete Saved/OpenDrive|Nav/OpenDriveMap.
Definition at line 100 of file CarlaEpisode.cpp.
Referenced by LoadNewOpendriveEpisode(), and FCarlaEngine::NotifyInitGame().
|
inline |
Definition at line 271 of file CarlaEpisode.h.
References FCarlaActor::GetActorId().
Referenced by FCarlaServer::FPimpl::BindActions(), FFrameData::ProcessReplayerEventDel(), and CarlaReplayerHelper::ProcessReplayerEventDel().
|
inline |
Definition at line 282 of file CarlaEpisode.h.
|
inline |
Draw once per walker at navigation start: crosser or not.
Definition at line 389 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions().
|
private |
Definition at line 569 of file CarlaEpisode.cpp.
References ACarlaRecorder::GetReplayer(), CarlaReplayer::IsEnabled(), Recorder, CarlaReplayer::Stop(), and ACarlaRecorder::Stop().
Referenced by ACarlaGameModeBase::EndPlay().
|
inline |
Find the actor view of Actor.
If the actor is not found or is pending kill, the returned view is invalid.
Definition at line 195 of file CarlaEpisode.h.
|
inline |
Find a Carla actor by id.
If the actor is not found or is pending kill, the returned view is invalid.
Definition at line 186 of file CarlaEpisode.h.
Referenced by AddRosParentNames(), ApplyTextureToActor(), AttachActors(), FCarlaServer::FPimpl::BindActions(), FCarlaEngine::BindReplayedSensor(), CarlaGetActorAngularVelocityInRadians(), ALargeMapManager::CheckActiveActors(), ALargeMapManager::CheckDormantActors(), ALargeMapManager::ConvertDormantToActiveActors(), FFrameData::CreateOrReuseActor(), ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), ALargeMapManager::OnActorDestroyed(), FFrameData::PlayAppearances(), FFrameData::PlayFrameData(), FFrameData::PlayKinematics(), FFrameData::PlayPositions(), FFrameData::PlayVehicleParts(), FFrameData::ProcessReplayerAnimBiker(), CarlaReplayerHelper::ProcessReplayerAnimBiker(), FFrameData::ProcessReplayerAnimVehicle(), CarlaReplayerHelper::ProcessReplayerAnimVehicle(), CarlaReplayerHelper::ProcessReplayerAnimVehicleWheels(), CarlaReplayerHelper::ProcessReplayerDoorVehicle(), FFrameData::ProcessReplayerEventDel(), CarlaReplayerHelper::ProcessReplayerEventDel(), CarlaReplayerHelper::ProcessReplayerEventParent(), FFrameData::ProcessReplayerEventParent(), FFrameData::ProcessReplayerLightVehicle(), CarlaReplayerHelper::ProcessReplayerLightVehicle(), FFrameData::ProcessReplayerPosition(), CarlaReplayerHelper::ProcessReplayerPosition(), FFrameData::ProcessReplayerStateTrafficLight(), CarlaReplayerHelper::ProcessReplayerStateTrafficLight(), CarlaReplayerHelper::ProcessReplayerWalkerBones(), FCarlaEngine::RestorePlayedPoses(), SerializeActor(), CaService::SetActor(), FFrameData::SetCameraPosition(), CarlaReplayerHelper::SetCameraPosition(), ACustomV2XSensor::SetOwner(), FFrameData::SetWalkerSpeed(), CarlaReplayerHelper::SetWalkerSpeed(), and ACustomV2XSensor::UpdateStationId().
|
inline |
Find the Carla actor (sensor) that owns the stream StreamId, or nullptr.
Definition at line 209 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), and IsUnrenderableLocalSensorStream().
|
inline |
Return the list of actor definitions that are available to be spawned this episode.
Definition at line 137 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), and InitializeAtBeginPlay().
|
inline |
Get the description of the Carla actor (sensor) using specific stream id.
If the actor is not found returns an empty string
Definition at line 203 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 173 of file CarlaEpisode.h.
|
inline |
Definition at line 168 of file CarlaEpisode.h.
Referenced by ACarlaRecorder::AddCollision(), FFrameData::AddExistingActors(), ACarlaRecorder::AddExistingActors(), FFrameData::AddPhysicsControl(), ACarlaRecorder::AddPhysicsControl(), FFrameData::AddTrafficLightTime(), ACarlaRecorder::AddTrafficLightTime(), FFrameData::AddTriggerVolume(), ACarlaRecorder::AddTriggerVolume(), ACarlaRecorder::AddVehicleDoor(), FCarlaServer::FPimpl::BindActions(), ARayCastSemanticLidar::ComputeRawDetection(), FFrameData::FindTrafficSignAt(), CarlaReplayerHelper::FindTrafficSignAt(), FWorldObserver_Serialize(), FFrameData::GetFrameData(), PathLossModel::GetLocationIfVehicle(), PathLossModel::IsVehicle(), FCarlaEngine::NotifyBeginEpisode(), ALargeMapManager::OnActorSpawned(), AV2XSensor::PostPhysTick(), FFrameData::ProcessReplayerFinish(), CarlaReplayerHelper::ProcessReplayerFinish(), ALargeMapManager::RegisterInitialObjects(), FCarlaShowOnlyFilter::Rescan(), PathLossModel::Simulate(), and ACarlaRecorder::Ticking().
|
inline |
Definition at line 349 of file CarlaEpisode.h.
Referenced by FWorldObserver_Serialize(), FActorData::GetLocalTransform(), and FActorData::RecordActorData().
|
inline |
Game seconds since the start of this episode.
Definition at line 112 of file CarlaEpisode.h.
Referenced by CaService::AddCooperativeAwarenessMessage(), FWorldObserver::BroadcastTick(), ASensor::MakeCaptureContext(), FCarlaEngine::OnPostTick(), CaService::SetActor(), and CaService::Trigger().
|
inline |
Definition at line 353 of file CarlaEpisode.h.
Referenced by AttachActors(), UActorDispatcher::OnActorDestroyed(), FCarlaEngine::OnPostTick(), and SpawnActorWithInfo().
|
inline |
Return the geo projection of the map loaded.
Definition at line 147 of file CarlaEpisode.h.
Referenced by AAutowareGnssSensor::BeginPlay(), AGnssSensor::BeginPlay(), and CaService::SetActor().
|
inline |
Return the unique id of this episode.
Definition at line 90 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), and FWorldObserver_Serialize().
|
inline |
Definition at line 106 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), FCarlaEngine::NotifyBeginEpisode(), FCarlaServer::NotifyBeginEpisode(), and CarlaReplayer::ReplayFile().
|
inline |
Multi-GPU primary: the world state the frames sent so far carried.
Definition at line 356 of file CarlaEpisode.h.
Referenced by FFrameData::AddActorAppearance(), FFrameData::AddWorldState(), and FFrameData::GetFrameData().
| TArray< FTransform > UCarlaEpisode::GetRecommendedSpawnPoints | ( | ) | const |
Return the list of recommended spawn points for vehicles.
Definition at line 354 of file CarlaEpisode.cpp.
References UCarlaStatics::GetGameMode(), and ACarlaGameModeBase::GetSpawnPointsTransforms().
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 332 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), and FCarlaEngine::OnPostTick().
|
inline |
Definition at line 342 of file CarlaEpisode.h.
Referenced by ACarlaRecorder::Ticking().
|
inline |
Definition at line 367 of file CarlaEpisode.h.
Referenced by ASensor::BeginPlay(), ASensor::EndPlay(), FCarlaEngine::OnPostTick(), and UCarlaLidarSubsystem::RegisterLidar().
|
inline |
Definition at line 77 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::BeginPlay(), FCarlaServer::FPimpl::BindActions(), FCarlaEngine::MirrorPrimarySettings(), and ASceneCaptureCamera_RayTracedLens::TickCaptureAndReadback().
|
inline |
Definition at line 157 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), FFrameData::SetCameraPosition(), and CarlaReplayerHelper::SetCameraPosition().
|
inline |
Visual game seconds.
Definition at line 118 of file CarlaEpisode.h.
Referenced by FCarlaEngine::OnPostTick(), and ACarlaRecorder::Ticking().
|
inline |
Definition at line 163 of file CarlaEpisode.h.
References Weather.
Referenced by ACarlaRecorder::AddExistingWeather(), FFrameData::AddWorldState(), ASceneCaptureSensor::BeginPlay(), ASceneCaptureSensor_WideAngleLens::BeginPlay(), FCarlaServer::FPimpl::BindActions(), FFrameData::PlayWorldState(), and CarlaReplayerHelper::ProcessReplayerWeather().
|
private |
Definition at line 486 of file CarlaEpisode.cpp.
References ActorDispatcher, FActorDescription::Class, Float, GetActorDefinitions(), FActorDescription::Id, MaterialParameters, UActorDispatcher::RegisterActor(), Spectator, String, UCarlaEpisode_GetTrafficSignId(), FActorDescription::UId, and FActorDescription::Variations.
Referenced by ACarlaGameModeBase::BeginPlay().
| bool UCarlaEpisode::LoadNewEpisode | ( | const FString & | MapString, |
| bool | ResetSettings = true |
||
| ) |
Load a new map and start a new episode.
If MapString is empty, the current map is reloaded.
Definition at line 155 of file CarlaEpisode.cpp.
References ApplySettings(), bIsPrimaryServer, carla::Buffer::data(), UCarlaStatics::FindMapPath(), carla::multigpu::LoadMapExtras::generation_parameters, UCarlaGameInstance::GetCarlaEngine(), UCarlaStatics::GetGameInstance(), UCarlaGameInstance::GetOpendriveGenerationParameters(), UOpenDrive::GetSavedXODRPath(), FCarlaEngine::GetSecondaryServer(), carla::multigpu::LoadMapExtras::opendrive, carla::MsgPack::Pack(), and carla::Buffer::size().
Referenced by FCarlaServer::FPimpl::BindActions(), and CarlaReplayer::ReplayFile().
| bool UCarlaEpisode::LoadNewOpendriveEpisode | ( | const FString & | OpenDriveString, |
| const carla::rpc::OpendriveGenerationParameters & | Params | ||
| ) |
Load a new map generating the mesh from OpenDRIVE data and start a new episode.
If MapString is empty, it fails.
Definition at line 195 of file CarlaEpisode.cpp.
References BuildRecastBuilderFile(), ClearGeneratedWorldFiles(), carla::rpc::OpendriveGenerationParameters::enable_pedestrian_navigation, UCarlaStatics::GetGameInstance(), UOpenDrive::GetSavedXODRPath(), GNavBuildLock, GNavBuildPending, GNavBuildSucceeded, carla::opendrive::OpenDriveParser::Load(), carla::log_warning(), UCarlaGameInstance::SetOpendriveGenerationParameters(), carla::rpc::OpendriveGenerationParameters::vertex_distance, and WaitForPendingNavigationBuild().
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
A scene light changed: Multi-GPU secondaries get its new state.
Definition at line 359 of file CarlaEpisode.h.
|
inline |
Definition at line 307 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions(), ALargeMapManager::ConvertActiveToDormantActors(), CarlaReplayerHelper::ProcessReplayerEventParent(), and FFrameData::ProcessReplayerEventParent().
|
inlineprivate |
Definition at line 406 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::SpawnActorFactories().
|
inline |
Spawns an actor based on ActorDescription at Transform.
Definition at line 232 of file CarlaEpisode.h.
Referenced by FActorData::RespawnActor().
| carla::rpc::Actor UCarlaEpisode::SerializeActor | ( | AActor * | Actor | ) | const |
Create a serializable object describing the actor.
Can be used to serialized actors that are not in the registry
Definition at line 431 of file CarlaEpisode.cpp.
References carla::rpc::Actor::bounding_box, CarlaGetRelevantTagAsString(), carla::rpc::Actor::description, FindCarlaActor(), UBoundingBoxCalculator::GetActorBoundingBox(), ATagger::GetTagsOfTaggedActor(), carla::rpc::Actor::id, FActorDescription::Id, carla::rpc::Actor::semantic_tags, and SerializeActor().
| carla::rpc::Actor UCarlaEpisode::SerializeActor | ( | FCarlaActor * | CarlaActor | ) | const |
Create a serializable object describing the actor.
Definition at line 361 of file CarlaEpisode.cpp.
References FCarlaActor::GetActorInfo(), FCarlaActor::GetParent(), and FActorInfo::SerializedData.
Referenced by FCarlaServer::FPimpl::BindActions(), SerializeActor(), and SerializeActorWithPrimaryIds().
| carla::rpc::Actor UCarlaEpisode::SerializeActorWithPrimaryIds | ( | AActor * | Actor | ) | const |
SerializeActor, with the ids the primary's clients know on a Multi-GPU secondary (for data a sensor streams to them).
Definition at line 380 of file CarlaEpisode.cpp.
References ActorDispatcher, bIsPrimaryServer, FActorRegistry::FindCarlaActor(), UActorDispatcher::GetActorRegistry(), carla::rpc::Actor::id, carla::rpc::Actor::parent_id, and SerializeActor().
|
private |
|
private |
|
private |
|
inline |
Definition at line 351 of file CarlaEpisode.h.
Referenced by ALargeMapManager::PostWorldOriginOffset().
|
inline |
Probability that a walker whose navigation starts after this call is a "crosser" (may traverse crosswalk/road nav areas).
Legacy semantics of carla.World.set_pedestrians_cross_factor.
Definition at line 376 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Seed the RNG behind the crosser draw (and any future navigation randomness).
Deterministic given the same seed and start order.
Definition at line 383 of file CarlaEpisode.h.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 337 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::InitGame(), and FCarlaEngine::NotifyBeginEpisode().
|
inlineprivate |
Multi-GPU secondary: adopt the primary's clocks for the frame being played.
Absolute, not accumulated, so frames a secondary never played (while it was loading) cause no drift.
Definition at line 438 of file CarlaEpisode.h.
References carla::ros2::ROS2::GetInstance().
Referenced by FCarlaEngine::PlayPrimaryFrame().
|
inline |
Definition at line 123 of file CarlaEpisode.h.
Referenced by CarlaReplayer::ProcessVisualTime().
|
inline |
Spawns an actor based on ActorDescription at Transform.
To properly despawn an actor created with this function call DestroyActor.
Definition at line 253 of file CarlaEpisode.h.
Referenced by FTrafficSignData::RespawnActor(), and FTrafficLightData::RespawnActor().
| TPair< EActorSpawnResultStatus, FCarlaActor * > UCarlaEpisode::SpawnActorWithInfo | ( | const FTransform & | Transform, |
| FActorDescription | thisActorDescription, | ||
| FCarlaActor::IdType | DesiredId = 0 |
||
| ) |
Spawns an actor based on ActorDescription at Transform.
To properly despawn an actor created with this function call DestroyActor.
Definition at line 598 of file CarlaEpisode.cpp.
References ActorDispatcher, bIsPrimaryServer, ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), EpisodeSettings, GetFrameData(), UCarlaStatics::GetLargeMapManager(), ALargeMapManager::GlobalToLocalTransform(), ACarlaRecorder::IsEnabled(), Recorder, UActorDispatcher::SpawnActor(), FEpisodeSettings::TileStreamingDistance, FActorAttribute::Value, and FActorDescription::Variations.
Referenced by FCarlaServer::FPimpl::BindActions(), FFrameData::CreateOrReuseActor(), and CarlaReplayerHelper::TryToCreateReplayerActor().
| std::string UCarlaEpisode::StartRecorder | ( | std::string | name, |
| bool | AdditionalData, | ||
| bool | StopReplayer | ||
| ) |
Definition at line 582 of file CarlaEpisode.cpp.
References MapName, Recorder, and ACarlaRecorder::Start().
Referenced by FCarlaServer::FPimpl::BindActions().
|
inlineprivate |
Definition at line 423 of file CarlaEpisode.h.
References carla::ros2::ROS2::GetInstance().
Referenced by FCarlaEngine::OnPreTick(), and FCarlaEngine::PlayPrimaryFrame().
|
private |
|
static |
Return the name of the map loaded in this episode.
Block (game thread, bounded) until the RecastBuilder run started by the last generate_opendrive_world has finished. Returns whether the navmesh was built (true when no build is pending).
Definition at line 71 of file CarlaEpisode.cpp.
References GNavBuildLock, GNavBuildPending, and GNavBuildSucceeded.
Referenced by FCarlaServer::FPimpl::BindActions(), and LoadNewOpendriveEpisode().
|
inline |
Definition at line 312 of file CarlaEpisode.h.
Referenced by ALargeMapManager::ConvertDormantToActiveActors().
|
friend |
Definition at line 399 of file CarlaEpisode.h.
|
friend |
Definition at line 398 of file CarlaEpisode.h.
|
friend |
Definition at line 400 of file CarlaEpisode.h.
|
private |
Definition at line 464 of file CarlaEpisode.h.
Referenced by InitializeAtBeginPlay(), SerializeActorWithPrimaryIds(), SpawnActorWithInfo(), and UCarlaEpisode().
| bool UCarlaEpisode::bIsPrimaryServer = true |
Definition at line 394 of file CarlaEpisode.h.
Referenced by AttachActors(), AWalkerBase_IsMirror(), ASensor::BeginPlay(), ACarlaGameModeBase::BeginPlay(), FCarlaServer::FPimpl::BindActions(), CarlaGetActorAngularVelocityInRadians(), AVehicleStatusSensor::CollectAndStream(), ACarlaGameModeBase::InitGame(), LoadNewEpisode(), FCarlaEngine::NotifyBeginEpisode(), UActorDispatcher::OnActorDestroyed(), SerializeActorWithPrimaryIds(), and SpawnActorWithInfo().
|
private |
Definition at line 479 of file CarlaEpisode.h.
Referenced by AttachActors().
|
private |
Definition at line 452 of file CarlaEpisode.h.
|
private |
Definition at line 461 of file CarlaEpisode.h.
Referenced by ApplySettings(), FCarlaEngine::NotifyBeginEpisode(), and SpawnActorWithInfo().
|
private |
Definition at line 485 of file CarlaEpisode.h.
Referenced by UCarlaEpisode().
|
private |
Definition at line 449 of file CarlaEpisode.h.
|
private |
Definition at line 477 of file CarlaEpisode.h.
Referenced by AAutowareGameModeBase::LoadGeoReference(), and ACarlaGameModeBase::ParseOpenDrive().
|
private |
Definition at line 458 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::InitGame(), and StartRecorder().
|
private |
Definition at line 473 of file CarlaEpisode.h.
Referenced by InitializeAtBeginPlay().
|
private |
Definition at line 487 of file CarlaEpisode.h.
|
private |
Definition at line 481 of file CarlaEpisode.h.
|
private |
Definition at line 483 of file CarlaEpisode.h.
|
private |
Definition at line 475 of file CarlaEpisode.h.
Referenced by AttachActors(), EndPlay(), SpawnActorWithInfo(), and StartRecorder().
|
private |
Definition at line 489 of file CarlaEpisode.h.
|
private |
Definition at line 467 of file CarlaEpisode.h.
Referenced by InitializeAtBeginPlay().
|
private |
Definition at line 455 of file CarlaEpisode.h.
|
private |
Definition at line 470 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::BeginPlay(), and ACarlaGameModeBase::InitGame().