From a152863b11be7fca7357c8d081d9fac8cff658d2 Mon Sep 17 00:00:00 2001 From: Marcel Pi Date: Tue, 29 Nov 2022 11:24:26 +0100 Subject: [PATCH] Merge GBuffer features. (#5960) * Add Misc/GBuffer * Add EnqueueRenderSceneImmediateWithGBuffer. * Modified ASceneCaptureSensor to allow gbuffer recording. * Minor GBuffer progress. * More GBuffer changes. * Removed unnecessary files. * Add FRHITexture* functions to FPixelReader + temporarily disabled non-gbuffer rendering in ASceneCaptureSensor. * Add missing FPixelReader functions. * Minor changes (Switching to Windows). * Remove FRHITexture functions from FPixelReader, added the file ImageUtil. * Remove FRHITexture functions from FPixelReader, added the file ImageUtil. (2) * Added API to listen GBuffer data. * Added gbuffer serializer classes * Temporarily remove ViewRect hack. * Add USceneCaptureComponent* derived classes. * Disable USceneCaptureComponent*_CARLA and add initial FRHIGPUTextureReadBack-based code. * Fix and re-enable custom SceneCaptureComponents. * Fully switch to FRHIGPUTextureReadback. * Remove unnecessary call to FlushRenderingCommands. * Minor API changes. * Add support for PF_DepthStencil in ImageUtil. * More API progress... * More API progress... (2) * Removed testing code. * Minor changes for testing. * GBuffer API fixes. * Improve GBuffer capture code. * Fixed SceneDepth transfer issues and added SceneStencil, CustomDepth and CustomStencil to the GBuffer capture. * Fix compilation error due to the usage of C++17 features. * Removed major memory leak and added manual_control_gbuffer.py. * Fixed a silly mistake. * Minor changes to manual_control_gbuffer and SceneCaptureSensor. * Fix compilation error on some versions of Ubuntu. * Disable TAA when reading GBuffers to avoid jitter. * Improve memory usage. * Progress towards automatically detecting when a GBuffer stream is unused. * Fix includes in SceneCaptureSensor + minor change in manual_control_gbuffer.py * Progress on automatically detecting which GBuffers aren't needed. * Remove unneeded __declspec. * Revert ASensor changes + fix tutorial_gbuffer.py * Update CHANGELOG.md * Apply requested changes for the PR, add gitignore for the file OptionalModules.ini and add a GBufferTextureID enum to the Python API. * Remove OptionalModules.ini. * Fix indentation. * Fix indentation (2). * Fix indentation (3). * Add documentation and more indentation fixes. * Remove commented includes. * Add missing line break. * Fix memory leak + remove unneeded files. * Add .uproject again, fix EngineAssociation. * Remove unneeded ENQUEUE_RENDER_COMMAND. * Fix manual_control_gbuffer.py. * Add `stop_gbuffer` to the Python API. * Minor fixes. * Fix performance bug. Previously, when a client requested a gbuffer that is unused it would stay open, even after stopping it explicitly. This commit fixes this issue. * Fix indentation. * Add missing braces, more indentation fixes and simplify some of the code. * Update sensor.yml docs. * Update docs. * Remove unnecessary UE_Log + changed one verbosity level. Co-authored-by: Axel Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com> --- CHANGELOG.md | 2 + Docs/bp_library.md | 421 +++-- Docs/python_api.md | 816 +++++----- .../source/carla/client/ServerSideSensor.cpp | 32 +- .../source/carla/client/ServerSideSensor.h | 16 +- .../source/carla/client/detail/Client.cpp | 21 + LibCarla/source/carla/client/detail/Client.h | 9 + .../source/carla/client/detail/Simulator.cpp | 21 +- .../source/carla/client/detail/Simulator.h | 11 +- LibCarla/source/carla/sensor/SensorRegistry.h | 8 +- LibCarla/source/carla/sensor/data/Image.h | 3 + LibCarla/source/carla/sensor/data/ImageTmpl.h | 4 + .../sensor/s11n/GBufferFloatSerializer.cpp | 22 + .../sensor/s11n/GBufferFloatSerializer.h | 62 + .../sensor/s11n/GBufferUint8Serializer.cpp | 22 + .../sensor/s11n/GBufferUint8Serializer.h | 62 + PythonAPI/carla/source/libcarla/Sensor.cpp | 9 + .../carla/source/libcarla/SensorData.cpp | 18 + PythonAPI/docs/sensor.yml | 23 + PythonAPI/docs/sensor_data.yml | 67 + PythonAPI/examples/manual_control_gbuffer.py | 1422 +++++++++++++++++ PythonAPI/examples/tutorial_gbuffer.py | 127 ++ Unreal/CarlaUE4/Config/.gitignore | 1 + .../Plugins/Carla/Source/Carla/Carla.Build.cs | 1 + .../Carla/Source/Carla/Sensor/ImageUtil.cpp | 146 ++ .../Carla/Source/Carla/Sensor/ImageUtil.h | 33 + .../Carla/Source/Carla/Sensor/PixelReader.h | 2 - .../Carla/Sensor/SceneCaptureCamera.cpp | 21 +- .../Source/Carla/Sensor/SceneCaptureCamera.h | 2 + .../Carla/Sensor/SceneCaptureSensor.cpp | 114 +- .../Source/Carla/Sensor/SceneCaptureSensor.h | 230 ++- .../Carla/Source/Carla/Sensor/Sensor.h | 12 +- .../Source/Carla/Sensor/SensorFactory.cpp | 18 + .../SceneCaptureComponent2D_CARLA.cpp | 19 + .../SceneCaptureComponent2D_CARLA.h | 26 + .../SceneCaptureComponentCube_CARLA.cpp | 19 + .../SceneCaptureComponentCube_CARLA.h | 26 + .../SceneCaptureComponent_CARLA.cpp | 19 + .../SceneCaptureComponent_CARLA.h | 26 + .../Carla/Source/Carla/Server/CarlaServer.cpp | 103 +- .../Carla/Traffic/TrafficLightManager.cpp | 1 + .../Carla/Traffic/TrafficLightManager.h | 1 + 42 files changed, 3428 insertions(+), 590 deletions(-) create mode 100644 LibCarla/source/carla/sensor/s11n/GBufferFloatSerializer.cpp create mode 100644 LibCarla/source/carla/sensor/s11n/GBufferFloatSerializer.h create mode 100644 LibCarla/source/carla/sensor/s11n/GBufferUint8Serializer.cpp create mode 100644 LibCarla/source/carla/sensor/s11n/GBufferUint8Serializer.h create mode 100644 PythonAPI/examples/manual_control_gbuffer.py create mode 100644 PythonAPI/examples/tutorial_gbuffer.py create mode 100644 Unreal/CarlaUE4/Config/.gitignore create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/ImageUtil.cpp create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/ImageUtil.h create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponent2D_CARLA.cpp create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponent2D_CARLA.h create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponentCube_CARLA.cpp create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponentCube_CARLA.h create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponent_CARLA.cpp create mode 100644 Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/UE4_Overridden/SceneCaptureComponent_CARLA.h diff --git a/CHANGELOG.md b/CHANGELOG.md index e8522070e..f75f1adce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,8 @@ * Added post process effects for rainy and dusty weathers. * Switched data type of the dust storm weather parameter from bool to float. * Check for the version of the installed Clang compiler during build. + * Added API function to get direct access to the GBuffer textures of a sensor: + - `listen_to_gbuffer`: to set a callback for a specific GBuffer texture ## CARLA 0.9.13 diff --git a/Docs/bp_library.md b/Docs/bp_library.md index 2f210266d..416b5aa7f 100755 --- a/Docs/bp_library.md +++ b/Docs/bp_library.md @@ -83,6 +83,32 @@ Check out the [introduction to blueprints](core_actors.md). - `toe` (_Float_) _- Modifiable_ - `use_log` (_Bool_) _- Modifiable_ - `white_clip` (_Float_) _- Modifiable_ +- **sensor.camera.instance_segmentation** + - **Attributes:** + - `fov` (_Float_) _- Modifiable_ + - `image_size_x` (_Int_) _- Modifiable_ + - `image_size_y` (_Int_) _- Modifiable_ + - `lens_circle_falloff` (_Float_) _- Modifiable_ + - `lens_circle_multiplier` (_Float_) _- Modifiable_ + - `lens_k` (_Float_) _- Modifiable_ + - `lens_kcube` (_Float_) _- Modifiable_ + - `lens_x_size` (_Float_) _- Modifiable_ + - `lens_y_size` (_Float_) _- Modifiable_ + - `role_name` (_String_) _- Modifiable_ + - `sensor_tick` (_Float_) _- Modifiable_ +- **sensor.camera.normals** + - **Attributes:** + - `fov` (_Float_) _- Modifiable_ + - `image_size_x` (_Int_) _- Modifiable_ + - `image_size_y` (_Int_) _- Modifiable_ + - `lens_circle_falloff` (_Float_) _- Modifiable_ + - `lens_circle_multiplier` (_Float_) _- Modifiable_ + - `lens_k` (_Float_) _- Modifiable_ + - `lens_kcube` (_Float_) _- Modifiable_ + - `lens_x_size` (_Float_) _- Modifiable_ + - `lens_y_size` (_Float_) _- Modifiable_ + - `role_name` (_String_) _- Modifiable_ + - `sensor_tick` (_Float_) _- Modifiable_ - **sensor.camera.optical_flow** - **Attributes:** - `fov` (_Float_) _- Modifiable_ @@ -306,6 +332,10 @@ Check out the [introduction to blueprints](core_actors.md). - **Attributes:** - `role_name` (_String_) _- Modifiable_ - `size` (_String_) +- **static.prop.busstoplb** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) - **static.prop.calibrator** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -366,6 +396,10 @@ Check out the [introduction to blueprints](core_actors.md). - **Attributes:** - `role_name` (_String_) _- Modifiable_ - `size` (_String_) +- **static.prop.foodcart** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) - **static.prop.fountain** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -410,6 +444,14 @@ Check out the [introduction to blueprints](core_actors.md). - **Attributes:** - `role_name` (_String_) _- Modifiable_ - `size` (_String_) +- **static.prop.haybale** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) +- **static.prop.haybalelb** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) - **static.prop.ironplank** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -428,7 +470,10 @@ Check out the [introduction to blueprints](core_actors.md). - `size` (_String_) - **static.prop.mesh** - **Attributes:** + - `mass` (_Float_) _- Modifiable_ + - `mesh_path` (_String_) _- Modifiable_ - `role_name` (_String_) _- Modifiable_ + - `scale` (_Float_) _- Modifiable_ - **static.prop.mobile** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -437,14 +482,6 @@ Check out the [introduction to blueprints](core_actors.md). - **Attributes:** - `role_name` (_String_) _- Modifiable_ - `size` (_String_) -- **static.prop.omri-0** - - **Attributes:** - - `role_name` (_String_) _- Modifiable_ - - `size` (_String_) -- **static.prop.omri-1** - - **Attributes:** - - `role_name` (_String_) _- Modifiable_ - - `size` (_String_) - **static.prop.pergola** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -597,6 +634,14 @@ Check out the [introduction to blueprints](core_actors.md). - **Attributes:** - `role_name` (_String_) _- Modifiable_ - `size` (_String_) +- **static.prop.warningaccident** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) +- **static.prop.warningconstruction** + - **Attributes:** + - `role_name` (_String_) _- Modifiable_ + - `size` (_String_) - **static.prop.wateringcan** - **Attributes:** - `role_name` (_String_) _- Modifiable_ @@ -612,480 +657,518 @@ Check out the [introduction to blueprints](core_actors.md). ### vehicle - **vehicle.audi.a2** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) - - `base_type` (_String_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.audi.etron** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.audi.tt** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.bh.crossbike** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.bmw.grandtourer** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.carlamotors.carlacola** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.carlamotors.firetruck** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.chevrolet.impala** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.citroen.c3** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.diamondback.century** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.dodge.charger_2020** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.dodge.charger_police** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.dodge.charger_police_2020** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.ford.ambulance** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.ford.crown** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.ford.mustang** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.gazelle.omafiets** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.harley-davidson.low_rider** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.jeep.wrangler_rubicon** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.kawasaki.ninja** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.lincoln.mkz_2017** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.lincoln.mkz_2020** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.mercedes.coupe** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.mercedes.coupe_2020** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.mercedes.sprinter** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.micro.microlino** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.mini.cooper_s** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.mini.cooper_s_2021** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.nissan.micra** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.nissan.patrol** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.nissan.patrol_2021** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.seat.leon** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.tesla.cybertruck** - **Attributes:** - - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - `base_type` (_String_) - - `special_type` (_String_) + - `generation` (_Int_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.tesla.model3** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.toyota.prius** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.vespa.zx125** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.volkswagen.t2** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.volkswagen.t2_2021** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ - **vehicle.yamaha.yzf** - **Attributes:** + - `base_type` (_String_) - `color` (_RGBColor_) _- Modifiable_ - `driver_id` (_Int_) _- Modifiable_ - `generation` (_Int_) - - `number_of_wheels` (_Int_) - - `object_type` (_String_) - - `base_type` (_String_) - - `special_type` (_String_) - `has_dynamic_doors` (_Bool_) - `has_lights` (_Bool_) + - `number_of_wheels` (_Int_) + - `object_type` (_String_) - `role_name` (_String_) _- Modifiable_ + - `special_type` (_String_) - `sticky_control` (_Bool_) _- Modifiable_ + - `terramechanics` (_Bool_) _- Modifiable_ ### walker - **walker.pedestrian.0001** @@ -1472,3 +1555,11 @@ Check out the [introduction to blueprints](core_actors.md). - `is_invincible` (_Bool_) _- Modifiable_ - `role_name` (_String_) _- Modifiable_ - `speed` (_Float_) _- Modifiable_ +- **walker.pedestrian.0049** + - **Attributes:** + - `age` (_String_) + - `gender` (_String_) + - `generation` (_Int_) + - `is_invincible` (_Bool_) _- Modifiable_ + - `role_name` (_String_) _- Modifiable_ + - `speed` (_Float_) _- Modifiable_ diff --git a/Docs/python_api.md b/Docs/python_api.md index 85fa55e42..4a30bb08a 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -772,6 +772,57 @@ Initializes a color, black by default. --- +## carla.GBufferTextureID +Defines the identifiers of each GBuffer texture (See the method `[carla.Sensor.listen_to_gbuffer](#carla.Sensor.listen_to_gbuffer)`). + +### Instance Variables +- **SceneColor** +The texture "SceneColor" contains the final color of the image. +- **SceneDepth** +The texture "SceneDepth" contains the depth buffer - linear in world units. +- **SceneStencil** +The texture "SceneStencil" contains the stencil buffer. +- **GBufferA** +The texture "GBufferA" contains the world-space normal vectors in the RGB channels. The alpha channel contains "per-object data". +- **GBufferB** +The texture "GBufferB" contains the metallic, specular and roughness in the RGB channels, respectively. The alpha channel contains a mask where the lower 4 bits indicate the shading model and the upper 4 bits contain the selective output mask. +- **GBufferC** +The texture "GBufferC" contains the diffuse color in the RGB channels, with the indirect irradiance in the alpha channel.
If static lightning is not allowed, the alpha channel will contain the ambient occlusion instead. +- **GBufferD** +The contents of the "GBufferD" varies depending on the rendered object's material shading model (GBufferB):
+ - MSM_Subsurface (2), MSM_PreintegratedSkin (3), MSM_TwoSidedFoliage (6):
+ RGB: Subsurface color.
+ A: Opacity.
+ - MSM_ClearCoat (4):
+ R: Clear coat.
+ G: Roughness.
+ - MSM_SubsurfaceProfile (5):
+ RGB: Subsurface profile.
+ - MSM_Hair (7):
+ RG: World normal.
+ B: Backlit value.
+ - MSM_Cloth (8):
+ RGB: Subsurface color.
+ A: Cloth value.
+ - MSM_Eye (9):
+ RG: Eye tangent.
+ B: Iris mask.
+ A: Iris distance. +- **GBufferE** +The texture "GBufferE" contains the precomputed shadow factors in the RGBA channels. This texture is unavailable if the selective output mask (GBufferB) does not have its 4th bit set. +- **GBufferF** +The texture "GBufferF" contains the world-space tangent in the RGB channels and the anisotropy in the alpha channel. This texture is unavailable if the selective output mask (GBufferB) does not have its 5th bit set. +- **Velocity** +The texture "Velocity" contains the screen-space velocity of the scene objects. +- **SSAO** +The texture "SSAO" contains the screen-space ambient occlusion texture. +- **CustomDepth** +The texture "CustomDepth" contains the Unreal Engine custom depth data. +- **CustomStencil** +The texture "CustomStencil" contains the Unreal Engine custom stencil data. + +--- + ## carla.GearPhysicsControl Class that provides access to vehicle transmission details by defining a gear and when to run on it. This will be later used by [carla.VehiclePhysicsControl](#carla.VehiclePhysicsControl) to help simulate physics. @@ -2114,8 +2165,17 @@ When True the sensor will be waiting for data. The function the sensor will be calling to every time a new measurement is received. This function needs for an argument containing an object type [carla.SensorData](#carla.SensorData) to work with. - **Parameters:** - `callback` (_function_) - The called function with one argument containing the sensor data. +- **listen_to_gbuffer**(**self**, **gbuffer_id**, **callback**) +The function the sensor will be calling to every time the desired GBuffer texture is received.
This function needs for an argument containing an object type [carla.SensorData](#carla.SensorData) to work with. + - **Parameters:** + - `gbuffer_id` (_[carla.GBufferTextureID](#carla.GBufferTextureID)_) - The ID of the desired Unreal Engine GBuffer texture. + - `callback` (_function_) - The called function with one argument containing the received GBuffer texture. - **stop**(**self**) Commands the sensor to stop listening for data. +- **stop_gbuffer**(**self**, **gbuffer_id**) +Commands the sensor to stop listening for the specified GBuffer texture. + - **Parameters:** + - `gbuffer_id` (_[carla.GBufferTextureID](#carla.GBufferTextureID)_) - The ID of the Unreal Engine GBuffer texture. ##### Dunder methods - **\__str__**(**self**) @@ -3977,384 +4037,6 @@ document.getElementById("snipets-container").innerHTML = null; } -