From d59ceb7f63878f5e087ea802d603ba0fd282ff56 Mon Sep 17 00:00:00 2001 From: Rajat Singhal Date: Thu, 8 Oct 2020 08:16:30 +0530 Subject: [PATCH] Revert "Disable cameras after fetching images, projection matrix (#2881)" (#3064) Running the Image API continuously seems to trigger exceptions This reverts commit ba4be15 --- Unreal/Plugins/AirSim/Source/PIPCamera.cpp | 3 --- Unreal/Plugins/AirSim/Source/UnrealImageCapture.cpp | 4 ---- 2 files changed, 7 deletions(-) diff --git a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp index b87ad3749a..8e3adfc27b 100644 --- a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp +++ b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp @@ -170,9 +170,6 @@ msr::airlib::ProjectionMatrix APIPCamera::getProjectionMatrix(const APIPCamera:: else mat.setTo(Utils::nan()); - // Disable camera after our work is done - const_cast(this)->setCameraTypeEnabled(image_type, false); - return mat; } diff --git a/Unreal/Plugins/AirSim/Source/UnrealImageCapture.cpp b/Unreal/Plugins/AirSim/Source/UnrealImageCapture.cpp index 6b034f81df..da28a1795f 100644 --- a/Unreal/Plugins/AirSim/Source/UnrealImageCapture.cpp +++ b/Unreal/Plugins/AirSim/Source/UnrealImageCapture.cpp @@ -112,10 +112,6 @@ void UnrealImageCapture::getSceneCaptureImage(const std::vectorwidth; response.height = render_results[i]->height; response.image_type = request.image_type; - - // Disable camera after fetching images - APIPCamera* camera = cameras_->at(request.camera_name); - camera->setCameraTypeEnabled(request.image_type, false); } }