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.
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.
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:libad_rss_python.RssDynamics
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.
- var_name:other_vehicle_dynamics
type:libad_rss_python.RssDynamics
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.
- 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 __On__.
- var_name:visualization_mode
type:carla.RssVisualizationMode
doc:>
Sets the visualization of the RSS on the server side. By default is __All__. These drawings may delay de RSS so it is best to set this to __Off__ when evaluating RSS performance.
- 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:__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.
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.RssEgoDynamicsOnRoute
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.
# --------------------------------------
- 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:RssVisualizationMode
# - DESCRIPTION ------------------------
doc:>
Enum declaration used to state the visualization RSS calculations server side. Depending on these, the carla.RssSensor will use a carla.DebugHelper to draw different elements. These drawings take some time and might delay the RSS responses. It is best to disable them when evaluating RSS performance.