|
CARLA
|
A simulation episode. More...
#include <CarlaEpisode.h>
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 () |
| bool | IsWalkerInsideBuilding (const AWalkerBase &Walker) const |
| True if the centre of Walker's capsule is inside the collision of a building or wall, where physics would push the walker out through the terrain (#10212). | |
| 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 44 of file CarlaEpisode.h.
| UCarlaEpisode::UCarlaEpisode | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 141 of file CarlaEpisode.cpp.
References ActorDispatcher, BuildRecastBuilderFile(), FrameData, Id, 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 404 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 346 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 461 of file CarlaEpisode.cpp.
References ACarlaRecorder::AddEvent(), FFrameData::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 103 of file CarlaEpisode.cpp.
Referenced by LoadNewOpendriveEpisode(), and FCarlaEngine::NotifyInitGame().
|
inline |
Definition at line 273 of file CarlaEpisode.h.
References DestroyActor(), FindCarlaActor(), and FCarlaActor::GetActorId().
Referenced by FCarlaServer::FPimpl::BindActions(), DestroyActor(), CarlaReplayerHelper::ProcessReplayerEventDel(), and FFrameData::ProcessReplayerEventDel().
|
inline |
Definition at line 284 of file CarlaEpisode.h.
References ActorDispatcher, bIsPrimaryServer, GetFrameData(), and Recorder.
|
inline |
Draw once per walker at navigation start: crosser or not.
Definition at line 391 of file CarlaEpisode.h.
References PedestriansCrossFactor, and PedestriansNavRNG.
Referenced by FCarlaServer::FPimpl::BindActions().
|
private |
Definition at line 572 of file CarlaEpisode.cpp.
References ACarlaRecorder::GetReplayer(), CarlaReplayer::IsEnabled(), Recorder, ACarlaRecorder::Stop(), and CarlaReplayer::Stop().
Referenced by ACarlaGameModeBase::EndPlay(), and FCarlaEngine.
|
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 197 of file CarlaEpisode.h.
References ActorDispatcher.
|
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 188 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by AddRosParentNames(), ApplyTextureToActor(), AttachActors(), FCarlaServer::FPimpl::BindActions(), FCarlaEngine::BindReplayedSensor(), CarlaGetActorAngularVelocityInRadians(), ALargeMapManager::CheckActiveActors(), ALargeMapManager::CheckDormantActors(), ALargeMapManager::ConvertDormantToActiveActors(), FFrameData::CreateOrReuseActor(), ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), DestroyActor(), ALargeMapManager::OnActorDestroyed(), FFrameData::PlayAppearances(), FFrameData::PlayFrameData(), FFrameData::PlayKinematics(), FFrameData::PlayPositions(), FFrameData::PlayVehicleParts(), CarlaReplayerHelper::ProcessReplayerAnimBiker(), FFrameData::ProcessReplayerAnimBiker(), CarlaReplayerHelper::ProcessReplayerAnimVehicle(), FFrameData::ProcessReplayerAnimVehicle(), CarlaReplayerHelper::ProcessReplayerAnimVehicleWheels(), CarlaReplayerHelper::ProcessReplayerDoorVehicle(), CarlaReplayerHelper::ProcessReplayerEventDel(), FFrameData::ProcessReplayerEventDel(), CarlaReplayerHelper::ProcessReplayerEventParent(), FFrameData::ProcessReplayerEventParent(), CarlaReplayerHelper::ProcessReplayerLightVehicle(), FFrameData::ProcessReplayerLightVehicle(), CarlaReplayerHelper::ProcessReplayerPosition(), FFrameData::ProcessReplayerPosition(), CarlaReplayerHelper::ProcessReplayerStateTrafficLight(), FFrameData::ProcessReplayerStateTrafficLight(), CarlaReplayerHelper::ProcessReplayerWalkerBones(), FCarlaEngine::RestorePlayedPoses(), SerializeActor(), CaService::SetActor(), CarlaReplayerHelper::SetCameraPosition(), FFrameData::SetCameraPosition(), ACustomV2XSensor::SetOwner(), CarlaReplayerHelper::SetWalkerSpeed(), FFrameData::SetWalkerSpeed(), and ACustomV2XSensor::UpdateStationId().
|
inline |
Find the Carla actor (sensor) that owns the stream StreamId, or nullptr.
Definition at line 211 of file CarlaEpisode.h.
References ActorDispatcher.
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 139 of file CarlaEpisode.h.
References ActorDispatcher, and GetActorDefinitions().
Referenced by FCarlaServer::FPimpl::BindActions(), GetActorDefinitions(), 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 205 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 175 of file CarlaEpisode.h.
References ActorDispatcher.
|
inline |
Definition at line 170 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by ACarlaRecorder::AddCollision(), ACarlaRecorder::AddExistingActors(), FFrameData::AddExistingActors(), ACarlaRecorder::AddPhysicsControl(), FFrameData::AddPhysicsControl(), ACarlaRecorder::AddTrafficLightTime(), FFrameData::AddTrafficLightTime(), ACarlaRecorder::AddTriggerVolume(), FFrameData::AddTriggerVolume(), ACarlaRecorder::AddVehicleDoor(), FCarlaServer::FPimpl::BindActions(), ARayCastSemanticLidar::ComputeRawDetection(), CarlaReplayerHelper::FindTrafficSignAt(), FFrameData::FindTrafficSignAt(), FWorldObserver_Serialize(), FFrameData::GetFrameData(), PathLossModel::GetLocationIfVehicle(), PathLossModel::IsVehicle(), FCarlaEngine::NotifyBeginEpisode(), ALargeMapManager::OnActorSpawned(), AV2XSensor::PostPhysTick(), CarlaReplayerHelper::ProcessReplayerFinish(), FFrameData::ProcessReplayerFinish(), ALargeMapManager::RegisterInitialObjects(), FCarlaShowOnlyFilter::Rescan(), PathLossModel::Simulate(), and ACarlaRecorder::Ticking().
|
inline |
Definition at line 351 of file CarlaEpisode.h.
References CurrentMapOrigin.
Referenced by FWorldObserver_Serialize(), FActorData::GetLocalTransform(), and FActorData::RecordActorData().
|
inline |
Game seconds since the start of this episode.
Definition at line 114 of file CarlaEpisode.h.
References ElapsedGameTime.
Referenced by CaService::AddCooperativeAwarenessMessage(), FWorldObserver::BroadcastTick(), ASensor::MakeCaptureContext(), FCarlaEngine::OnPostTick(), CaService::SetActor(), SetTimers(), TickTimers(), and CaService::Trigger().
|
inline |
Definition at line 355 of file CarlaEpisode.h.
References FrameData.
Referenced by AttachActors(), DestroyActor(), UActorDispatcher::OnActorDestroyed(), FCarlaEngine::OnPostTick(), and SpawnActorWithInfo().
|
inline |
Return the geo projection of the map loaded.
Definition at line 149 of file CarlaEpisode.h.
References MapGeoProjection.
Referenced by AAutowareGnssSensor::BeginPlay(), AGnssSensor::BeginPlay(), and CaService::SetActor().
|
inline |
Return the unique id of this episode.
Definition at line 92 of file CarlaEpisode.h.
References Id.
Referenced by FCarlaServer::FPimpl::BindActions(), and FWorldObserver_Serialize().
|
inline |
Definition at line 108 of file CarlaEpisode.h.
References MapName.
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 358 of file CarlaEpisode.h.
References MultiGpuWorldState.
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 357 of file CarlaEpisode.cpp.
References ACarlaGameModeBase, UCarlaStatics::GetGameMode(), and ACarlaGameModeBase::GetSpawnPointsTransforms().
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 334 of file CarlaEpisode.h.
References Recorder.
Referenced by FCarlaServer::FPimpl::BindActions(), and FCarlaEngine::OnPostTick().
|
inline |
Definition at line 344 of file CarlaEpisode.h.
References Recorder.
Referenced by ACarlaRecorder::Ticking().
|
inline |
Definition at line 369 of file CarlaEpisode.h.
References SensorManager.
Referenced by ASensor::BeginPlay(), ASensor::EndPlay(), FCarlaEngine::OnPostTick(), and UCarlaLidarSubsystem::RegisterLidar().
|
inline |
Definition at line 79 of file CarlaEpisode.h.
References EpisodeSettings, and GetSettings().
Referenced by ACarlaGameModeBase::BeginPlay(), FCarlaServer::FPimpl::BindActions(), GetSettings(), FCarlaEngine::MirrorPrimarySettings(), and ASceneCaptureCamera_RayTracedLens::TickCaptureAndReadback().
|
inline |
Definition at line 159 of file CarlaEpisode.h.
References GetSpectatorPawn(), and Spectator.
Referenced by FCarlaServer::FPimpl::BindActions(), GetSpectatorPawn(), CarlaReplayerHelper::SetCameraPosition(), and FFrameData::SetCameraPosition().
|
inline |
Visual game seconds.
Definition at line 120 of file CarlaEpisode.h.
References VisualGameTime.
Referenced by FCarlaEngine::OnPostTick(), and ACarlaRecorder::Ticking().
|
inline |
Definition at line 165 of file CarlaEpisode.h.
References GetWeather(), and Weather.
Referenced by ACarlaRecorder::AddExistingWeather(), FFrameData::AddWorldState(), ASceneCaptureSensor::BeginPlay(), ASceneCaptureSensor_WideAngleLens::BeginPlay(), FCarlaServer::FPimpl::BindActions(), GetWeather(), FFrameData::PlayWorldState(), and CarlaReplayerHelper::ProcessReplayerWeather().
|
private |
Definition at line 489 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(), and FCarlaEngine.
|
private |
True if the centre of Walker's capsule is inside the collision of a building or wall, where physics would push the walker out through the terrain (#10212).
Definition at line 601 of file CarlaEpisode.cpp.
References carla::rpc::Buildings, ATagger::GetTagOfTaggedComponent(), and carla::rpc::Walls.
Referenced by FCarlaEngine, and SpawnActorWithInfo().
| 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 158 of file CarlaEpisode.cpp.
References ApplySettings(), bIsPrimaryServer, carla::Buffer::data(), FCarlaEngine, 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 198 of file CarlaEpisode.cpp.
References BuildRecastBuilderFile(), ClearGeneratedWorldFiles(), carla::rpc::OpendriveGenerationParameters::enable_pedestrian_navigation, UCarlaStatics::GetGameInstance(), UOpenDrive::GetSavedXODRPath(), GNavBuildLock, GNavBuildPending, GNavBuildSucceeded, carla::opendrive::OpenDriveParser::Load(), 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 361 of file CarlaEpisode.h.
References bIsPrimaryServer, and MultiGpuWorldState.
|
inline |
Definition at line 309 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by FCarlaServer::FPimpl::BindActions(), ALargeMapManager::ConvertActiveToDormantActors(), CarlaReplayerHelper::ProcessReplayerEventParent(), and FFrameData::ProcessReplayerEventParent().
|
inlineprivate |
Definition at line 413 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by ACarlaGameModeBase::SpawnActorFactories().
|
inline |
Spawns an actor based on ActorDescription at Transform.
Definition at line 234 of file CarlaEpisode.h.
References ActorDispatcher, and Recorder.
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 434 of file CarlaEpisode.cpp.
References carla::rpc::Actor::bounding_box, CarlaGetRelevantTagAsString(), carla::rpc::Actor::description, FindCarlaActor(), UBoundingBoxCalculator::GetActorBoundingBox(), ATagger::GetTagsOfTaggedActor(), FActorDescription::Id, carla::rpc::Actor::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 364 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 383 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 353 of file CarlaEpisode.h.
References CurrentMapOrigin.
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 378 of file CarlaEpisode.h.
References PedestriansCrossFactor.
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 385 of file CarlaEpisode.h.
References PedestriansNavRNG.
Referenced by FCarlaServer::FPimpl::BindActions().
|
inline |
Definition at line 339 of file CarlaEpisode.h.
References Recorder.
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 445 of file CarlaEpisode.h.
References ElapsedGameTime, GetElapsedGameTime(), carla::ros2::ROS2::GetInstance(), and SetVisualGameTime().
Referenced by FCarlaEngine::PlayPrimaryFrame().
|
inline |
Definition at line 125 of file CarlaEpisode.h.
References MaterialParameters, and VisualGameTime.
Referenced by CarlaReplayer::ProcessVisualTime(), SetTimers(), and TickTimers().
|
inline |
Spawns an actor based on ActorDescription at Transform.
To properly despawn an actor created with this function call DestroyActor.
Definition at line 255 of file CarlaEpisode.h.
References SpawnActor(), and SpawnActorWithInfo().
Referenced by FTrafficLightData::RespawnActor(), FTrafficSignData::RespawnActor(), and SpawnActor().
| 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 633 of file CarlaEpisode.cpp.
References ActorDispatcher, bIsPrimaryServer, ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), UActorDispatcher::DestroyActor(), EpisodeSettings, GetFrameData(), UCarlaStatics::GetLargeMapManager(), ACarlaRecorder::GetReplayer(), ALargeMapManager::GlobalToLocalTransform(), FActorDescription::Id, ACarlaRecorder::IsEnabled(), IsWalkerInsideBuilding(), Recorder, UActorDispatcher::SpawnActor(), FEpisodeSettings::TileStreamingDistance, FActorAttribute::Value, and FActorDescription::Variations.
Referenced by FCarlaServer::FPimpl::BindActions(), FFrameData::CreateOrReuseActor(), SpawnActor(), and CarlaReplayerHelper::TryToCreateReplayerActor().
| std::string UCarlaEpisode::StartRecorder | ( | std::string | name, |
| bool | AdditionalData, | ||
| bool | StopReplayer ) |
Definition at line 585 of file CarlaEpisode.cpp.
References MapName, Recorder, and ACarlaRecorder::Start().
Referenced by FCarlaServer::FPimpl::BindActions().
|
inlineprivate |
Definition at line 430 of file CarlaEpisode.h.
References ElapsedGameTime, GetElapsedGameTime(), carla::ros2::ROS2::GetInstance(), SetVisualGameTime(), and VisualGameTime.
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 74 of file CarlaEpisode.cpp.
References GNavBuildLock, GNavBuildPending, and GNavBuildSucceeded.
Referenced by FCarlaServer::FPimpl::BindActions(), and LoadNewOpendriveEpisode().
|
inline |
Definition at line 314 of file CarlaEpisode.h.
References ActorDispatcher.
Referenced by ALargeMapManager::ConvertDormantToActiveActors().
|
friend |
Definition at line 401 of file CarlaEpisode.h.
References AAutowareGameModeBase.
Referenced by AAutowareGameModeBase.
|
friend |
Definition at line 400 of file CarlaEpisode.h.
References ACarlaGameModeBase.
Referenced by ACarlaGameModeBase, and GetRecommendedSpawnPoints().
|
friend |
Definition at line 402 of file CarlaEpisode.h.
References EndPlay(), FCarlaEngine, InitializeAtBeginPlay(), and IsWalkerInsideBuilding().
Referenced by FCarlaEngine, and LoadNewEpisode().
|
private |
Definition at line 471 of file CarlaEpisode.h.
Referenced by DestroyActor(), FindCarlaActor(), FindCarlaActor(), FindCarlaActorFromStream(), GetActorDefinitions(), GetActorDescriptionFromStream(), GetActorRegistry(), GetActorRegistry(), InitializeAtBeginPlay(), PutActorToSleep(), RegisterActorFactory(), ReSpawnActorWithInfo(), SerializeActorWithPrimaryIds(), SpawnActorWithInfo(), UCarlaEpisode(), and WakeActorUp().
| bool UCarlaEpisode::bIsPrimaryServer = true |
Definition at line 396 of file CarlaEpisode.h.
Referenced by AttachActors(), AWalkerBase_IsMirror(), ACarlaGameModeBase::BeginPlay(), ASensor::BeginPlay(), FCarlaServer::FPimpl::BindActions(), CarlaGetActorAngularVelocityInRadians(), AVehicleStatusSensor::CollectAndStream(), DestroyActor(), ACarlaGameModeBase::InitGame(), LoadNewEpisode(), MarkSceneLightChanged(), FCarlaEngine::NotifyBeginEpisode(), UActorDispatcher::OnActorDestroyed(), SerializeActorWithPrimaryIds(), and SpawnActorWithInfo().
|
private |
Definition at line 486 of file CarlaEpisode.h.
Referenced by AttachActors(), GetCurrentMapOrigin(), and SetCurrentMapOrigin().
|
private |
Definition at line 459 of file CarlaEpisode.h.
Referenced by GetElapsedGameTime(), SetTimers(), and TickTimers().
|
private |
Definition at line 468 of file CarlaEpisode.h.
Referenced by ApplySettings(), GetSettings(), FCarlaEngine::NotifyBeginEpisode(), and SpawnActorWithInfo().
|
private |
Definition at line 492 of file CarlaEpisode.h.
Referenced by GetFrameData(), and UCarlaEpisode().
|
private |
Definition at line 456 of file CarlaEpisode.h.
Referenced by GetId(), and UCarlaEpisode().
|
private |
Definition at line 484 of file CarlaEpisode.h.
Referenced by GetGeoProjection(), AAutowareGameModeBase::LoadGeoReference(), and ACarlaGameModeBase::ParseOpenDrive().
|
private |
Definition at line 465 of file CarlaEpisode.h.
Referenced by GetMapName(), ACarlaGameModeBase::InitGame(), and StartRecorder().
|
private |
Definition at line 480 of file CarlaEpisode.h.
Referenced by InitializeAtBeginPlay(), and SetVisualGameTime().
|
private |
Definition at line 494 of file CarlaEpisode.h.
Referenced by GetMultiGpuWorldState(), and MarkSceneLightChanged().
|
private |
Definition at line 488 of file CarlaEpisode.h.
Referenced by DrawWalkerIsCrosser(), and SetPedestriansCrossFactor().
|
private |
Definition at line 490 of file CarlaEpisode.h.
Referenced by DrawWalkerIsCrosser(), and SetPedestriansSeed().
|
private |
Definition at line 482 of file CarlaEpisode.h.
Referenced by AttachActors(), DestroyActor(), EndPlay(), GetRecorder(), GetReplayer(), ReSpawnActorWithInfo(), SetRecorder(), SpawnActorWithInfo(), and StartRecorder().
|
private |
Definition at line 496 of file CarlaEpisode.h.
Referenced by GetSensorManager().
|
private |
Definition at line 474 of file CarlaEpisode.h.
Referenced by GetSpectatorPawn(), and InitializeAtBeginPlay().
|
private |
Definition at line 462 of file CarlaEpisode.h.
Referenced by GetVisualGameTime(), SetVisualGameTime(), and TickTimers().
|
private |
Definition at line 477 of file CarlaEpisode.h.
Referenced by ACarlaGameModeBase::BeginPlay(), GetWeather(), and ACarlaGameModeBase::InitGame().