CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CarlaReplayerHelper Class Reference

#include <CarlaReplayerHelper.h>

+ Collaboration diagram for CarlaReplayerHelper:

Public Member Functions

void ProcessReplayerAnimBiker (CarlaRecorderAnimBiker Biker)
 
void ProcessReplayerAnimVehicle (CarlaRecorderAnimVehicle Vehicle)
 
void ProcessReplayerAnimVehicleWheels (CarlaRecorderAnimWheels Vehicle)
 
void ProcessReplayerAnimWalker (CarlaRecorderAnimWalker Walker)
 
std::pair< int, uint32_t > ProcessReplayerEventAdd (FVector Location, FVector Rotation, CarlaRecorderActorDescription Description, uint32_t DesiredId, bool bIgnoreHero, bool bIgnoreSpectator, bool ReplaySensors)
 
bool ProcessReplayerEventDel (uint32_t DatabaseId)
 
bool ProcessReplayerEventParent (uint32_t ChildId, uint32_t ParentId)
 
bool ProcessReplayerFinish (bool bApplyAutopilot, bool bIgnoreHero, std::unordered_map< uint32_t, bool > &IsHero)
 
void ProcessReplayerLightScene (CarlaRecorderLightScene LightScene)
 
void ProcessReplayerLightVehicle (CarlaRecorderLightVehicle LightVehicle)
 
bool ProcessReplayerPosition (CarlaRecorderPosition Pos1, CarlaRecorderPosition Pos2, double Per, double DeltaTime)
 
bool ProcessReplayerStateTrafficLight (CarlaRecorderStateTrafficLight State)
 
void ProcessReplayerWalkerBones (const CarlaRecorderWalkerBones &Walker)
 
void RemoveStaticProps ()
 
void SetActorVelocity (FCarlaActor *CarlaActor, FVector Velocity)
 
bool SetCameraPosition (uint32_t Id, FVector Offset, FQuat Rotation)
 
void SetEpisode (UCarlaEpisode *ThisEpisode)
 
void SetWalkerSpeed (uint32_t ActorId, float Speed)
 

Private Member Functions

FCarlaActorFindTrafficLightAt (FVector Location)
 
bool SetActorAutopilot (FCarlaActor *CarlaActor, bool bEnabled, bool bKeepState=false)
 
bool SetActorSimulatePhysics (FCarlaActor *CarlaActor, bool bEnabled)
 
std::pair< int, FCarlaActor * > TryToCreateReplayerActor (FVector &Location, FVector &Rotation, FActorDescription &ActorDesc, uint32_t DesiredId, bool SpawnSensors)
 

Private Attributes

UCarlaEpisodeEpisode {nullptr}
 

Detailed Description

Definition at line 26 of file CarlaReplayerHelper.h.

Member Function Documentation

◆ FindTrafficLightAt()

FCarlaActor * CarlaReplayerHelper::FindTrafficLightAt ( FVector  Location)
private

Definition at line 110 of file CarlaReplayerHelper.cpp.

References FActorRegistry::begin(), FActorRegistry::end(), Episode, FCarlaActor::GetActorGlobalLocation(), UCarlaEpisode::GetActorRegistry(), FCarlaActor::GetActorType(), and FCarlaActor::TrafficLight.

Referenced by TryToCreateReplayerActor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerAnimBiker()

void CarlaReplayerHelper::ProcessReplayerAnimBiker ( CarlaRecorderAnimBiker  Biker)

Definition at line 459 of file CarlaReplayerHelper.cpp.

References CarlaRecorderAnimBiker::DatabaseId, CarlaRecorderAnimBiker::EngineRotation, Episode, UCarlaEpisode::FindCarlaActor(), CarlaRecorderAnimBiker::ForwardSpeed, FCarlaActor::GetActor(), ACarlaWheeledVehicle::SetRotationAnim(), and ACarlaWheeledVehicle::SetSpeedAnim().

Referenced by CarlaReplayer::ProcessAnimBiker(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerAnimVehicle()

void CarlaReplayerHelper::ProcessReplayerAnimVehicle ( CarlaRecorderAnimVehicle  Vehicle)

Definition at line 401 of file CarlaReplayerHelper.cpp.

References FCarlaActor::ApplyControlToVehicle(), CarlaRecorderAnimVehicle::bHandbrake, FVehicleControl::bHandBrake, FVehicleControl::bManualGearShift, CarlaRecorderAnimVehicle::Brake, FVehicleControl::Brake, FVehicleControl::bReverse, CarlaRecorderAnimVehicle::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), CarlaRecorderAnimVehicle::Gear, FVehicleControl::Gear, FVehicleControl::Steer, CarlaRecorderAnimVehicle::Steering, CarlaRecorderAnimVehicle::Throttle, and FVehicleControl::Throttle.

Referenced by CarlaReplayer::ProcessAnimVehicle(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerAnimVehicleWheels()

void CarlaReplayerHelper::ProcessReplayerAnimVehicleWheels ( CarlaRecorderAnimWheels  Vehicle)

Definition at line 328 of file CarlaReplayerHelper.cpp.

References CarlaRecorderAnimWheels::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorType(), WheelInfo::Location, WheelInfo::SteeringAngle, WheelInfo::TireRotation, FCarlaActor::Vehicle, and CarlaRecorderAnimWheels::WheelValues.

Referenced by CarlaReplayer::ProcessAnimVehicleWheels(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerAnimWalker()

void CarlaReplayerHelper::ProcessReplayerAnimWalker ( CarlaRecorderAnimWalker  Walker)

Definition at line 454 of file CarlaReplayerHelper.cpp.

References CarlaRecorderAnimWalker::DatabaseId, SetWalkerSpeed(), and CarlaRecorderAnimWalker::Speed.

Referenced by CarlaReplayer::ProcessAnimWalker(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerEventAdd()

std::pair< int, uint32_t > CarlaReplayerHelper::ProcessReplayerEventAdd ( FVector  Location,
FVector  Rotation,
CarlaRecorderActorDescription  Description,
uint32_t  DesiredId,
bool  bIgnoreHero,
bool  bIgnoreSpectator,
bool  ReplaySensors 
)

Definition at line 176 of file CarlaReplayerHelper.cpp.

References CarlaRecorderActorDescription::Attributes, Episode, CarlaRecorderActorDescription::Id, FActorDescription::Id, FActorAttribute::Id, SetActorAutopilot(), SetActorSimulatePhysics(), TryToCreateReplayerActor(), FActorAttribute::Type, FActorDescription::UId, CarlaRecorderActorDescription::UId, FActorAttribute::Value, FActorDescription::Variations, FCarlaActor::Vehicle, and FCarlaActor::Walker.

Referenced by CarlaReplayer::ProcessEventsAdd(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerEventDel()

bool CarlaReplayerHelper::ProcessReplayerEventDel ( uint32_t  DatabaseId)

Definition at line 249 of file CarlaReplayerHelper.cpp.

References UCarlaEpisode::DestroyActor(), Episode, UCarlaEpisode::FindCarlaActor(), and FCarlaActor::GetActorId().

Referenced by CarlaReplayer::ProcessEventsDel(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerEventParent()

bool CarlaReplayerHelper::ProcessReplayerEventParent ( uint32_t  ChildId,
uint32_t  ParentId 
)

Definition at line 263 of file CarlaReplayerHelper.cpp.

References FCarlaActor::AddChildren(), UCarlaEpisode::AttachActors(), Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActor(), FCarlaActor::GetActorId(), FCarlaActor::IsDormant(), UCarlaEpisode::PutActorToSleep(), carla::rpc::Rigid, FCarlaActor::SetAttachmentType(), and FCarlaActor::SetParent().

Referenced by CarlaReplayer::ProcessEventsParent(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerFinish()

bool CarlaReplayerHelper::ProcessReplayerFinish ( bool  bApplyAutopilot,
bool  bIgnoreHero,
std::unordered_map< uint32_t, bool > &  IsHero 
)

Definition at line 500 of file CarlaReplayerHelper.cpp.

References FCarlaActor::ApplyControlToVehicle(), FVehicleControl::bHandBrake, FVehicleControl::bManualGearShift, FVehicleControl::Brake, FVehicleControl::bReverse, Episode, FVehicleControl::Gear, FCarlaActor::GetActorId(), UCarlaEpisode::GetActorRegistry(), FCarlaActor::GetActorType(), SetActorSimulatePhysics(), SetActorVelocity(), SetWalkerSpeed(), FVehicleControl::Steer, FVehicleControl::Throttle, FCarlaActor::Vehicle, and FCarlaActor::Walker.

Referenced by SetEpisode(), and CarlaReplayer::Stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerLightScene()

void CarlaReplayerHelper::ProcessReplayerLightScene ( CarlaRecorderLightScene  LightScene)

Definition at line 431 of file CarlaReplayerHelper.cpp.

References CarlaRecorderLightScene::bOn, CarlaRecorderLightScene::Color, Episode, UCarlaLightSubsystem::GetLight(), CarlaRecorderLightScene::Intensity, CarlaRecorderLightScene::LightId, and CarlaRecorderLightScene::Type.

Referenced by CarlaReplayer::ProcessLightScene(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerLightVehicle()

void CarlaReplayerHelper::ProcessReplayerLightVehicle ( CarlaRecorderLightVehicle  LightVehicle)

Definition at line 420 of file CarlaReplayerHelper.cpp.

References CarlaRecorderLightVehicle::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::SetVehicleLightState(), and CarlaRecorderLightVehicle::State.

Referenced by CarlaReplayer::ProcessLightVehicle(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerPosition()

bool CarlaReplayerHelper::ProcessReplayerPosition ( CarlaRecorderPosition  Pos1,
CarlaRecorderPosition  Pos2,
double  Per,
double  DeltaTime 
)

Definition at line 299 of file CarlaReplayerHelper.cpp.

References CarlaRecorderPosition::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), CarlaRecorderPosition::Location, CarlaRecorderPosition::Rotation, and FCarlaActor::SetActorGlobalTransform().

Referenced by CarlaReplayer::InterpolatePosition(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerStateTrafficLight()

bool CarlaReplayerHelper::ProcessReplayerStateTrafficLight ( CarlaRecorderStateTrafficLight  State)

Definition at line 378 of file CarlaReplayerHelper.cpp.

References CarlaRecorderStateTrafficLight::DatabaseId, CarlaRecorderStateTrafficLight::ElapsedTime, Episode, UCarlaEpisode::FindCarlaActor(), UTrafficLightController::GetGroup(), FCarlaActor::GetTrafficLightController(), CarlaRecorderStateTrafficLight::IsFrozen, UTrafficLightController::SetElapsedTime(), ATrafficLightGroup::SetFrozenGroup(), FCarlaActor::SetTrafficLightState(), and CarlaRecorderStateTrafficLight::State.

Referenced by CarlaReplayer::ProcessStates(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessReplayerWalkerBones()

void CarlaReplayerHelper::ProcessReplayerWalkerBones ( const CarlaRecorderWalkerBones Walker)

Definition at line 472 of file CarlaReplayerHelper.cpp.

References AWalkerController::BlendPose(), CarlaRecorderWalkerBones::Bones, FWalkerBoneControlIn::BoneTransforms, CarlaRecorderWalkerBones::DatabaseId, Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActor(), and AWalkerController::SetBonesTransform().

Referenced by CarlaReplayer::ProcessWalkerBones(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveStaticProps()

void CarlaReplayerHelper::RemoveStaticProps ( )

Definition at line 565 of file CarlaReplayerHelper.cpp.

References Episode.

Referenced by CarlaReplayer::CheckPlayAfterMapLoaded(), CarlaReplayer::ReplayFile(), and SetEpisode().

+ Here is the caller graph for this function:

◆ SetActorAutopilot()

bool CarlaReplayerHelper::SetActorAutopilot ( FCarlaActor CarlaActor,
bool  bEnabled,
bool  bKeepState = false 
)
private

Definition at line 160 of file CarlaReplayerHelper.cpp.

References FCarlaActor::SetActorAutopilot(), and Success.

Referenced by ProcessReplayerEventAdd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActorSimulatePhysics()

bool CarlaReplayerHelper::SetActorSimulatePhysics ( FCarlaActor CarlaActor,
bool  bEnabled 
)
private

Definition at line 144 of file CarlaReplayerHelper.cpp.

References FCarlaActor::SetActorSimulatePhysics(), and Success.

Referenced by ProcessReplayerEventAdd(), and ProcessReplayerFinish().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetActorVelocity()

void CarlaReplayerHelper::SetActorVelocity ( FCarlaActor CarlaActor,
FVector  Velocity 
)

Definition at line 542 of file CarlaReplayerHelper.cpp.

References FCarlaActor::SetActorTargetVelocity().

Referenced by ProcessReplayerFinish(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCameraPosition()

bool CarlaReplayerHelper::SetCameraPosition ( uint32_t  Id,
FVector  Offset,
FQuat  Rotation 
)

Definition at line 352 of file CarlaReplayerHelper.cpp.

References Episode, UCarlaEpisode::FindCarlaActor(), FCarlaActor::GetActorGlobalTransform(), UCarlaEpisode::GetSpectatorPawn(), and FCarlaActor::SetActorGlobalTransform().

Referenced by SetEpisode(), and CarlaReplayer::UpdatePositions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetEpisode()

void CarlaReplayerHelper::SetEpisode ( UCarlaEpisode ThisEpisode)
inline

Definition at line 32 of file CarlaReplayerHelper.h.

References Episode, ProcessReplayerAnimBiker(), ProcessReplayerAnimVehicle(), ProcessReplayerAnimVehicleWheels(), ProcessReplayerAnimWalker(), ProcessReplayerEventAdd(), ProcessReplayerEventDel(), ProcessReplayerEventParent(), ProcessReplayerFinish(), ProcessReplayerLightScene(), ProcessReplayerLightVehicle(), ProcessReplayerPosition(), ProcessReplayerStateTrafficLight(), ProcessReplayerWalkerBones(), RemoveStaticProps(), SetActorVelocity(), SetCameraPosition(), SetWalkerSpeed(), State, and Vehicle.

Referenced by CarlaReplayer::SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWalkerSpeed()

void CarlaReplayerHelper::SetWalkerSpeed ( uint32_t  ActorId,
float  Speed 
)

Definition at line 552 of file CarlaReplayerHelper.cpp.

References FCarlaActor::ApplyControlToWalker(), Episode, UCarlaEpisode::FindCarlaActor(), and FWalkerControl::Speed.

Referenced by ProcessReplayerAnimWalker(), ProcessReplayerFinish(), and SetEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryToCreateReplayerActor()

std::pair< int, FCarlaActor * > CarlaReplayerHelper::TryToCreateReplayerActor ( FVector &  Location,
FVector &  Rotation,
FActorDescription ActorDesc,
uint32_t  DesiredId,
bool  SpawnSensors 
)
private

Definition at line 38 of file CarlaReplayerHelper.cpp.

References FActorRegistry::Contains(), Episode, UCarlaEpisode::FindCarlaActor(), FindTrafficLightAt(), UCarlaEpisode::GetActorRegistry(), UCarlaStatics::GetLargeMapManager(), FActorDescription::Id, ALargeMapManager::OnActorSpawned(), and UCarlaEpisode::SpawnActorWithInfo().

Referenced by ProcessReplayerEventAdd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ Episode

UCarlaEpisode* CarlaReplayerHelper::Episode {nullptr}
private

The documentation for this class was generated from the following files: