carla/PythonAPI/docs/sensor.yml

250 lines
12 KiB
YAML
Raw Normal View History

2019-05-03 18:18:02 +08:00
---
- module_name: carla
# - CLASSES ------------------------------
classes:
- class_name: Sensor
2019-06-05 21:05:57 +08:00
parent: carla.Actor
# - DESCRIPTION ------------------------
doc: >
Sensors compound a specific family of actors quite diverse and unique. They are normally spawned as attachment/sons of a vehicle (take a look at carla.World to learn about actor spawning). Sensors are thoroughly designed to retrieve different types of data that they are listening to. The data they receive is shaped as different subclasses inherited from carla.SensorData (depending on the sensor).
Most sensors can be divided in two groups: those receiving data on every tick (cameras, point clouds and some specific sensors) and those who only receive under certain circumstances (trigger detectors). CARLA provides a specific set of sensors and their blueprint can be found in carla.BlueprintLibrary. All the information on their preferences and settlement can be found [here](ref_sensors.md), but the list of those available in CARLA so far goes as follow.
<br><b>Receive data on every tick.</b>
- [Depth camera](ref_sensors.md#depth-camera).
- [Gnss sensor](ref_sensors.md#gnss-sensor).
- [IMU sensor](ref_sensors.md#imu-sensor).
- [Lidar raycast](ref_sensors.md#lidar-raycast-sensor).
- [SemanticLidar raycast](ref_sensors.md#semanticlidar-raycast-sensor).
- [Radar](ref_sensors.md#radar-sensor).
- [RGB camera](ref_sensors.md#rgb-camera).
- [RSS sensor](ref_sensors.md#rss-sensor).
- [Semantic Segmentation camera](ref_sensors.md#semantic-segmentation-camera).
<br><b>Only receive data when triggered.</b>
- [Collision detector](ref_sensors.md#collision-detector).
- [Lane invasion detector](ref_sensors.md#lane-invasion-detector).
- [Obstacle detector](ref_sensors.md#obstacle-detector).
# - PROPERTIES -------------------------
instance_variables:
- var_name: is_listening
type: boolean
doc: >
When <b>True</b> the sensor will be waiting for data.
# - METHODS ----------------------------
methods:
- def_name: listen
params:
- param_name: callback
type: function
doc: >
The called function with one argument containing the sensor data.
doc: >
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 to work with.
# --------------------------------------
- def_name: is_listening
doc: >
Returns whether the sensor is in a listening state.
# --------------------------------------
- def_name: stop
doc: >
Commands the sensor to stop listening for data.
# --------------------------------------
Ros2 (#6862) * Adding ROS2 manager * Trying to compile fastDDS in windows, but have problems with dependencies * Camera sensors connected to ROS2, dependencies disabled temporaly * Including enum with sensors list * adding GNSS sensor capture * adding IMU sensor capture * adding DVS sensor capture * adding Lidar sensor capture * adding SemanticLidar and Radar capture * adding ObstacleDetector and some fixes * modify cmakelists, failed to find libatomic * fixed libatomic * compile fast-dds with libc++ * fixed compliation fast dds with libcxx * linked carla with fastdds * Fixed Fast-DDS lib Now its compiled to a intermediate lib with a bridge so libstdc++ can be used * moved all ros2 deps to ros2 folder renamed types from .cxx to .cpp * Finally FastDDS compiled and working inside CARLA * exposed publish function for testing * fixed code style * make ros2 optional * make ros2 optional * Added defines to compile ROS2 code * ros image publisher working * deleted some buffer copies * Added more topics and ROS2 types * Adding sensor Transform as argument, and add function to send buffer or serialize and send buffer * Removing empty buffer from DVS sensor * fixed lidar publisher * fixed lidar publisher * Fix buffer of RGB in ROS2 * adding timestamp of each frame into ROS2 manager * sending timestamps with frame to ROS2 * put apart timestamp from frame counter call * adding BufferView to share buffers * adding BufferView to share buffers * adding ros_name attribute to all actors * mapping ros_name for each actor * ROS2 is now published in a different thread Publishers now can be created on demand and be reused Added subscriber for ego vehicle Fixed build scripts * forgot to add this fix * add ros2 to windows scripts * fixed default ros topic names * fix topic name duplication * Adding functions for enable/disable sensors publishing without listen to it * Added Camera info and ROI types RGB Camera now publishes in both topics * move camera info immutable data to the constructor * Publish transform for all topics Create Camera DVS subtopics Fixed bug with Lidar * Added flip Y to semantic lidar * Adding callbacks for subscribers from Unreal * Adding camera info to ROS2 (resolution and FOV) * Finished ROS2 naming from python * Fixed bug with ros names * Delete topics when deleting the sensors * setting the rosname same as default no longer rewrites it * ROS transform fix * Added all camera topics with the image and camera info Added vehicle control Added clock publisher * Change ros2 topic names for vehicle subscriber and clock publisher * Rename vehicle control ros2 topic name * rename subscriber type to CarlaEgoVehicleControl * Fix semantic lidar default ros name Fix sizeof the semantic lidar data buffer * Changed controller stored as string to pointer * Back to previous version for default hero ros name Removed debug prints * Remvoe callback when ego publisher disconnects * Serializing DVS data before sending to ROS * dvs camera image and lidar * DVS Pointcloud publishing * Remove unnecessary fields * Send local transforms to ros * avoid transform recalculation if not needed * Optical Flow Camera fixed * Set fixed branch for Fast-DDS to avoid cmake version change issues * Finally Working on package * Fix style from FastDDS auto generated files * Added ros2 to ubuntu in jenkins * removed ros2 from jenkins, test * restore ros2 in jenkins * fix copy shareds, and removed server dependency from libcarla * test installing the fastdds dependencies in jenkins * move installing deps to separate stage * removed install deps * Fixing test_benchmark_streaming * Fixed imu orientation and camera info data * Fixing test_benchmark_streaming.cpp with BufferView * Removing DEBUG_ONLY() * publish collision sensor * Fixing unit-tests with the new BufferView * camera info is set once * Fix echo camera info * fix transform rotation * Fixing ros_name attribute creation * fixed camera info and region of interest publish * fix IMU compass * Forgot to add ros2 flag to jenkins package --------- Co-authored-by: bernatx <bernatx@gmail.com>
2023-11-06 19:34:07 +08:00
- def_name: enable_for_ros
doc: >
Commands the sensor to be processed to be able to publish in ROS2 without any listen to it.
# --------------------------------------
- def_name: disable_for_ros
doc: >
Commands the sensor to not be processed for publishing in ROS2 if there is no any listen to it.
# --------------------------------------
- def_name: is_enabled_for_ros
doc: >
Returns if the sensor is enabled or not to publish in ROS2 if there is no any listen to it.
# --------------------------------------
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 <axellopez92@outlook.com> Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
2022-11-29 18:24:26 +08:00
- def_name: listen_to_gbuffer
params:
- param_name: gbuffer_id
type: carla.GBufferTextureID
doc: >
The ID of the target Unreal Engine GBuffer texture.
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 <axellopez92@outlook.com> Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
2022-11-29 18:24:26 +08:00
- param_name: callback
type: function
doc: >
The called function with one argument containing the received GBuffer texture.
doc: >
The function the sensor will be calling to every time the desired GBuffer texture is received.<br>
This function needs for an argument containing an object type carla.SensorData to work with.
# --------------------------------------
- def_name: is_listening_gbuffer
params:
- param_name: gbuffer_id
type: carla.GBufferTextureID
doc: >
The ID of the target Unreal Engine GBuffer texture.
doc: >
Returns whether the sensor is in a listening state for a specific GBuffer texture.
# --------------------------------------
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 <axellopez92@outlook.com> Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
2022-11-29 18:24:26 +08:00
- def_name: stop_gbuffer
params:
- param_name: gbuffer_id
type: carla.GBufferTextureID
doc: >
The ID of the Unreal Engine GBuffer texture.
doc: >
Commands the sensor to stop listening for the specified GBuffer texture.
# --------------------------------------
- def_name: __str__
# --------------------------------------
- class_name: RssSensor
parent: carla.Sensor
# - DESCRIPTION ------------------------
doc: >
This sensor works a bit differently than the rest. Take look at the [specific documentation](adv_rss.md), and the [rss sensor reference](ref_sensors.md#rss-sensor) to gain full understanding of it.
The RSS sensor uses world information, and a [RSS library](https://github.com/intel/ad-rss-lib) to make safety checks on a vehicle. The output retrieved by the sensor is a carla.RssResponse. This will be used by a carla.RssRestrictor to modify a carla.VehicleControl before applying it to a vehicle.
# - PROPERTIES -------------------------
instance_variables:
- var_name: ego_vehicle_dynamics
type: <a href="https://intel.github.io/ad-rss-lib/doxygen/ad_rss/structad_1_1rss_1_1world_1_1RssDynamics.html">ad.rss.world.RssDynamics</a>
doc: >
States the [RSS parameters](https://intel.github.io/ad-rss-lib/ad_rss/Appendix-ParameterDiscussion/) that the sensor will consider for the ego vehicle if no actor constellation callback is registered.
- var_name: other_vehicle_dynamics
type: <a href="https://intel.github.io/ad-rss-lib/doxygen/ad_rss/structad_1_1rss_1_1world_1_1RssDynamics.html">ad.rss.world.RssDynamics</a>
doc: >
States the [RSS parameters](https://intel.github.io/ad-rss-lib/ad_rss/Appendix-ParameterDiscussion/) that the sensor will consider for the rest of vehicles if no actor constellation callback is registered.
- var_name: pedestrian_dynamics
type: <a href="https://intel.github.io/ad-rss-lib/doxygen/ad_rss/structad_1_1rss_1_1world_1_1RssDynamics.html">ad.rss.world.RssDynamics</a>
doc: >
States the [RSS parameters](https://intel.github.io/ad-rss-lib/ad_rss/Appendix-ParameterDiscussion/) that the sensor will consider for pedestrians if no actor constellation callback is registered.
- var_name: road_boundaries_mode
type: carla.RssRoadBoundariesMode
doc: >
Switches the [stay on road](https://intel.github.io/ad-rss-lib/ad_rss_map_integration/HandleRoadBoundaries/) feature. By default is __Off__.
- var_name: routing_targets
type: vector<carla.Transform>
doc: >
The current list of targets considered to route the vehicle. If no routing targets are defined, a route is generated at random.
# - METHODS ----------------------------
methods:
- def_name: append_routing_target
params:
- param_name: routing_target
type: carla.Transform
doc: >
New target point for the route. Choose these after the intersections to force the route to take the desired turn.
doc: >
Appends a new target position to the current route of the vehicle.
- def_name: reset_routing_targets
doc: >
Erases the targets that have been appended to the route.
- def_name: drop_route
doc: >
Discards the current route. If there are targets remaining in **<font color="#f8805a">routing_targets</font>**, creates a new route using those. Otherwise, a new route is created at random.
- def_name: register_actor_constellation_callback
params:
- param_name: callback
doc: >
The function to be called whenever a RSS situation is about to be calculated.
doc: >
Register a callback to customize a carla.RssActorConstellationResult. By this callback the settings of RSS parameters are done per actor constellation and the settings (ego_vehicle_dynamics, other_vehicle_dynamics and pedestrian_dynamics) have no effect.
- def_name: set_log_level
params:
- param_name: log_level
type: carla.RssLogLevel
doc: >
New log level.
doc: >
Sets the log level.
- def_name: set_map_log_level
params:
- param_name: log_level
type: carla.RssLogLevel
doc: >
New map log level.
doc: >
Sets the map log level.
# --------------------------------------
- def_name: __str__
# --------------------------------------
- class_name: RssRestrictor
parent:
# - DESCRIPTION ------------------------
doc: >
These objects apply restrictions to a carla.VehicleControl. It is part of the CARLA implementation of the [C++ Library for Responsibility Sensitive Safety](https://github.com/intel/ad-rss-lib). This class works hand in hand with a [rss sensor](ref_sensors.md#rss-sensor), which provides the data of the restrictions to be applied.
# - PROPERTIES -------------------------
instance_variables:
# - METHODS ----------------------------
methods:
- def_name: restrict_vehicle_control
params:
- param_name: vehicle_control
type: carla.VehicleControl
doc: >
The input vehicle control to be restricted.
- param_name: proper_response
type: <a href="https://intel.github.io/ad-rss-lib/doxygen/ad_rss/structad_1_1rss_1_1state_1_1ProperResponse.html">ad.rss.state.ProperResponse</a>
doc: >
Part of the response generated by the sensor. Contains restrictions to be applied to the acceleration of the vehicle.
- param_name: ego_dynamics_on_route
type: carla.RssEgoDynamicsOnRoute
doc: >
Part of the response generated by the sensor. Contains dynamics and heading of the vehicle regarding its route.
- param_name: vehicle_physics
type: carla.VehiclePhysicsControl
doc: >
The current physics of the vehicle. Used to apply the restrictions properly.
return:
carla.VehicleControl
doc: >
Applies the safety restrictions given by a carla.RssSensor to a carla.VehicleControl.
- def_name: set_log_level
params:
- param_name: log_level
type: carla.RssLogLevel
doc: >
New log level.
doc: >
Sets the log level.
# --------------------------------------
- class_name: RssRoadBoundariesMode
# - DESCRIPTION ------------------------
doc: >
Enum declaration used in carla.RssSensor to enable or disable the [stay on road](https://intel.github.io/ad-rss-lib/ad_rss_map_integration/HandleRoadBoundaries/) feature. In summary, this feature considers the road boundaries as virtual objects. The minimum safety distance check is applied to these virtual walls, in order to make sure the vehicle does not drive off the road.
# - PROPERTIES -------------------------
instance_variables:
- var_name: 'On'
doc: >
Enables the _stay on road_ feature.
# --------------------------------------
- var_name: 'Off'
doc: >
Disables the _stay on road_ feature.
# --------------------------------------
- class_name: RssLogLevel
# - DESCRIPTION ------------------------
doc: >
Enum declaration used in carla.RssSensor to set the log level.
# - PROPERTIES -------------------------
instance_variables:
- var_name: 'trace'
# --------------------------------------
- var_name: 'debug'
# --------------------------------------
- var_name: 'info'
# --------------------------------------
- var_name: 'warn'
# --------------------------------------
- var_name: 'err'
# --------------------------------------
- var_name: 'critical'
# --------------------------------------
- var_name: 'off'
# --------------------------------------
2019-05-03 18:18:02 +08:00
...