#include <CarlaReplayerHelper.h>
Private Member Functions | |
FCarlaActor * | FindTrafficLightAt (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 | |
UCarlaEpisode * | Episode {nullptr} |
Definition at line 26 of file CarlaReplayerHelper.h.
|
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
void CarlaReplayerHelper::RemoveStaticProps | ( | ) |
Definition at line 565 of file CarlaReplayerHelper.cpp.
References Episode.
Referenced by CarlaReplayer::CheckPlayAfterMapLoaded(), CarlaReplayer::ReplayFile(), and SetEpisode().
|
private |
Definition at line 160 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorAutopilot(), and Success.
Referenced by ProcessReplayerEventAdd().
|
private |
Definition at line 144 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorSimulatePhysics(), and Success.
Referenced by ProcessReplayerEventAdd(), and ProcessReplayerFinish().
void CarlaReplayerHelper::SetActorVelocity | ( | FCarlaActor * | CarlaActor, |
FVector | Velocity | ||
) |
Definition at line 542 of file CarlaReplayerHelper.cpp.
References FCarlaActor::SetActorTargetVelocity().
Referenced by ProcessReplayerFinish(), and SetEpisode().
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().
|
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().
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().
|
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().
|
private |
Definition at line 96 of file CarlaReplayerHelper.h.
Referenced by FindTrafficLightAt(), ProcessReplayerAnimBiker(), ProcessReplayerAnimVehicle(), ProcessReplayerAnimVehicleWheels(), ProcessReplayerEventAdd(), ProcessReplayerEventDel(), ProcessReplayerEventParent(), ProcessReplayerFinish(), ProcessReplayerLightScene(), ProcessReplayerLightVehicle(), ProcessReplayerPosition(), ProcessReplayerStateTrafficLight(), ProcessReplayerWalkerBones(), RemoveStaticProps(), SetCameraPosition(), SetEpisode(), SetWalkerSpeed(), and TryToCreateReplayerActor().