A simulation episode. 更多...
#include <CarlaEpisode.h>
Public 成员函数 | |
void | ApplySettings (const FEpisodeSettings &Settings) |
void | AttachActors (AActor *Child, AActor *Parent, EAttachmentType InAttachmentType=EAttachmentType::Rigid, const FString &SocketName="") |
Attach Child to Parent. | |
bool | DestroyActor (AActor *Actor) |
bool | DestroyActor (carla::rpc::ActorId ActorId) |
FCarlaActor * | FindCarlaActor (AActor *Actor) const |
Find the actor view of Actor. | |
FCarlaActor * | FindCarlaActor (FCarlaActor::IdType ActorId) |
Find a Carla actor by id. | |
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::GeoLocation & | GetGeoReference () const |
Return the GeoLocation point of the map loaded | |
auto | GetId () const |
Return the unique id of this episode. | |
const FString & | GetMapName () const |
Return the name of the map loaded in this episode. | |
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 | 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. | |
void | SetCurrentMapOrigin (const FIntVector &NewOrigin) |
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) |
UCarlaEpisode (const FObjectInitializer &ObjectInitializer) | |
void | WakeActorUp (carla::rpc::ActorId ActorId) |
Public 属性 | |
bool | bIsPrimaryServer = true |
Private 成员函数 | |
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 | TickTimers (float DeltaSeconds) |
std::pair< int, FCarlaActor & > | TryToCreateReplayerActor (FVector &Location, FVector &Rotation, FActorDescription &ActorDesc, unsigned int desiredId) |
Private 属性 | |
UActorDispatcher * | ActorDispatcher = nullptr |
FIntVector | CurrentMapOrigin |
double | ElapsedGameTime = 0.0 |
FEpisodeSettings | EpisodeSettings |
FFrameData | FrameData |
const uint64 | Id = 0u |
carla::geom::GeoLocation | MapGeoReference |
FString | MapName |
UMaterialParameterCollectionInstance * | MaterialParameters = nullptr |
ACarlaRecorder * | Recorder = nullptr |
FSensorManager | SensorManager |
APawn * | Spectator = nullptr |
double | VisualGameTime = 0.0 |
AWeather * | Weather = nullptr |
友元 | |
class | ACarlaGameModeBase |
class | FCarlaEngine |
A simulation episode.
Each time the level is restarted a new episode is created.
在文件 CarlaEpisode.h 第 38 行定义.
UCarlaEpisode::UCarlaEpisode | ( | const FObjectInitializer & | ObjectInitializer | ) |
void UCarlaEpisode::ApplySettings | ( | const FEpisodeSettings & | Settings | ) |
在文件 CarlaEpisode.cpp 第 230 行定义.
引用了 FEpisodeSettings::ActorActiveDistance, EpisodeSettings, FCarlaStaticDelegates::OnEpisodeSettingsChange , 以及 FEpisodeSettings::TileStreamingDistance.
被这些函数引用 FCarlaServer::FPimpl::BindActions(), LoadNewEpisode(), FCarlaEngine::NotifyBeginEpisode() , 以及 FCarlaEngine::OnPreTick().
void UCarlaEpisode::AttachActors | ( | AActor * | Child, |
AActor * | Parent, | ||
EAttachmentType | InAttachmentType = EAttachmentType::Rigid, | ||
const FString & | SocketName = "" ) |
Attach Child to Parent.
在文件 CarlaEpisode.cpp 第 294 行定义.
引用了 FFrameData::AddEvent(), ACarlaRecorder::AddEvent(), UActorAttacher::AttachActors(), bIsPrimaryServer, CurrentMapOrigin, FindCarlaActor(), FCarlaActor::GetActorId(), GetFrameData(), ACarlaRecorder::IsEnabled() , 以及 Recorder.
被这些函数引用 FCarlaServer::FPimpl::BindActions(), FFrameData::ProcessReplayerEventParent(), CarlaReplayerHelper::ProcessReplayerEventParent() , 以及 FActorRegistry::WakeActorUp().
|
inline |
在文件 CarlaEpisode.h 第 253 行定义.
引用了 FCarlaActor::GetActorId().
被这些函数引用 FCarlaServer::FPimpl::BindActions(), FFrameData::ProcessReplayerEventDel() , 以及 CarlaReplayerHelper::ProcessReplayerEventDel().
|
inline |
在文件 CarlaEpisode.h 第 264 行定义.
|
private |
在文件 CarlaEpisode.cpp 第 406 行定义.
引用了 ACarlaRecorder::GetReplayer(), CarlaReplayer::IsEnabled(), Recorder, CarlaReplayer::Stop() , 以及 ACarlaRecorder::Stop().
被这些函数引用 ACarlaGameModeBase::EndPlay().
|
inline |
Find the actor view of Actor.
If the actor is not found or is pending kill, the returned view is invalid.
在文件 CarlaEpisode.h 第 182 行定义.
|
inline |
Find a Carla actor by id.
If the actor is not found or is pending kill, the returned view is invalid.
在文件 CarlaEpisode.h 第 173 行定义.
被这些函数引用 AttachActors(), FCarlaServer::FPimpl::BindActions(), ALargeMapManager::CheckActiveActors(), ALargeMapManager::CheckDormantActors(), ALargeMapManager::ConvertDormantToActiveActors(), FFrameData::CreateOrReuseActor(), ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), CaService::GetStationType(), ALargeMapManager::OnActorDestroyed(), FFrameData::ProcessReplayerAnimBiker(), CarlaReplayerHelper::ProcessReplayerAnimBiker(), FFrameData::ProcessReplayerAnimVehicle(), CarlaReplayerHelper::ProcessReplayerAnimVehicle(), FFrameData::ProcessReplayerAnimVehicleWheels(), CarlaReplayerHelper::ProcessReplayerAnimVehicleWheels(), CarlaReplayerHelper::ProcessReplayerDoorVehicle(), FFrameData::ProcessReplayerEventDel(), CarlaReplayerHelper::ProcessReplayerEventDel(), FFrameData::ProcessReplayerEventParent(), CarlaReplayerHelper::ProcessReplayerEventParent(), FFrameData::ProcessReplayerLightVehicle(), CarlaReplayerHelper::ProcessReplayerLightVehicle(), FFrameData::ProcessReplayerPosition(), CarlaReplayerHelper::ProcessReplayerPosition(), FFrameData::ProcessReplayerStateTrafficLight(), CarlaReplayerHelper::ProcessReplayerStateTrafficLight(), CarlaReplayerHelper::ProcessReplayerWalkerBones(), SerializeActor(), FFrameData::SetCameraPosition(), CarlaReplayerHelper::SetCameraPosition(), ACustomV2XSensor::SetOwner(), CaService::SetOwner(), FFrameData::SetWalkerSpeed(), CarlaReplayerHelper::SetWalkerSpeed() , 以及 CarlaReplayerHelper::TryToCreateReplayerActor().
|
inline |
Return the list of actor definitions that are available to be spawned this episode.
在文件 CarlaEpisode.h 第 124 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions() , 以及 InitializeAtBeginPlay().
|
inline |
Get the description of the Carla actor (sensor) using specific stream id.
If the actor is not found returns an empty string
在文件 CarlaEpisode.h 第 190 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions().
|
inline |
在文件 CarlaEpisode.h 第 160 行定义.
|
inline |
在文件 CarlaEpisode.h 第 155 行定义.
被这些函数引用 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::CreateOrReuseActor(), FFrameData::FindTrafficLightAt(), CarlaReplayerHelper::FindTrafficLightAt(), FWorldObserver_Serialize(), FFrameData::GetFrameData(), PathLossModel::GetLocationIfVehicle(), PathLossModel::IsVehicle(), ALargeMapManager::OnActorSpawned(), ACustomV2XSensor::PostPhysTick(), AV2XSensor::PostPhysTick(), FFrameData::ProcessReplayerFinish(), CarlaReplayerHelper::ProcessReplayerFinish(), ALargeMapManager::RegisterInitialObjects(), PathLossModel::Simulate(), ACarlaRecorder::Ticking() , 以及 CarlaReplayerHelper::TryToCreateReplayerActor().
|
inline |
在文件 CarlaEpisode.h 第 323 行定义.
被这些函数引用 FWorldObserver_Serialize(), FActorData::GetLocalTransform() , 以及 FActorData::RecordActorData().
|
inline |
Game seconds since the start of this episode.
在文件 CarlaEpisode.h 第 99 行定义.
被这些函数引用 CaService::AddCooperativeAwarenessMessage(), FWorldObserver::BroadcastTick(), CaService::SetOwner() , 以及 CaService::Trigger().
|
inline |
在文件 CarlaEpisode.h 第 327 行定义.
被这些函数引用 AttachActors(), FCarlaEngine::NotifyInitGame(), FCarlaEngine::OnPostTick() , 以及 SpawnActorWithInfo().
|
inline |
Return the GeoLocation point of the map loaded
在文件 CarlaEpisode.h 第 134 行定义.
被这些函数引用 AGnssSensor::BeginPlay() , 以及 CaService::SetOwner().
|
inline |
Return the unique id of this episode.
在文件 CarlaEpisode.h 第 86 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions() , 以及 FWorldObserver_Serialize().
|
inline |
Return the name of the map loaded in this episode.
在文件 CarlaEpisode.h 第 93 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions(), LoadNewEpisode(), FCarlaServer::NotifyBeginEpisode() , 以及 CarlaReplayer::ReplayFile().
TArray< FTransform > UCarlaEpisode::GetRecommendedSpawnPoints | ( | ) | const |
Return the list of recommended spawn points for vehicles.
在文件 CarlaEpisode.cpp 第 241 行定义.
引用了 UCarlaStatics::GetGameMode() , 以及 ACarlaGameModeBase::GetSpawnPointsTransforms().
被这些函数引用 FCarlaServer::FPimpl::BindActions().
|
inline |
在文件 CarlaEpisode.h 第 306 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions() , 以及 FCarlaEngine::OnPostTick().
|
inline |
|
inline |
在文件 CarlaEpisode.h 第 329 行定义.
被这些函数引用 ASensor::BeginPlay(), ASensor::EndPlay() , 以及 FCarlaEngine::OnPostTick().
|
inline |
在文件 CarlaEpisode.h 第 73 行定义.
被这些函数引用 ACarlaGameModeBase::BeginPlay() , 以及 FCarlaServer::FPimpl::BindActions().
|
inline |
在文件 CarlaEpisode.h 第 144 行定义.
被这些函数引用 FCarlaServer::FPimpl::BindActions(), FFrameData::SetCameraPosition() , 以及 CarlaReplayerHelper::SetCameraPosition().
|
inline |
|
inline |
在文件 CarlaEpisode.h 第 150 行定义.
被这些函数引用 ASceneCaptureSensor::BeginPlay() , 以及 FCarlaServer::FPimpl::BindActions().
|
private |
在文件 CarlaEpisode.cpp 第 323 行定义.
引用了 ActorDispatcher, FActorDescription::Class, Float, GetActorDefinitions(), FActorDescription::Id, MaterialParameters, UActorDispatcher::RegisterActor(), Spectator, String, UCarlaEpisode_GetTrafficSignId(), FActorDescription::UId , 以及 FActorDescription::Variations.
被这些函数引用 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.
在文件 CarlaEpisode.cpp 第 64 行定义.
引用了 ApplySettings(), bIsPrimaryServer, UCarlaGameInstance::GetCarlaEngine(), UCarlaStatics::GetGameInstance(), GetMapName(), FCarlaEngine::GetSecondaryServer() , 以及 LoadNewEpisode().
被这些函数引用 FCarlaServer::FPimpl::BindActions(), LoadNewEpisode() , 以及 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.
在文件 CarlaEpisode.cpp 第 147 行定义.
引用了 BuildRecastBuilderFile(), carla::rpc::OpendriveGenerationParameters::enable_pedestrian_navigation, UCarlaStatics::GetGameInstance(), carla::opendrive::OpenDriveParser::Load(), carla::log_warning(), UCarlaGameInstance::SetOpendriveGenerationParameters() , 以及 carla::rpc::OpendriveGenerationParameters::vertex_distance.
被这些函数引用 FCarlaServer::FPimpl::BindActions().
|
inline |
|
inlineprivate |
|
inline |
Spawns an actor based on ActorDescription at Transform.
在文件 CarlaEpisode.h 第 213 行定义.
被这些函数引用 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
在文件 CarlaEpisode.cpp 第 267 行定义.
引用了 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 , 以及 SerializeActor().
carla::rpc::Actor UCarlaEpisode::SerializeActor | ( | FCarlaActor * | CarlaActor | ) | const |
Create a serializable object describing the actor.
在文件 CarlaEpisode.cpp 第 248 行定义.
引用了 FCarlaActor::GetActorInfo(), FCarlaActor::GetParent() , 以及 FActorInfo::SerializedData.
被这些函数引用 FCarlaServer::FPimpl::BindActions(), AObstacleDetectionSensor::OnObstacleDetectionEvent() , 以及 SerializeActor().
|
private |
|
private |
|
private |
|
inline |
|
inline |
在文件 CarlaEpisode.h 第 311 行定义.
被这些函数引用 ACarlaGameModeBase::InitGame() , 以及 FCarlaEngine::NotifyBeginEpisode().
|
inline |
|
inline |
Spawns an actor based on ActorDescription at Transform.
To properly despawn an actor created with this function call DestroyActor.
在文件 CarlaEpisode.h 第 234 行定义.
被这些函数引用 FTrafficSignData::RespawnActor() , 以及 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.
在文件 CarlaEpisode.cpp 第 435 行定义.
引用了 ActorDispatcher, bIsPrimaryServer, ACarlaRecorder::CreateRecorderEventAdd(), FFrameData::CreateRecorderEventAdd(), GetFrameData(), UCarlaStatics::GetLargeMapManager(), ALargeMapManager::GlobalToLocalTransform(), ACarlaRecorder::IsEnabled(), Recorder , 以及 UActorDispatcher::SpawnActor().
被这些函数引用 FCarlaServer::FPimpl::BindActions(), FFrameData::CreateOrReuseActor() , 以及 CarlaReplayerHelper::TryToCreateReplayerActor().
std::string UCarlaEpisode::StartRecorder | ( | std::string | name, |
bool | AdditionalData ) |
在文件 CarlaEpisode.cpp 第 419 行定义.
引用了 MapName, Recorder , 以及 ACarlaRecorder::Start().
被这些函数引用 FCarlaServer::FPimpl::BindActions().
|
inlineprivate |
在文件 CarlaEpisode.h 第 359 行定义.
引用了 carla::ros2::ROS2::GetInstance().
被这些函数引用 FCarlaEngine::OnPreTick().
|
private |
|
inline |
在文件 CarlaEpisode.h 第 286 行定义.
被这些函数引用 ALargeMapManager::ConvertDormantToActiveActors().
|
friend |
在文件 CarlaEpisode.h 第 335 行定义.
|
friend |
在文件 CarlaEpisode.h 第 336 行定义.
|
private |
在文件 CarlaEpisode.h 第 386 行定义.
被这些函数引用 InitializeAtBeginPlay(), SpawnActorWithInfo() , 以及 UCarlaEpisode().
bool UCarlaEpisode::bIsPrimaryServer = true |
在文件 CarlaEpisode.h 第 331 行定义.
被这些函数引用 AttachActors(), LoadNewEpisode(), FCarlaEngine::NotifyBeginEpisode() , 以及 SpawnActorWithInfo().
|
private |
在文件 CarlaEpisode.h 第 401 行定义.
被这些函数引用 AttachActors().
|
private |
在文件 CarlaEpisode.h 第 374 行定义.
|
private |
在文件 CarlaEpisode.h 第 383 行定义.
被这些函数引用 ApplySettings() , 以及 FCarlaEngine::NotifyBeginEpisode().
|
private |
在文件 CarlaEpisode.h 第 403 行定义.
被这些函数引用 UCarlaEpisode().
|
private |
在文件 CarlaEpisode.h 第 371 行定义.
|
private |
在文件 CarlaEpisode.h 第 399 行定义.
被这些函数引用 ACarlaGameModeBase::ParseOpenDrive().
|
private |
在文件 CarlaEpisode.h 第 380 行定义.
被这些函数引用 ACarlaGameModeBase::InitGame() , 以及 StartRecorder().
|
private |
在文件 CarlaEpisode.h 第 395 行定义.
被这些函数引用 InitializeAtBeginPlay().
|
private |
在文件 CarlaEpisode.h 第 397 行定义.
被这些函数引用 AttachActors(), EndPlay(), SpawnActorWithInfo() , 以及 StartRecorder().
|
private |
在文件 CarlaEpisode.h 第 405 行定义.
|
private |
在文件 CarlaEpisode.h 第 389 行定义.
被这些函数引用 InitializeAtBeginPlay().
|
private |
在文件 CarlaEpisode.h 第 377 行定义.
|
private |
在文件 CarlaEpisode.h 第 392 行定义.
被这些函数引用 ACarlaGameModeBase::BeginPlay() , 以及 ACarlaGameModeBase::InitGame().