diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DVSCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DVSCamera.cpp index 17f3c75c9..6a5220c7d 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DVSCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DVSCamera.cpp @@ -136,7 +136,6 @@ void ADVSCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTim } /// Immediate enqueues render commands of the scene at the current time. - EnqueueRenderSceneImmediate(); WaitForRenderThreadToFinish(); //Super (ASceneCaptureSensor) Capture the Scene in a (UTextureRenderTarget2D) CaptureRenderTarge from the CaptureComponent2D diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DepthCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DepthCamera.cpp index 5291a1326..d40b985f0 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DepthCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/DepthCamera.cpp @@ -34,7 +34,6 @@ void ADepthCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaS { TRACE_CPUPROFILER_EVENT_SCOPE(ADepthCamera::PostPhysTick); - EnqueueRenderSceneImmediate(); ImageUtil::ReadSensorImageDataAsyncFColor(*this, [this]( TArrayView Pixels, FIntPoint Size) -> bool diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/InstanceSegmentationCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/InstanceSegmentationCamera.cpp index 166258c14..35d6031c0 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/InstanceSegmentationCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/InstanceSegmentationCamera.cpp @@ -63,7 +63,6 @@ void AInstanceSegmentationCamera::PostPhysTick(UWorld *World, ELevelTick TickTyp SceneCapture->ShowOnlyComponents.Emplace(Component); } - EnqueueRenderSceneImmediate(); ImageUtil::ReadSensorImageDataAsyncFColor(*this, [this]( TArrayView Pixels, FIntPoint Size) -> bool diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/NormalsCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/NormalsCamera.cpp index 6e64dc091..c058dd310 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/NormalsCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/NormalsCamera.cpp @@ -28,7 +28,6 @@ void ANormalsCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float Delt { TRACE_CPUPROFILER_EVENT_SCOPE(ANormalsCamera::PostPhysTick); - EnqueueRenderSceneImmediate(); ImageUtil::ReadSensorImageDataAsyncFColor(*this, [this]( TArrayView Pixels, FIntPoint Size) -> bool diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureCamera.cpp index 1e2e37b8c..f708d1e73 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureCamera.cpp @@ -63,7 +63,6 @@ void ASceneCaptureCamera::PostPhysTick(UWorld *World, ELevelTick TickType, float } ); - EnqueueRenderSceneImmediate(); ImageUtil::ReadSensorImageDataAsyncFColor(*this, [this]( TArrayView Pixels, FIntPoint Size) -> bool diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp index 90ee5072f..6e54d8521 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp @@ -516,6 +516,7 @@ void ASceneCaptureSensor::PrePhysTick(float DeltaSeconds) void ASceneCaptureSensor::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime) { Super::PostPhysTick(World, TickType, DeltaTime); + EnqueueRenderSceneImmediate(); } void ASceneCaptureSensor::EndPlay(const EEndPlayReason::Type EndPlayReason) diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SemanticSegmentationCamera.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SemanticSegmentationCamera.cpp index c99407ba4..aef1ded68 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SemanticSegmentationCamera.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Sensor/SemanticSegmentationCamera.cpp @@ -28,7 +28,6 @@ void ASemanticSegmentationCamera::PostPhysTick(UWorld *World, ELevelTick TickTyp { TRACE_CPUPROFILER_EVENT_SCOPE(ASemanticSegmentationCamera::PostPhysTick); - EnqueueRenderSceneImmediate(); ImageUtil::ReadSensorImageDataAsyncFColor(*this, [this]( TArrayView Pixels, FIntPoint Size) -> bool diff --git a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Util/SensorSpawnerActor.cpp b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Util/SensorSpawnerActor.cpp index f4b011f02..a6a9742e4 100644 --- a/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Util/SensorSpawnerActor.cpp +++ b/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Util/SensorSpawnerActor.cpp @@ -234,7 +234,7 @@ void ASensorSpawnerActor::SaveSensorData(float DeltaSeconds) if(ASceneCaptureSensor* CaptureSensor = Cast(CurrentSensor)) { const FString FinalPath = FPaths::Combine(SaveImagePath, CaptureSensor->GetName(), FString::Printf(TEXT("%lld"), FDateTime::Now().ToUnixTimestamp()) + "-Frame_" + FrameNumber + ".png"); - CaptureSensor->EnqueueRenderSceneImmediate(); + // CaptureSensor->EnqueueRenderSceneImmediate(); CaptureSensor->SaveCaptureToDisk(FinalPath); continue; }