Add traces and update engine vars (#7778)

* Add traces and update engine vars

* Update Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp
This commit is contained in:
Blyron 2024-06-12 12:02:59 +02:00 committed by GitHub
parent 7fda50a8b7
commit 2e02d51082
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 14 additions and 1 deletions

View File

@ -54,6 +54,8 @@ r.RayTracing.UseTextureLod=True
r.PathTracing=False
r.Shadow.Virtual.Enable=1
r.RayTracing.Shadows.AvoidSelfIntersectionTraceDistance=6
r.ReflectionCaptureResolution=256
r.SkinCache.SceneMemoryLimitInMB=1024
[/Script/AIModule.AISense_Sight]
bAutoRegisterAllPawnsAsSources=False

View File

@ -373,6 +373,7 @@ void ACarlaGameModeBase::ApplyTextureToActor(
void ACarlaGameModeBase::Tick(float DeltaSeconds)
{
TRACE_CPUPROFILER_EVENT_SCOPE(ACarlaGameModeBase::Tick);
Super::Tick(DeltaSeconds);
/// @todo Recorder should not tick here, FCarlaEngine should do it.

View File

@ -20,6 +20,8 @@ void ASoilTypeManager::BeginPlay()
void ASoilTypeManager::Tick(float DeltaTime)
{
TRACE_CPUPROFILER_EVENT_SCOPE(ASoilTypeManager::Tick);
Super::Tick(DeltaTime);
#if WITH_EDITOR // Only for debugging purposes. Requires to activate tick in contructor
if((int)DeltaTime % 2000 == 0)
{

View File

@ -185,6 +185,7 @@ float AInertialMeasurementUnit::ComputeCompass()
void AInertialMeasurementUnit::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime)
{
TRACE_CPUPROFILER_EVENT_SCOPE(AInertialMeasurementUnit::PostPhysTick);
AccelerometerValue = ComputeAccelerometer(DeltaTime);
GyroscopeValue = ComputeGyroscope();
CompassValue = ComputeCompass();
@ -212,7 +213,7 @@ void AInertialMeasurementUnit::PostPhysTick(UWorld *World, ELevelTick TickType,
#endif
{
TRACE_CPUPROFILER_EVENT_SCOPE(AInertialMeasurementUnit::PostPhysTick);
TRACE_CPUPROFILER_EVENT_SCOPE(AInertialMeasurementUnit::SerializeAndSend);
DataStream.SerializeAndSend(*this, AccelerometerValue, GyroscopeValue, CompassValue);
}
}

View File

@ -29,6 +29,7 @@ AOpticalFlowCamera::AOpticalFlowCamera(const FObjectInitializer &ObjectInitializ
void AOpticalFlowCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
{
TRACE_CPUPROFILER_EVENT_SCOPE(AOpticalFlowCamera::PostPhysTick);
auto CVarForceOutputsVelocity = IConsoleManager::Get().FindConsoleVariable(TEXT("r.BasePassForceOutputsVelocity"));
int32 OldValue = CVarForceOutputsVelocity->GetInt();
CVarForceOutputsVelocity->Set(1);

View File

@ -720,6 +720,7 @@ void ASceneCaptureSensor::BeginPlay()
void ASceneCaptureSensor::PrePhysTick(float DeltaSeconds)
{
TRACE_CPUPROFILER_EVENT_SCOPE(ASceneCaptureSensor::PrePhysTick);
Super::PrePhysTick(DeltaSeconds);
// Add the view information every tick. It's only used for one tick and then
@ -732,6 +733,7 @@ void ASceneCaptureSensor::PrePhysTick(float DeltaSeconds)
void ASceneCaptureSensor::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime)
{
TRACE_CPUPROFILER_EVENT_SCOPE(ASceneCaptureSensor::PostPhysTick);
Super::PostPhysTick(World, TickType, DeltaTime);
EnqueueRenderSceneImmediate();
}

View File

@ -19,6 +19,7 @@ void FSensorManager::DeRegisterSensor(ASensor* Sensor)
void FSensorManager::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds)
{
TRACE_CPUPROFILER_EVENT_SCOPE(FSensorManager::PostPhysTick);
for(ASensor* Sensor : SensorList)
{
Sensor->PostPhysTickInternal(World, TickType, DeltaSeconds);

View File

@ -2742,11 +2742,13 @@ void FCarlaServer::RunSome(uint32 Milliseconds)
void FCarlaServer::Tick()
{
TRACE_CPUPROFILER_EVENT_SCOPE(FCarlaServer::Tick);
(void)Pimpl->TickCuesReceived.fetch_add(1, std::memory_order_release);
}
bool FCarlaServer::TickCueReceived()
{
TRACE_CPUPROFILER_EVENT_SCOPE(FCarlaServer::TickCueReceived);
auto k = Pimpl->TickCuesReceived.fetch_sub(1, std::memory_order_acquire);
bool flag = (k > 0);
if (!flag)

View File

@ -214,6 +214,7 @@ void ASensorSpawnerActor::AddSensorToSaveDataArray(AActor* Actor)
void ASensorSpawnerActor::Tick(float DeltaSeconds)
{
TRACE_CPUPROFILER_EVENT_SCOPE(ASensorSpawnerActor::Tick);
Super::Tick(DeltaSeconds);
if(bRecordingData)