diff --git a/PythonAPI/carla/setup.py b/PythonAPI/carla/setup.py index 1e4b86b7b2..763cdf59e5 100755 --- a/PythonAPI/carla/setup.py +++ b/PythonAPI/carla/setup.py @@ -6,12 +6,15 @@ # This work is licensed under the terms of the MIT license. # For a copy, see . +import shutil from setuptools import setup, Extension import fnmatch import os import sys +from distutils.command.install_lib import install_lib + def is_rss_variant_enabled(): if 'BUILD_RSS_VARIANT' in os.environ and os.environ['BUILD_RSS_VARIANT'] == 'true': return True @@ -135,8 +138,8 @@ def walk(folder, file_filter='*'): else: raise NotImplementedError - depends = [x for x in walk('source/libcarla')] - depends += [x for x in walk('dependencies')] + depends = list(walk('source/libcarla')) + depends += list(walk('dependencies')) def make_extension(name, sources): @@ -163,11 +166,42 @@ def get_license(): with open("README.md") as f: long_description = f.read() +class CleanADStubFiles(install_lib): + """ + Removes the ad/ files from the build directory in a normal built + that else would be copies over. + """ + + CARLA_RSS_STUB_FILE = "__carla_rss.pyi" + _CARLA_RSS_STUB_FILE_PATH = os.path.join("carla", CARLA_RSS_STUB_FILE) + CARLA_AD_STUB_DIR = os.path.join("carla", "ad") + + def run(self): + if not is_rss_variant_enabled(): + self.prune_rss() + install_lib.run(self) # for python2 do not use super here + + def prune_rss(self): + """Removes files from an rss build that we do not want to be copied over to a non-rss build.""" + if not self.build_dir: + return + print("Cleaning possible RSS files from previous build.") + shutil.rmtree(os.path.join(self.build_dir, self.CARLA_AD_STUB_DIR), ignore_errors=True) + try: + os.remove(os.path.join(self.build_dir, self._CARLA_RSS_STUB_FILE_PATH)) + except OSError: + pass + return + setup( name='carla', version='0.9.15', package_dir={'': 'source'}, - packages=['carla'], + # Avoid "Package would be ignored" warning for non-rss build if using ['carla'] here + packages=['carla', 'carla.ad', 'carla.ad.rss', 'carla.ad.map'] if is_rss_variant_enabled() else ['carla'], + # For non-rss build do a fine grained include/exclude on the package data. + package_data={'carla' : [""]}, + exclude_package_data={} if is_rss_variant_enabled() else {'carla':[CleanADStubFiles.CARLA_RSS_STUB_FILE]}, ext_modules=get_libcarla_extensions(), license=get_license(), description='Python API for communicating with the CARLA server.', @@ -176,4 +210,6 @@ def get_license(): url='https://github.com/carla-simulator/carla', author='The CARLA team', author_email='carla.simulator@gmail.com', - include_package_data=True) + include_package_data=True, + cmdclass={'install_lib': CleanADStubFiles}, + ) \ No newline at end of file diff --git a/PythonAPI/carla/source/carla/__carla_rss.pyi b/PythonAPI/carla/source/carla/__carla_rss.pyi new file mode 100644 index 0000000000..f07232ef19 --- /dev/null +++ b/PythonAPI/carla/source/carla/__carla_rss.pyi @@ -0,0 +1,369 @@ +"""This is an artificial module that holds the classes that are added to libcarla if the RSS library is enabled.""" +from typing import Callable + +import ad +from .libcarla import ( + Actor, + Sensor, + SensorData, + Transform, + VehicleControl, + VehiclePhysicsControl, + _CarlaEnum, +) + +__all__ = [ + 'RssActorConstellationData', + 'RssActorConstellationResult', + 'RssEgoDynamicsOnRoute', + 'RssLogLevel', + 'RssResponse', + 'RssRestrictor', + 'RssRoadBoundariesMode', + 'RssSensor', +] + +class RssActorConstellationData: + """Data structure that is provided within the callback registered by RssSensor.register_actor_constellation_callback().""" + + # region Instance Variables + @property + def ego_match_object(self) -> ad.map.match.Object: + """The ego map matched information.""" + + @property + def ego_route(self) -> ad.map.route.FullRoute: + """The ego route.""" + + @property + def ego_dynamics_on_route(self) -> RssEgoDynamicsOnRoute: + """Current ego vehicle dynamics regarding the route.""" + + @property + def other_match_object(self) -> ad.map.match.Object: + """The other object's map matched information. This is only valid if 'other_actor' is not 'None'.""" + + @property + def other_actor(self) -> Actor | None: + """ + The other actor. + This is 'None' in case of query of default parameters or artificial objects of kind [ad.rss.world.ObjectType.ArtificialObject](https://intel.github.io/ad-rss-lib/doxygen/ad_rss/namespacead_1_1rss_1_1world.html#a6432f1ef8d0657b4f21ed5966aca1625) + with no dedicated 'carla.Actor' (as e.g. for the road boundaries at the moment; see RssSensor). + """ + + # region Dunder Methods + def __str__(self) -> str: ... + # endregion + +class RssActorConstellationResult: + """ + Data structure that should be returned by the callback + registered by RssSensor.register_actor_constellation_callback(). + """ + + # region Instance Variables + @property + def rss_calculation_mode(self) -> ad.rss.map.RssMode: + """The calculation mode to be applied with the actor.""" + + @rss_calculation_mode.setter + def rss_calculation_mode(self, value: ad.rss.map.RssMode) -> None: + """Setter for rss_calculation_mode property.""" + + + @property + def restrict_speed_limit_mode(self) -> ad.rss.map.RssSceneCreation.RestrictSpeedLimitMode: + """The mode for restricting speed limit.""" + + @restrict_speed_limit_mode.setter + def restrict_speed_limit_mode(self, value: ad.rss.map.RssSceneCreation.RestrictSpeedLimitMode) -> None: + """Setter for restrict_speed_limit_mode property.""" + + + @property + def ego_vehicle_dynamics(self) -> ad.rss.world.RssDynamics: ... + + @ego_vehicle_dynamics.setter + def ego_vehicle_dynamics(self, value: ad.rss.world.RssDynamics) -> None: + """Setter for ego_vehicle_dynamics property.""" + + @property + def actor_object_type(self) -> ad.rss.world.ObjectType: + """The RSS object type to be used for the actor.""" + + @actor_object_type.setter + def actor_object_type(self, value: ad.rss.world.ObjectType) -> None: + """Setter for actor_object_type property.""" + + + @property + def actor_dynamics(self) -> ad.rss.world.RssDynamics: + """The RSS dynamics to be applied for the actor.""" + + @actor_dynamics.setter + def actor_dynamics(self, value: ad.rss.world.RssDynamics) -> None: + """Setter for actor_dynamics property.""" + + # endregion + + # region Dunder Methods + def __str__(self) -> str: ... + # endregion + +class RssEgoDynamicsOnRoute: + """ + Part of the data contained inside a carla.RssResponse describing the state of the vehicle. + The parameters include its current dynamics, and how it is heading regarding the target route. + """ + + # region Instance Variables + @property + def ego_speed(self) -> ad.physics.Speed: + """The ego vehicle's speed.""" + + @property + def min_stopping_distance(self) -> ad.physics.Distance: + """The current minimum stopping distance.""" + + @property + def ego_center(self) -> ad.map.point.ENUPoint: + """The considered enu position of the ego vehicle.""" + + @property + def ego_heading(self) -> ad.map.point.ENUHeading: + """The considered heading of the ego vehicle.""" + + @property + def ego_center_within_route(self) -> bool: + """States if the ego vehicle's center is within the route.""" + + @property + def crossing_border(self) -> bool: + """States if the vehicle is already crossing one of the lane borders.""" + + @property + def route_heading(self) -> ad.map.point.ENUHeading: + """The considered heading of the route.""" + + @property + def route_nominal_center(self) -> ad.map.point.ENUPoint: + """The considered nominal center of the route.""" + + @property + def heading_diff(self) -> ad.map.point.ENUHeading: + """The considered heading diff towards the route.""" + + @property + def route_speed_lat(self) -> ad.physics.Speed: + """TThe ego vehicle's speed component lat regarding the route.""" + + @property + def route_speed_lon(self) -> ad.physics.Speed: + """The ego vehicle's speed component lon regarding the route.""" + + @property + def route_accel_lat(self) -> ad.physics.Acceleration: + """The ego vehicle's acceleration component lat regarding the route.""" + + @property + def route_accel_lon(self) -> ad.physics.Acceleration: + """The ego vehicle's acceleration component lon regarding the route.""" + + @property + def avg_route_accel_lat(self) -> ad.physics.Acceleration: + """The ego vehicle's acceleration component lat regarding the route smoothened by an average filter.""" + + @property + def avg_route_accel_lon(self) -> ad.physics.Acceleration: + """The ego acceleration component lon regarding the route smoothened by an average filter.""" + # endregion + + # region Dunder Methods + def __str__(self) -> str: ... + # endregion + +class RssLogLevel(int, _CarlaEnum): + """Enum declaration used in carla.RssSensor to set the log level.""" + + trace = 0 + debug = 1 + info = 2 + warn = 3 + err = 4 + critical = 5 + off = 6 + +class RssResponse(SensorData): + """ + Class that contains the output of a carla.RssSensor. + This is the result of the RSS calculations performed for the parent vehicle of the sensor. + + A carla.RssRestrictor will use the data to modify the carla.VehicleControl of the vehicle. + """ + + # region Instance Variables + @property + def response_valid(self) -> bool: + """ + States if the response is valid. + It is False if calculations failed or an exception occurred. + """ + + @property + def proper_response(self) -> ad.rss.state.ProperResponse: + """The proper response that the RSS calculated for the vehicle.""" + + @property + def rss_state_snapshot(self) -> ad.rss.state.RssStateSnapshot: + """Detailed RSS states at the current moment in time.""" + + @property + def ego_dynamics_on_route(self) -> RssEgoDynamicsOnRoute: + """Current ego vehicle dynamics regarding the route.""" + + @property + def world_model(self) -> ad.rss.world.WorldModel: + """World model used for calculations.""" + + @property + def situation_snapshot(self) -> ad.rss.situation.SituationSnapshot: + """Detailed RSS situations extracted from the world model.""" + # endregion + + # region Dunder Methods + def __str__(self) -> str: ... + # endregion + +class RssRestrictor: + """ + These objects apply restrictions to a carla.VehicleControl. + It is part of the CARLA implementation of the C++ Library for Responsibility Sensitive Safety. + This class works hand in hand with a rss sensor, which provides the data of the restrictions to be applied. + """ + + # region Methods + def restrict_vehicle_control(self, + vehicle_control: VehicleControl, + proper_response: ad.rss.state.ProperResponse, + ego_dynamics_on_route: RssEgoDynamicsOnRoute, + vehicle_physics: VehiclePhysicsControl, + ) -> VehicleControl: + """ + Applies the safety restrictions given by a carla.RssSensor to a carla.VehicleCon + + Args: + vehicle_control (VehicleControl): + The input vehicle control to be restricted. + proper_response (ad.rss.state.ProperResponse): + Part of the response generated by the sensor. Contains restrictions to be applied to the acceleration of the vehicle. + ego_dynamics_on_route (RssEgoDynamicsOnRoute): + Tart of the response generated by the sensor. Contains dynamics and heading of the vehicle regarding its route. + vehicle_physics (VehiclePhysicsControl): + The current physics of the vehicle. Used to apply the restrictions properly. + + Returns: + VehicleControl: The restricted vehicle control. + """ + # endregion + + # region Setters + def set_log_level(self, log_level: RssLogLevel) -> None: + """Sets the log level.""" + # endregion + +class RssRoadBoundariesMode(int, _CarlaEnum): + """ + Enum declaration used in carla.RssSensor to enable or disable the stay on road 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. + """ + + Off = 0 + On = 1 + +class RssSensor(Sensor): + """ + This sensor works a bit differently than the rest. Take look at the [specific documentation](https://carla.readthedocs.io/en/latest/adv_rss/), + and the [rss sensor reference](https://carla.readthedocs.io/en/latest/ref_sensors/#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. + """ + + # region Instance Variables + + @property + def ego_vehicle_dynamics(self) -> ad.rss.world.RssDynamics: + """ + 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. + """ + + @property + def other_vehicle_dynamics(self) -> ad.rss.world.RssDynamics: + """ + 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. + """ + + @property + def pedestrian_dynamics(self) -> ad.rss.world.RssDynamics: + """ + 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. + """ + + @property + def road_boundaries_mode(self) -> RssRoadBoundariesMode: + """Switches the stay on road feature. By default is Off.""" + + @road_boundaries_mode.setter + def road_boundaries_mode(self, value: RssRoadBoundariesMode) -> None: + ... + + @property + def routing_targets(self) -> list[Transform]: # declared as vector + """The current list of targets considered to route the vehicle. If no routing targets are defined, a route is generated at random.""" + + # region Methods + def append_routing_target(self, routing_target: Transform) -> None: + """ + Appends a new target position to the current route of the vehicle. + + Args: + routing_target (Transform): New target point for the route. Choose these after the intersections to force the route to take the desired turn. + """ + + def drop_route(self) -> None: + """ + Discards the current route. + + If there are targets remaining in `routing_targets`, creates a new route using those. + Otherwise, a new route is created at random. + """ + + def register_actor_constellation_callback(self, callback: Callable[[RssActorConstellationData], RssActorConstellationResult]) -> None: + """ + 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. + + Args: + callback (Callable): The function to be called whenever a RSS situation is about to be calculated. + """ + + def reset_routing_targets(self) -> None: + """Erases the targets that have been appended to the route.""" + + def set_log_level(self, log_level: RssLogLevel | int) -> None: + """Sets the log level.""" + def set_map_log_level(self, log_level: RssLogLevel | int) -> None: + """Sets the map log level.""" + # endregion + + # region Dunder Methods + def __str__(self) -> str: ... + # endregion diff --git a/PythonAPI/carla/source/carla/__init__.py b/PythonAPI/carla/source/carla/__init__.py index 50a94a6755..a02fa36f68 100644 --- a/PythonAPI/carla/source/carla/__init__.py +++ b/PythonAPI/carla/source/carla/__init__.py @@ -4,5 +4,5 @@ # This work is licensed under the terms of the MIT license. # For a copy, see . -# pylint: disable=W0401 +# pylint: disable=W0401,import-self from .libcarla import * diff --git a/PythonAPI/carla/source/carla/ad/__init__.pyi b/PythonAPI/carla/source/carla/ad/__init__.pyi new file mode 100644 index 0000000000..b77b9a23f2 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/__init__.pyi @@ -0,0 +1,145 @@ +""" +Warning: + The stub files for the ad module are only a partial representation of the actual API, + some functions and attributes are still missing. +""" + +from typing import Iterable, Iterator, Protocol, TypeVar, overload, type_check_only + +from typing_extensions import Self + +from . import map, physics, rss + +__all__ = [ + 'map', + 'physics', + 'rss', +] + +# --------------------------------------------- +# Below are helper classes to easier define stubs. + +_T = TypeVar('_T') + +@type_check_only +class _Vector(Protocol[_T]): + # Note: __contains__, __iter__, and __reversed__ cann fall to __getitem__ + + def append(self, item: _T, /) -> None: + ... + + def extend(self, iterable: Iterable[_T], /) -> None: + ... + + def insert(self, index: int, item: _T, /) -> None: + ... + + def reverse(self) -> None: + ... + + @overload + def __getitem__(self, index: slice, /) -> list[_T]: ... + + @overload + def __getitem__(self, index: int, /) -> _T: + ... + + def __delitem__(self, index: int, /): + ... + + @overload + def __setitem__(self, arg2: slice, value: Iterable[_T], /) -> None: ... + + @overload + def __setitem__(self, index: int, value: _T, /) -> None: ... + + def __len__(self) -> int: + ... + + def __contains__(self, item: object, /) -> bool: + ... + + def __iter__(self) -> Iterator[_T]: + ... + +@type_check_only +class _IndexableVector(_Vector[_T], Protocol): + """add `index` methods.""" + + def index(self, item: _T, /) -> int: + ... + +@type_check_only +class _VectorSequence(_IndexableVector[_T], Protocol): + """Adds `count` and `index` methods.""" + + def count(self, item: _T, /) -> int: + ... + +@type_check_only +class _SortableSequence(_VectorSequence[_T], Protocol): + """Adds `sort` method. Not all _VectorSequences support sort.""" + + # TODO: Need to check if _VectorSequence is correct base or if needs two protocols + + def sort(self) -> None: + ... + +@type_check_only +class _Assignable(Protocol): + + def assign(self, other: Self) -> Self: ... + +@type_check_only +class _FloatLike(Protocol): + def __float__(self) -> float: ... + + def __add__(self, other: float | Self) -> Self: ... + + def __iadd__(self, other: float | Self) -> Self: ... + + def __truediv__(self, other: float | Self) -> Self: ... + + def __sub__(self, other: float | Self) -> Self: ... + + def __isub(self, other: float | Self) -> Self: ... + + def __lt__(self, other: float | Self) -> bool: ... + + def __le__(self, other: float | Self) -> bool: ... + + def __mul__(self, other: Self) -> Self: ... + + def __ge__(self, other: float | Self) -> bool: ... + + def __gt__(self, other: float | Self) -> bool: ... + + def __eq__(self, value: object) -> bool: ... + +@type_check_only +class _Calculable(_Assignable, _FloatLike, Protocol): + """ + A float like with Max, Min, and Precision values. + """ + + cMaxValue: float + cMinValue: float + cPrecisionValue: float + + @classmethod + def getMin(cls) -> Self: ... + + @classmethod + def getMax(cls) -> Self: ... + + @classmethod + def getPrecision(cls) -> Self: ... + + @property + def Valid(self) -> bool: ... + + def ensureValid(self, value: Self) -> Self: ... + + def ensureValidNonZero(self, value: Self) -> Self: ... + + def __hash__(self) -> int: ... diff --git a/PythonAPI/carla/source/carla/ad/map/__init__.pyi b/PythonAPI/carla/source/carla/ad/map/__init__.pyi new file mode 100644 index 0000000000..25cdc06e25 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/__init__.pyi @@ -0,0 +1,86 @@ +from typing import Any, ClassVar +from ...libcarla import _CarlaEnum + +from . import access, config, intersection, landmark, lane, match, point, restriction, route +from .. import rss + +NotRelevant: RssMode +Structured: RssMode +Unstructured: RssMode + +class RssMode(int, _CarlaEnum): + NotRelevant = 0 + Structured = 1 + Unstructured = 2 + +class RssObjectData: + __instance_size__: ClassVar[int] = 360 + + # properties + id: Unknown + matchObject: Unknown + rssDynamics: Unknown + speed: Unknown + steeringAngle: Unknown + type: Unknown + yawRate: Unknown + + @classmethod + def __init__(cls, *args, **kwargs) -> None: + """ + __init__( (object)arg1) -> None : + + C++ signature : + void __init__(_object*)""" + @classmethod + def __reduce__(cls): ... + +class RssSceneCreation: + class AppendRoadBoundariesMode(int, _CarlaEnum): + RouteOnly = 0 + ExpandRouteToOppositeLanes = 1 + ExpandRouteToAllNeighbors = 2 + + class RestrictSpeedLimitMode(int, _CarlaEnum): + None = 0 # type: ignore + ExactSpeedLimit = 1 + IncreasedSpeedLimit10 = 2 + IncreasedSpeedLimit5 = 3 + + ExactSpeedLimit = RestrictSpeedLimitMode.ExactSpeedLimit + ExpandRouteToAllNeighbors = AppendRoadBoundariesMode.ExpandRouteToAllNeighbors + ExpandRouteToOppositeLanes = AppendRoadBoundariesMode.ExpandRouteToOppositeLanes + IncreasedSpeedLimit10 = RestrictSpeedLimitMode.IncreasedSpeedLimit10 + IncreasedSpeedLimit5 = RestrictSpeedLimitMode.IncreasedSpeedLimit5 + RouteOnly = AppendRoadBoundariesMode.RouteOnly + + __instance_size__: ClassVar[int] = 256 + def __init__(self, timeIndex: int, defaultEgoRssDynamics: rss.world.RssDynamics) -> None: + """ + __init__( (object)arg1, (object)timeIndex, (RssDynamics)defaultEgoRssDynamics) -> None : + + C++ signature : + void __init__(_object*,unsigned long,ad::rss::world::RssDynamics)""" + @classmethod + def appendRoadBoundaries(cls, egoObjectData: RssObjectData, route: route.FullRoute, operationMode: AppendRoadBoundariesMode) -> bool: + """ + appendRoadBoundaries( (RssSceneCreation)arg1, (RssObjectData)egoObjectData, (FullRoute)route, (AppendRoadBoundariesMode)operationMode) -> bool : + + C++ signature : + bool appendRoadBoundaries(ad::rss::map::RssSceneCreation {lvalue},ad::rss::map::RssObjectData,ad::map::route::FullRoute,ad::rss::map::RssSceneCreation::AppendRoadBoundariesMode)""" + + def appendScenes(self, *args, **kwargs) -> bool: + """ + appendScenes( (RssSceneCreation)arg1, (RssObjectData)egoObjectData, (FullRoute)egoRoute, (RssObjectData)otherObjectData, (RestrictSpeedLimitMode)restrictSpeedLimitMode, (LandmarkIdSet)greenTrafficLights, (RssMode)mode) -> bool : + + C++ signature : + bool appendScenes(ad::rss::map::RssSceneCreation {lvalue},ad::rss::map::RssObjectData,ad::map::route::FullRoute,ad::rss::map::RssObjectData,ad::rss::map::RssSceneCreation::RestrictSpeedLimitMode,std::set, std::allocator >,ad::rss::map::RssMode)""" + + def getWorldModel(self) -> rss.world.WorldModel: + """ + getWorldModel( (RssSceneCreation)arg1) -> WorldModel : + + C++ signature : + ad::rss::world::WorldModel getWorldModel(ad::rss::map::RssSceneCreation {lvalue})""" + @classmethod + def __reduce__(cls): ... diff --git a/PythonAPI/carla/source/carla/ad/map/access.pyi b/PythonAPI/carla/source/carla/ad/map/access.pyi new file mode 100644 index 0000000000..4071609896 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/access.pyi @@ -0,0 +1,186 @@ +from carla.libcarla import _CarlaEnum + +from . import * + +INVALID = TrafficType.INVALID +LEFT_HAND_TRAFFIC = TrafficType.LEFT_HAND_TRAFFIC +RIGHT_HAND_TRAFFIC = TrafficType.RIGHT_HAND_TRAFFIC + +class MapMetaData: + def assign(self, arg1: MapMetaData, other: MapMetaData) -> MapMetaData: + """ + + assign( (MapMetaData)arg1, (MapMetaData)other) -> MapMetaData : + + C++ signature : + ad::map::access::MapMetaData {lvalue} assign(ad::map::access::MapMetaData {lvalue},ad::map::access::MapMetaData) + """ + ... + + @property + def trafficType(self) -> TrafficType: ... + +class PartitionId: + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: PartitionId, other: PartitionId) -> PartitionId: + """ + + assign( (PartitionId)arg1, (PartitionId)other) -> PartitionId : + + C++ signature : + ad::map::access::PartitionId {lvalue} assign(ad::map::access::PartitionId {lvalue},ad::map::access::PartitionId) + """ + ... + + cMaxValue: float = 18446744073709551615 + + cMinValue: float = 0 + + def ensureValid(self, arg1: PartitionId) -> None: + """ + + ensureValid( (PartitionId)arg1) -> None : + + C++ signature : + void ensureValid(ad::map::access::PartitionId {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: PartitionId) -> None: + """ + + ensureValidNonZero( (PartitionId)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::map::access::PartitionId {lvalue}) + """ + ... + + def getMax(self) -> PartitionId: + """ + + getMax() -> PartitionId : + + C++ signature : + ad::map::access::PartitionId getMax() + """ + ... + + def getMin(self) -> PartitionId: + """ + + getMin() -> PartitionId : + + C++ signature : + ad::map::access::PartitionId getMin() + """ + ... + +class PartitionIdList: + def append(self, arg1: PartitionIdList, arg2: PartitionId) -> None: + """ + + append( (PartitionIdList)arg1, (PartitionId)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::access::PartitionId) + """ + ... + + def count(self, arg1: PartitionIdList, arg2: PartitionId) -> int: + """ + + count( (PartitionIdList)arg1, (PartitionId)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::access::PartitionId) + """ + ... + + def extend(self, arg1: PartitionIdList, arg2: object) -> None: + """ + + extend( (PartitionIdList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: PartitionIdList, arg2: PartitionId) -> int: + """ + + index( (PartitionIdList)arg1, (PartitionId)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::access::PartitionId) + """ + ... + + def insert(self, arg1: PartitionIdList, arg2: int, arg3: PartitionId) -> None: + """ + + insert( (PartitionIdList)arg1, (int)arg2, (PartitionId)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::access::PartitionId) + """ + ... + + def reverse(self, arg1: PartitionIdList) -> None: + """ + + reverse( (PartitionIdList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: PartitionIdList) -> None: + """ + + sort( (PartitionIdList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class TrafficType(int, _CarlaEnum): + INVALID = 0 + LEFT_HAND_TRAFFIC = 1 + RIGHT_HAND_TRAFFIC = 2 + +class numeric_limits_less__ad_scope_map_scope_access_scope_PartitionId__greater_: + def epsilon(self) -> PartitionId: + """ + + epsilon() -> PartitionId : + + C++ signature : + ad::map::access::PartitionId epsilon() + """ + ... + + def lowest(self) -> PartitionId: + """ + + lowest() -> PartitionId : + + C++ signature : + ad::map::access::PartitionId lowest() + """ + ... + + def max(self) -> PartitionId: + """ + + max() -> PartitionId : + + C++ signature : + ad::map::access::PartitionId max() + """ + ... diff --git a/PythonAPI/carla/source/carla/ad/map/config.pyi b/PythonAPI/carla/source/carla/ad/map/config.pyi new file mode 100644 index 0000000000..381c734cf3 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/config.pyi @@ -0,0 +1,91 @@ + +from carla import ad + +class MapConfigFileHandler: + @property + def Initialized(self) -> bool: ... + + @property + def adMapEntry(self) -> MapEntry: ... + + @property + def configFileName(self) -> str: ... + + @property + def defaultEnuReference(self) -> ad.map.point.GeoPoint: ... + + @property + def defaultEnuReferenceAvailable(self) -> bool: ... + + def isInitializedWithFilename(self, arg1: MapConfigFileHandler, configFileName: str) -> bool: + """ + + isInitializedWithFilename( (MapConfigFileHandler)arg1, (str)configFileName) -> bool : + + C++ signature : + bool isInitializedWithFilename(ad::map::config::MapConfigFileHandler {lvalue},std::__cxx11::basic_string, std::allocator >) + """ + ... + + @property + def pointsOfInterest(self) -> PointOfInterest: ... + + def readConfig(self, arg1: MapConfigFileHandler, configFileName: str) -> bool: + """ + + readConfig( (MapConfigFileHandler)arg1, (str)configFileName) -> bool : + + C++ signature : + bool readConfig(ad::map::config::MapConfigFileHandler {lvalue},std::__cxx11::basic_string, std::allocator >) + """ + ... + + def reset(self, arg1: MapConfigFileHandler) -> None: + """ + + reset( (MapConfigFileHandler)arg1) -> None : + + C++ signature : + void reset(ad::map::config::MapConfigFileHandler {lvalue}) + """ + ... + +class MapEntry: + def assign(self, arg1: MapEntry, other: MapEntry) -> MapEntry: + """ + + assign( (MapEntry)arg1, (MapEntry)other) -> MapEntry : + + C++ signature : + ad::map::config::MapEntry {lvalue} assign(ad::map::config::MapEntry {lvalue},ad::map::config::MapEntry) + """ + ... + + @property + def filename(self) -> str: ... + + @property + def openDriveDefaultIntersectionType(self) -> ad.map.intersection.IntersectionType: ... + + @property + def openDriveDefaultTrafficLightType(self) -> ad.map.landmark.TrafficLightType: ... + + @property + def openDriveOverlapMargin(self) -> ad.physics.Distance: ... + +class PointOfInterest: + def assign(self, arg1: PointOfInterest, other: PointOfInterest) -> PointOfInterest: + """ + + assign( (PointOfInterest)arg1, (PointOfInterest)other) -> PointOfInterest : + + C++ signature : + ad::map::config::PointOfInterest {lvalue} assign(ad::map::config::PointOfInterest {lvalue},ad::map::config::PointOfInterest) + """ + ... + + @property + def geoPoint(self) -> ad.map.point.GeoPoint: ... + + @property + def name(self) -> str: ... diff --git a/PythonAPI/carla/source/carla/ad/map/intersection.pyi b/PythonAPI/carla/source/carla/ad/map/intersection.pyi new file mode 100644 index 0000000000..4fc60db075 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/intersection.pyi @@ -0,0 +1,682 @@ +from typing import TypeAlias, overload + +import ad + +from . import * + +Unknown: TypeAlias = UnknownType + +class CoreIntersection(): + @property + def BoundingSphere(self) -> point.BoundingSphere: ... + + @property + def entryLanes(self) -> lane.LaneIdSet: ... + + @property + def entryParaPoints(self) -> point.ParaPointList: ... + + @property + def exitLanes(self) -> lane.LaneIdSet: ... + + @property + def exitParaPoints(self) -> point.ParaPointList: ... + + def extractLanesOfCoreIntersection(self, arg1: CoreIntersection, laneId: lane.LaneId) -> None: + """ + + extractLanesOfCoreIntersection( (CoreIntersection)arg1, (LaneId)laneId) -> None : + + C++ signature : + void extractLanesOfCoreIntersection(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + @overload + @staticmethod + def getCoreIntersectionFor(laneId: lane.LaneId) -> CoreIntersection: ... + + @overload + @staticmethod + def getCoreIntersectionFor(mapMatchedPosition: match.MapMatchedPosition) -> CoreIntersection: + """ + + getCoreIntersectionFor( (LaneId)laneId) -> CoreIntersection : + + C++ signature : + std::shared_ptr getCoreIntersectionFor(ad::map::lane::LaneId) + + getCoreIntersectionFor( (MapMatchedPosition)mapMatchedPosition) -> CoreIntersection : + + C++ signature : + std::shared_ptr getCoreIntersectionFor(ad::map::match::MapMatchedPosition) + """ + ... + + @staticmethod + def getCoreIntersectionsFor(laneIds: lane.LaneIdSet | lane.LaneIdList) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_: + """ + + getCoreIntersectionsFor( (LaneIdSet)laneIds) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsFor(std::set, std::allocator >) + + getCoreIntersectionsFor( (LaneIdList)laneIds) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsFor(std::vector >) + """ + ... + + def getCoreIntersectionsForInLaneMatches(self, position: point.ENUPoint, mapMatchedPositionConfidenceList: match.vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, object: match.MapMatchedObjectBoundingBox) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_: + """ + + getCoreIntersectionsForInLaneMatches( (ENUPoint)position) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsForInLaneMatches(ad::map::point::ENUPoint) + + getCoreIntersectionsForInLaneMatches( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)mapMatchedPositionConfidenceList) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsForInLaneMatches(std::vector >) + + getCoreIntersectionsForInLaneMatches( (MapMatchedObjectBoundingBox)object) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsForInLaneMatches(ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def getCoreIntersectionsForMap(self, ) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_: + """ + + getCoreIntersectionsForMap() -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getCoreIntersectionsForMap() + """ + ... + + def getEntryParaPointOfExternalLane(self, arg1: CoreIntersection, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getEntryParaPointOfExternalLane( (CoreIntersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getEntryParaPointOfExternalLane(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getEntryParaPointOfInternalLane(self, arg1: CoreIntersection, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getEntryParaPointOfInternalLane( (CoreIntersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getEntryParaPointOfInternalLane(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getExitParaPointOfExternalLane(self, arg1: CoreIntersection, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getExitParaPointOfExternalLane( (CoreIntersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getExitParaPointOfExternalLane(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getExitParaPointOfInternalLane(self, arg1: CoreIntersection, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getExitParaPointOfInternalLane( (CoreIntersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getExitParaPointOfInternalLane(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + @property + def internalLanes(self) -> lane.LaneIdSet: ... + + def isIntersectionOnRoute(self, route: route.FullRoute) -> bool: + """ + + isIntersectionOnRoute( (FullRoute)route) -> bool : + + C++ signature : + bool isIntersectionOnRoute(ad::map::route::FullRoute) + """ + ... + + @staticmethod + def isLanePartOfAnIntersection(laneId: lane.LaneId) -> bool: + """ + + isLanePartOfAnIntersection( (LaneId)laneId) -> bool : + + C++ signature : + bool isLanePartOfAnIntersection(ad::map::lane::LaneId) + """ + ... + + @staticmethod + def isLanePartOfCoreIntersection(arg1: CoreIntersection, laneId: lane.LaneId) -> bool: + """ + + isLanePartOfCoreIntersection( (CoreIntersection)arg1, (LaneId)laneId) -> bool : + + C++ signature : + bool isLanePartOfCoreIntersection(CoreIntersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def isRoadSegmentEnteringIntersection(self, routeIterator: route.RouteIterator, routePreviousSegmentIter: object) -> bool: + """ + + isRoadSegmentEnteringIntersection( (RouteIterator)routeIterator, (object)routePreviousSegmentIter) -> bool : + + C++ signature : + bool isRoadSegmentEnteringIntersection(ad::map::route::RouteIterator,__gnu_cxx::__normal_iterator > > {lvalue}) + """ + ... + + def isRoutePartOfAnIntersection(self, route: route.FullRoute) -> bool: + """ + + isRoutePartOfAnIntersection( (FullRoute)route) -> bool : + + C++ signature : + bool isRoutePartOfAnIntersection(ad::map::route::FullRoute) + """ + ... + + def objectDistanceToIntersection(self, arg1: CoreIntersection, object: match.Object) -> ad.physics.Distance: + """ + + objectDistanceToIntersection( (CoreIntersection)arg1, (Object)object) -> Distance : + + C++ signature : + ad::physics::Distance objectDistanceToIntersection(ad::map::intersection::CoreIntersection {lvalue},ad::map::match::Object) + """ + ... + + def objectRouteCrossesIntersection(self, arg1: CoreIntersection, objectRoute: route.FullRoute) -> bool: + """ + + objectRouteCrossesIntersection( (CoreIntersection)arg1, (FullRoute)objectRoute) -> bool : + + C++ signature : + bool objectRouteCrossesIntersection(ad::map::intersection::CoreIntersection {lvalue},ad::map::route::FullRoute) + """ + ... + + def objectWithinIntersection(self, arg1: CoreIntersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectWithinIntersection( (CoreIntersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectWithinIntersection(ad::map::intersection::CoreIntersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + +class Intersection(CoreIntersection,): + @property + def BoundingSphere(self) -> Unknown: ... + + @property + def IntersectionStartOnRoute(self) -> Unknown: ... + + @property + def RoutePlanningCounter(self) -> Unknown: ... + + @property + def RouteSegmentCountFromDestination(self) -> Unknown: ... + + @property + def SpeedLimit(self) -> Unknown: ... + + @property + def applicableTrafficLights(self) -> Unknown: ... + + @property + def crossingLanes(self) -> Unknown: ... + + @property + def entryLanes(self) -> Unknown: ... + + @property + def entryParaPoints(self) -> Unknown: ... + + @property + def exitLanes(self) -> Unknown: ... + + @property + def exitParaPoints(self) -> Unknown: ... + + def extractLanesOfCoreIntersection(self, laneId: lane.LaneId) -> None: + """ + + extractLanesOfCoreIntersection( (Intersection)arg1, (LaneId)laneId) -> None : + + C++ signature : + void extractLanesOfCoreIntersection(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getEntryParaPointOfExternalLane(self, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getEntryParaPointOfExternalLane( (Intersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getEntryParaPointOfExternalLane(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getEntryParaPointOfInternalLane(self, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getEntryParaPointOfInternalLane( (Intersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getEntryParaPointOfInternalLane(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getExitParaPointOfExternalLane(self, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getExitParaPointOfExternalLane( (Intersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getExitParaPointOfExternalLane(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + def getExitParaPointOfInternalLane(self, laneId: lane.LaneId) -> point.ParaPoint: + """ + + getExitParaPointOfInternalLane( (Intersection)arg1, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getExitParaPointOfInternalLane(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + @staticmethod + def getIntersectionForRoadSegment(routeIterator: route.RouteIterator) -> Intersection: + """ + + getIntersectionForRoadSegment( (RouteIterator)routeIterator) -> Intersection : + + C++ signature : + std::shared_ptr getIntersectionForRoadSegment(ad::map::route::RouteIterator) + """ + ... + + @staticmethod + def getIntersectionsForRoute(route: route.FullRoute) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_Intersection_greater__greater_: + """ + + getIntersectionsForRoute( (FullRoute)route) -> vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_Intersection_greater__greater_ : + + C++ signature : + std::vector, std::allocator > > getIntersectionsForRoute(ad::map::route::FullRoute) + """ + ... + + @staticmethod + def getNextIntersectionOnRoute(route: route.FullRoute) -> Intersection: + """ + + getNextIntersectionOnRoute( (FullRoute)route) -> Intersection : + + C++ signature : + std::shared_ptr getNextIntersectionOnRoute(ad::map::route::FullRoute) + """ + ... + + @property + def incomingLanes(self) -> Unknown: ... + + @property + def incomingLanesOnRoute(self) -> Unknown: ... + + @property + def incomingLanesWithHigherPriority(self) -> Unknown: ... + + @property + def incomingLanesWithLowerPriority(self) -> Unknown: ... + + @property + def incomingParaPoints(self) -> Unknown: ... + + @property + def incomingParaPointsOnRoute(self) -> Unknown: ... + + @property + def incomingParaPointsWithHigherPriority(self) -> Unknown: ... + + @property + def incomingParaPointsWithLowerPriority(self) -> Unknown: ... + + @property + def internalLanes(self) -> Unknown: ... + + @property + def internalLanesWithHigherPriority(self) -> Unknown: ... + + @property + def internalLanesWithLowerPriority(self) -> Unknown: ... + + @property + def intersectionType(self) -> Unknown: ... + + def isLanePartOfCoreIntersection(self, arg1: Intersection, laneId: lane.LaneId) -> bool: + """ + + isLanePartOfCoreIntersection( (Intersection)arg1, (LaneId)laneId) -> bool : + + C++ signature : + bool isLanePartOfCoreIntersection(Intersection_wrapper {lvalue},ad::map::lane::LaneId) + """ + ... + + @property + def lanesOnRoute(self) -> Unknown: ... + + def objectInterpenetrationDistanceWithIntersection(self, arg1: Intersection, object: match.Object) -> ad.physics.Distance: + """ + + objectInterpenetrationDistanceWithIntersection( (Intersection)arg1, (Object)object) -> Distance : + + C++ signature : + ad::physics::Distance objectInterpenetrationDistanceWithIntersection(ad::map::intersection::Intersection {lvalue},ad::map::match::Object) + """ + ... + + def objectOnCrossingLane(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnCrossingLane( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnCrossingLane(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnIncomingLane(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnIncomingLane( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnIncomingLane(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnIncomingLaneWithHigherPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnIncomingLaneWithHigherPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnIncomingLaneWithHigherPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnIncomingLaneWithLowerPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnIncomingLaneWithLowerPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnIncomingLaneWithLowerPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnInternalLaneWithHigherPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnInternalLaneWithHigherPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnInternalLaneWithHigherPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnInternalLaneWithLowerPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnInternalLaneWithLowerPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnInternalLaneWithLowerPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnIntersectionRoute(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnIntersectionRoute( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnIntersectionRoute(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnLaneWithHigherPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnLaneWithHigherPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnLaneWithHigherPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectOnLaneWithLowerPriority(self, arg1: Intersection, object: match.MapMatchedObjectBoundingBox) -> bool: + """ + + objectOnLaneWithLowerPriority( (Intersection)arg1, (MapMatchedObjectBoundingBox)object) -> bool : + + C++ signature : + bool objectOnLaneWithLowerPriority(ad::map::intersection::Intersection {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + """ + ... + + def objectRouteCrossesIntersectionRoute(self, arg1: Intersection, objectRoute: route.FullRoute) -> bool: + """ + + objectRouteCrossesIntersectionRoute( (Intersection)arg1, (FullRoute)objectRoute) -> bool : + + C++ signature : + bool objectRouteCrossesIntersectionRoute(ad::map::intersection::Intersection {lvalue},ad::map::route::FullRoute) + """ + ... + + def objectRouteCrossesLanesWithHigherPriority(self, arg1: Intersection, objectRoute: route.FullRoute) -> bool: + """ + + objectRouteCrossesLanesWithHigherPriority( (Intersection)arg1, (FullRoute)objectRoute) -> bool : + + C++ signature : + bool objectRouteCrossesLanesWithHigherPriority(ad::map::intersection::Intersection {lvalue},ad::map::route::FullRoute) + """ + ... + + def objectRouteFromSameArmAsIntersectionRoute(self, arg1: Intersection, objectRoute: route.FullRoute) -> bool: + """ + + objectRouteFromSameArmAsIntersectionRoute( (Intersection)arg1, (FullRoute)objectRoute) -> bool : + + C++ signature : + bool objectRouteFromSameArmAsIntersectionRoute(ad::map::intersection::Intersection {lvalue},ad::map::route::FullRoute) + """ + ... + + def objectRouteOppositeToIntersectionRoute(self, arg1: Intersection, objectRoute: route.FullRoute) -> bool: + """ + + objectRouteOppositeToIntersectionRoute( (Intersection)arg1, (FullRoute)objectRoute) -> bool : + + C++ signature : + bool objectRouteOppositeToIntersectionRoute(ad::map::intersection::Intersection {lvalue},ad::map::route::FullRoute) + """ + ... + + def onlySolidTrafficLightsOnRoute(self, arg1: Intersection) -> bool: + """ + + onlySolidTrafficLightsOnRoute( (Intersection)arg1) -> bool : + + C++ signature : + bool onlySolidTrafficLightsOnRoute(ad::map::intersection::Intersection {lvalue}) + """ + ... + + @property + def outgoingLanes(self) -> Unknown: ... + + @property + def outgoingLanesOnRoute(self) -> Unknown: ... + + @property + def outgoingParaPoints(self) -> Unknown: ... + + @property + def outgoingParaPointsOnRoute(self) -> Unknown: ... + + @property + def paraPointsOnRoute(self) -> Unknown: ... + + @property + def turnDirection(self) -> Unknown: ... + + def updateRouteCounters(self, arg1: Intersection, newRoutePlanningCounter: object, newRouteSegmentCounter: object) -> None: + """ + + updateRouteCounters( (Intersection)arg1, (object)newRoutePlanningCounter, (object)newRouteSegmentCounter) -> None : + + C++ signature : + void updateRouteCounters(ad::map::intersection::Intersection {lvalue},unsigned long,unsigned long) + """ + ... + +class IntersectionType(int,): + AllWayStop = 3 + + Crosswalk = 5 + + HasWay = 4 + + PriorityToRight = 6 + + PriorityToRightAndStraight = 7 + + Stop = 2 + + TrafficLight = 8 + + Unknown = 0 + + Yield = 1 + +class TurnDirection(int,): + Left = 3 + + Right = 1 + + Straight = 2 + + UTurn = 4 + + Unknown = 0 + +class vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_(): + def append(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_, arg2: object) -> None: + """ + + append( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1, (object)arg2) -> None : + + C++ signature : + void append(std::vector, std::allocator > > {lvalue},std::shared_ptr) + """ + ... + + def count(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_, arg2: object) -> int: + """ + + count( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1, (object)arg2) -> int : + + C++ signature : + unsigned long count(std::vector, std::allocator > > {lvalue},std::shared_ptr) + """ + ... + + def extend(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_, arg2: object) -> None: + """ + + extend( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector, std::allocator > > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_, arg2: object) -> int: + """ + + index( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1, (object)arg2) -> int : + + C++ signature : + unsigned long index(std::vector, std::allocator > > {lvalue},std::shared_ptr) + """ + ... + + def insert(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_, arg2: int, arg3: object) -> None: + """ + + insert( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1, (int)arg2, (object)arg3) -> None : + + C++ signature : + void insert(std::vector, std::allocator > > {lvalue},long,std::shared_ptr) + """ + ... + + def reverse(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_) -> None: + """ + + reverse( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1) -> None : + + C++ signature : + void reverse(std::vector, std::allocator > > {lvalue}) + """ + ... + + def sort(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_) -> None: + """ + + sort( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_CoreIntersection_greater__greater_)arg1) -> None : + + C++ signature : + void sort(std::vector, std::allocator > > {lvalue}) + """ + ... + +class vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_Intersection_greater__greater_(ad._VectorSequence[Intersection]): + def sort(self, arg1: vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_Intersection_greater__greater_) -> None: + """ + + sort( (vector_less_std_scope_shared_ptr_less_ad_scope_map_scope_intersection_scope_Intersection_greater__greater_)arg1) -> None : + + C++ signature : + void sort(std::vector, std::allocator > > {lvalue}) + """ + ... + diff --git a/PythonAPI/carla/source/carla/ad/map/landmark.pyi b/PythonAPI/carla/source/carla/ad/map/landmark.pyi new file mode 100644 index 0000000000..2c222acb1a --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/landmark.pyi @@ -0,0 +1,530 @@ + +class ENULandmark: + def assign(self, arg1: ENULandmark, other: ENULandmark) -> ENULandmark: + """ + + assign( (ENULandmark)arg1, (ENULandmark)other) -> ENULandmark : + + C++ signature : + ad::map::landmark::ENULandmark {lvalue} assign(ad::map::landmark::ENULandmark {lvalue},ad::map::landmark::ENULandmark) + """ + ... + + @property + def heading(self) -> point.ENUHeading: ... + + @property + def id(self) -> LandmarkId: ... + + @property + def position(self) -> point.ENUPoint: ... + + @property + def trafficLightType(self) -> TrafficLightType: ... + + @property + def type(self) -> LandmarkType: ... + +class ENULandmarkList: + def append(self, arg1: ENULandmarkList, arg2: ENULandmark) -> None: + """ + + append( (ENULandmarkList)arg1, (ENULandmark)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::landmark::ENULandmark) + """ + ... + + def count(self, arg1: ENULandmarkList, arg2: ENULandmark) -> int: + """ + + count( (ENULandmarkList)arg1, (ENULandmark)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::landmark::ENULandmark) + """ + ... + + def extend(self, arg1: ENULandmarkList, arg2: object) -> None: + """ + + extend( (ENULandmarkList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ENULandmarkList, arg2: ENULandmark) -> int: + """ + + index( (ENULandmarkList)arg1, (ENULandmark)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::landmark::ENULandmark) + """ + ... + + def insert(self, arg1: ENULandmarkList, arg2: int, arg3: ENULandmark) -> None: + """ + + insert( (ENULandmarkList)arg1, (int)arg2, (ENULandmark)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::landmark::ENULandmark) + """ + ... + + def reverse(self, arg1: ENULandmarkList) -> None: + """ + + reverse( (ENULandmarkList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class Landmark: + def assign(self, arg1: Landmark, other: Landmark) -> Landmark: + """ + + assign( (Landmark)arg1, (Landmark)other) -> Landmark : + + C++ signature : + ad::map::landmark::Landmark {lvalue} assign(ad::map::landmark::Landmark {lvalue},ad::map::landmark::Landmark) + """ + ... + + @property + def boundingBox(self) -> point.Geometry: ... + + @property + def id(self) -> LandmarkId: ... + + @property + def orientation(self) -> point.ECEFPoint: ... + + @property + def position(self) -> point.ECEFPoint: ... + + @property + def supplementaryText(self) -> str: ... + + @property + def trafficLightType(self) -> TrafficLightType: ... + + @property + def trafficSignType(self) -> TrafficSignType: ... + + @property + def type(self) -> LandmarkType: ... + +class LandmarkId: + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: LandmarkId, other: LandmarkId) -> LandmarkId: + """ + + assign( (LandmarkId)arg1, (LandmarkId)other) -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId {lvalue} assign(ad::map::landmark::LandmarkId {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + cMaxValue: float = 18446744073709551615 + + cMinValue: float = 0 + + def ensureValid(self, arg1: LandmarkId) -> None: + """ + + ensureValid( (LandmarkId)arg1) -> None : + + C++ signature : + void ensureValid(ad::map::landmark::LandmarkId {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: LandmarkId) -> None: + """ + + ensureValidNonZero( (LandmarkId)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::map::landmark::LandmarkId {lvalue}) + """ + ... + + def getMax(self) -> LandmarkId: + """ + + getMax() -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId getMax() + """ + ... + + def getMin(self) -> LandmarkId: + """ + + getMin() -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId getMin() + """ + ... + +class LandmarkIdList: + def append(self, arg1: LandmarkIdList, arg2: LandmarkId) -> None: + """ + + append( (LandmarkIdList)arg1, (LandmarkId)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def count(self, arg1: LandmarkIdList, arg2: LandmarkId) -> int: + """ + + count( (LandmarkIdList)arg1, (LandmarkId)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def extend(self, arg1: LandmarkIdList, arg2: object) -> None: + """ + + extend( (LandmarkIdList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: LandmarkIdList, arg2: LandmarkId) -> int: + """ + + index( (LandmarkIdList)arg1, (LandmarkId)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def insert(self, arg1: LandmarkIdList, arg2: int, arg3: LandmarkId) -> None: + """ + + insert( (LandmarkIdList)arg1, (int)arg2, (LandmarkId)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::landmark::LandmarkId) + """ + ... + + def reverse(self, arg1: LandmarkIdList) -> None: + """ + + reverse( (LandmarkIdList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: LandmarkIdList) -> None: + """ + + sort( (LandmarkIdList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class LandmarkIdSet: + def add(self, arg1: LandmarkIdSet, arg2: LandmarkId) -> None: + """ + + add( (LandmarkIdSet)arg1, (LandmarkId)arg2) -> None : + + C++ signature : + void add(std::set, std::allocator > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def count(self, arg1: LandmarkIdSet, arg2: LandmarkId) -> int: + """ + + count( (LandmarkIdSet)arg1, (LandmarkId)arg2) -> int : + + C++ signature : + unsigned long count(std::set, std::allocator > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def has_key(self, arg1: LandmarkIdSet, arg2: LandmarkId) -> bool: + """ + + has_key( (LandmarkIdSet)arg1, (LandmarkId)arg2) -> bool : + + C++ signature : + bool has_key(std::set, std::allocator > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + + def insert(self, arg1: LandmarkIdSet, arg2: LandmarkId) -> None: + """ + + insert( (LandmarkIdSet)arg1, (LandmarkId)arg2) -> None : + + C++ signature : + void insert(std::set, std::allocator > {lvalue},ad::map::landmark::LandmarkId) + """ + ... + +class LandmarkType(int): + BOLLARD = 12 + + FIRE_HYDRANT = 11 + + GUIDE_POST = 5 + + INVALID = 0 + + MANHOLE = 9 + + OTHER = 13 + + POLE = 4 + + POSTBOX = 8 + + POWERCABINET = 10 + + STREET_LAMP = 7 + + TRAFFIC_LIGHT = 3 + + TRAFFIC_SIGN = 2 + + TREE = 6 + + UNKNOWN = 1 + +class TrafficLightType(int): + BIKE_PEDESTRIAN_RED_GREEN = 11 + + BIKE_PEDESTRIAN_RED_YELLOW_GREEN = 14 + + BIKE_RED_GREEN = 10 + + BIKE_RED_YELLOW_GREEN = 13 + + INVALID = 0 + + LEFT_RED_YELLOW_GREEN = 4 + + LEFT_STRAIGHT_RED_YELLOW_GREEN = 7 + + PEDESTRIAN_RED_GREEN = 9 + + PEDESTRIAN_RED_YELLOW_GREEN = 12 + + RIGHT_RED_YELLOW_GREEN = 5 + + RIGHT_STRAIGHT_RED_YELLOW_GREEN = 8 + + SOLID_RED_YELLOW = 2 + + SOLID_RED_YELLOW_GREEN = 3 + + STRAIGHT_RED_YELLOW_GREEN = 6 + + UNKNOWN = 1 + +class TrafficSignType(int): + ACCESS_FORBIDDEN = 43 + + ACCESS_FORBIDDEN_BICYCLE = 45 + + ACCESS_FORBIDDEN_HEIGHT = 49 + + ACCESS_FORBIDDEN_MOTORVEHICLES = 46 + + ACCESS_FORBIDDEN_TRUCKS = 44 + + ACCESS_FORBIDDEN_WEIGHT = 47 + + ACCESS_FORBIDDEN_WIDTH = 48 + + ACCESS_FORBIDDEN_WRONG_DIR = 50 + + BYBICLE_PATH = 37 + + CAUTION_ANIMALS = 23 + + CAUTION_BICYCLE = 22 + + CAUTION_CHILDREN = 21 + + CAUTION_PEDESTRIAN = 20 + + CAUTION_RAIL_CROSSING = 25 + + CAUTION_RAIL_CROSSING_WITH_BARRIER = 24 + + CITY_BEGIN = 58 + + CITY_END = 59 + + CUL_DE_SAC = 65 + + CUL_DE_SAC_EXCEPT_PED_BICYCLE = 66 + + DANGER = 18 + + DESTINATION_BOARD = 70 + + DIRECTION_TURN_TO_AUTOBAHN = 68 + + DIRECTION_TURN_TO_LOCAL = 69 + + ENVIORNMENT_ZONE_BEGIN = 51 + + ENVIORNMENT_ZONE_END = 52 + + FOOTWALK = 38 + + FOOTWALK_BICYCLE_SEP_LEFT = 41 + + FOOTWALK_BICYCLE_SEP_RIGHT = 40 + + FOOTWALK_BICYCLE_SHARED = 39 + + FREE_TEXT = 71 + + HAS_WAY_NEXT_INTERSECTION = 56 + + INFO_MOTORWAY_INFO = 64 + + INFO_NUMBER_OF_AUTOBAHN = 67 + + INVALID = 0 + + LANES_MERGING = 19 + + MAX_SPEED = 53 + + MOTORVEHICLE_BEGIN = 62 + + MOTORVEHICLE_END = 63 + + MOTORWAY_BEGIN = 60 + + MOTORWAY_END = 61 + + PASS_LEFT = 36 + + PASS_RIGHT = 35 + + PEDESTRIAN_AREA_BEGIN = 42 + + PRIORITY_WAY = 57 + + REQUIRED_LEFT_TURN = 30 + + REQUIRED_RIGHT_TURN = 29 + + REQUIRED_STRAIGHT = 31 + + REQUIRED_STRAIGHT_OR_LEFT_TURN = 33 + + REQUIRED_STRAIGHT_OR_RIGHT_TURN = 32 + + ROUNDABOUT = 34 + + SPEED_ZONE_30_BEGIN = 54 + + SPEED_ZONE_30_END = 55 + + STOP = 28 + + SUPPLEMENT_APPLIES_FOR_WEIGHT = 17 + + SUPPLEMENT_APPLIES_NEXT_N_KM_TIME = 7 + + SUPPLEMENT_ARROW_APPLIES_LEFT = 1 + + SUPPLEMENT_ARROW_APPLIES_LEFT_RIGHT = 3 + + SUPPLEMENT_ARROW_APPLIES_LEFT_RIGHT_BICYCLE = 5 + + SUPPLEMENT_ARROW_APPLIES_RIGHT = 2 + + SUPPLEMENT_ARROW_APPLIES_UP_DOWN = 4 + + SUPPLEMENT_ARROW_APPLIES_UP_DOWN_BICYCLE = 6 + + SUPPLEMENT_BICYCLE_ALLOWED = 10 + + SUPPLEMENT_CONSTRUCTION_VEHICLE_ALLOWED = 14 + + SUPPLEMENT_ENDS = 8 + + SUPPLEMENT_ENVIRONMENT_ZONE_YELLOW_GREEN = 15 + + SUPPLEMENT_FORESTAL_ALLOWED = 13 + + SUPPLEMENT_MOPED_ALLOWED = 11 + + SUPPLEMENT_RAILWAY_ONLY = 16 + + SUPPLEMENT_RESIDENTS_ALLOWED = 9 + + SUPPLEMENT_TRAM_ALLOWED = 12 + + UNKNOWN = 72 + + YIELD = 27 + + YIELD_TRAIN = 26 + +class numeric_limits_less__ad_scope_map_scope_landmark_scope_LandmarkId__greater_: + def epsilon(self) -> LandmarkId: + """ + + epsilon() -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId epsilon() + """ + ... + + def lowest(self) -> LandmarkId: + """ + + lowest() -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId lowest() + """ + ... + + def max(self) -> LandmarkId: + """ + + max() -> LandmarkId : + + C++ signature : + ad::map::landmark::LandmarkId max() + """ + ... diff --git a/PythonAPI/carla/source/carla/ad/map/lane.pyi b/PythonAPI/carla/source/carla/ad/map/lane.pyi new file mode 100644 index 0000000000..eb756544bc --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/lane.pyi @@ -0,0 +1,1600 @@ +from typing import overload +import ad + +from . import * + +# TODO constants and functions + +def getLane(laneId: LaneId) -> Lane: + """ + getLane( (LaneId)laneId) -> Lane : + + C++ signature : + ad::map::lane::Lane getLane(ad::map::lane::LaneId) + """ + ... + +class ContactLane: + def assign(self, arg1: ContactLane, other: ContactLane) -> ContactLane: + """ + + assign( (ContactLane)arg1, (ContactLane)other) -> ContactLane : + + C++ signature : + ad::map::lane::ContactLane {lvalue} assign(ad::map::lane::ContactLane {lvalue},ad::map::lane::ContactLane) + """ + ... + + @property + def location(self) -> ContactLocation: ... + + @property + def restrictions(self) -> restriction.Restrictions: ... + + @property + def toLane(self) -> LaneId: ... + + @property + def trafficLightId(self) -> landmark.LandmarkId: ... + + @property + def types(self) -> ContactTypeList: ... + +class ContactLaneList: + def append(self, arg1: ContactLaneList, arg2: ContactLane) -> None: + """ + + append( (ContactLaneList)arg1, (ContactLane)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::ContactLane) + """ + ... + + def count(self, arg1: ContactLaneList, arg2: ContactLane) -> int: + """ + + count( (ContactLaneList)arg1, (ContactLane)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::ContactLane) + """ + ... + + def extend(self, arg1: ContactLaneList, arg2: object) -> None: + """ + + extend( (ContactLaneList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ContactLaneList, arg2: ContactLane) -> int: + """ + + index( (ContactLaneList)arg1, (ContactLane)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::ContactLane) + """ + ... + + def insert(self, arg1: ContactLaneList, arg2: int, arg3: ContactLane) -> None: + """ + + insert( (ContactLaneList)arg1, (int)arg2, (ContactLane)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::ContactLane) + """ + ... + + def reverse(self, arg1: ContactLaneList) -> None: + """ + + reverse( (ContactLaneList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class ContactLocation(int): + INVALID = 0 + + LEFT = 2 + + OVERLAP = 6 + + PREDECESSOR = 5 + + RIGHT = 3 + + SUCCESSOR = 4 + + UNKNOWN = 1 + +class ContactLocationList: + def append(self, arg1: ContactLocationList, arg2: ContactLocation) -> None: + """ + + append( (ContactLocationList)arg1, (ContactLocation)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::ContactLocation) + """ + ... + + def count(self, arg1: ContactLocationList, arg2: ContactLocation) -> int: + """ + + count( (ContactLocationList)arg1, (ContactLocation)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::ContactLocation) + """ + ... + + def extend(self, arg1: ContactLocationList, arg2: object) -> None: + """ + + extend( (ContactLocationList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ContactLocationList, arg2: ContactLocation) -> int: + """ + + index( (ContactLocationList)arg1, (ContactLocation)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::ContactLocation) + """ + ... + + def insert(self, arg1: ContactLocationList, arg2: int, arg3: ContactLocation) -> None: + """ + + insert( (ContactLocationList)arg1, (int)arg2, (ContactLocation)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::ContactLocation) + """ + ... + + def reverse(self, arg1: ContactLocationList) -> None: + """ + + reverse( (ContactLocationList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: ContactLocationList) -> None: + """ + + sort( (ContactLocationList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class ContactType(int): + CROSSWALK = 18 + + CURB_DOWN = 15 + + CURB_UP = 14 + + FREE = 2 + + GATE_BARRIER = 10 + + GATE_SPIKES = 12 + + GATE_SPIKES_CONTRA = 13 + + GATE_TOLBOOTH = 11 + + INVALID = 0 + + LANE_CHANGE = 3 + + LANE_CONTINUATION = 4 + + LANE_END = 5 + + PRIO_TO_RIGHT = 19 + + PRIO_TO_RIGHT_AND_STRAIGHT = 21 + + RIGHT_OF_WAY = 20 + + SINGLE_POINT = 6 + + SPEED_BUMP = 16 + + STOP = 7 + + STOP_ALL = 8 + + TRAFFIC_LIGHT = 17 + + UNKNOWN = 1 + + YIELD = 9 + +class ContactTypeList: + def append(self, arg1: ContactTypeList, arg2: ContactType) -> None: + """ + + append( (ContactTypeList)arg1, (ContactType)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::ContactType) + """ + ... + + def count(self, arg1: ContactTypeList, arg2: ContactType) -> int: + """ + + count( (ContactTypeList)arg1, (ContactType)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::ContactType) + """ + ... + + def extend(self, arg1: ContactTypeList, arg2: object) -> None: + """ + + extend( (ContactTypeList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ContactTypeList, arg2: ContactType) -> int: + """ + + index( (ContactTypeList)arg1, (ContactType)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::ContactType) + """ + ... + + def insert(self, arg1: ContactTypeList, arg2: int, arg3: ContactType) -> None: + """ + + insert( (ContactTypeList)arg1, (int)arg2, (ContactType)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::ContactType) + """ + ... + + def reverse(self, arg1: ContactTypeList) -> None: + """ + + reverse( (ContactTypeList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: ContactTypeList) -> None: + """ + + sort( (ContactTypeList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class ECEFBorder: + def assign(self, arg1: ECEFBorder, other: ECEFBorder) -> ECEFBorder: + """ + + assign( (ECEFBorder)arg1, (ECEFBorder)other) -> ECEFBorder : + + C++ signature : + ad::map::lane::ECEFBorder {lvalue} assign(ad::map::lane::ECEFBorder {lvalue},ad::map::lane::ECEFBorder) + """ + ... + + @property + def left(self) -> point.ECEFEdge: ... + + @property + def right(self) -> point.ECEFEdge: ... + +class ECEFBorderList: + def append(self, arg1: ECEFBorderList, arg2: ECEFBorder) -> None: + """ + + append( (ECEFBorderList)arg1, (ECEFBorder)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::ECEFBorder) + """ + ... + + def count(self, arg1: ECEFBorderList, arg2: ECEFBorder) -> int: + """ + + count( (ECEFBorderList)arg1, (ECEFBorder)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::ECEFBorder) + """ + ... + + def extend(self, arg1: ECEFBorderList, arg2: object) -> None: + """ + + extend( (ECEFBorderList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ECEFBorderList, arg2: ECEFBorder) -> int: + """ + + index( (ECEFBorderList)arg1, (ECEFBorder)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::ECEFBorder) + """ + ... + + def insert(self, arg1: ECEFBorderList, arg2: int, arg3: ECEFBorder) -> None: + """ + + insert( (ECEFBorderList)arg1, (int)arg2, (ECEFBorder)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::ECEFBorder) + """ + ... + + def reverse(self, arg1: ECEFBorderList) -> None: + """ + + reverse( (ECEFBorderList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class ENUBorder: + def assign(self, arg1: ENUBorder, other: ENUBorder) -> ENUBorder: + """ + + assign( (ENUBorder)arg1, (ENUBorder)other) -> ENUBorder : + + C++ signature : + ad::map::lane::ENUBorder {lvalue} assign(ad::map::lane::ENUBorder {lvalue},ad::map::lane::ENUBorder) + """ + ... + + @property + def left(self) -> point.ENUEdge: ... + + @property + def right(self) -> point.ENUEdge: ... + +class ENUBorderList: + def append(self, arg1: ENUBorderList, arg2: ENUBorder) -> None: + """ + + append( (ENUBorderList)arg1, (ENUBorder)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::ENUBorder) + """ + ... + + def count(self, arg1: ENUBorderList, arg2: ENUBorder) -> int: + """ + + count( (ENUBorderList)arg1, (ENUBorder)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::ENUBorder) + """ + ... + + def extend(self, arg1: ENUBorderList, arg2: object) -> None: + """ + + extend( (ENUBorderList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ENUBorderList, arg2: ENUBorder) -> int: + """ + + index( (ENUBorderList)arg1, (ENUBorder)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::ENUBorder) + """ + ... + + def insert(self, arg1: ENUBorderList, arg2: int, arg3: ENUBorder) -> None: + """ + + insert( (ENUBorderList)arg1, (int)arg2, (ENUBorder)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::ENUBorder) + """ + ... + + def reverse(self, arg1: ENUBorderList) -> None: + """ + + reverse( (ENUBorderList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class GeoBorder: + def assign(self, arg1: GeoBorder, other: GeoBorder) -> GeoBorder: + """ + + assign( (GeoBorder)arg1, (GeoBorder)other) -> GeoBorder : + + C++ signature : + ad::map::lane::GeoBorder {lvalue} assign(ad::map::lane::GeoBorder {lvalue},ad::map::lane::GeoBorder) + """ + ... + + @property + def left(self) -> point.GeoEdge: ... + + @property + def right(self) -> point.GeoEdge: ... + +class GeoBorderList: + def append(self, arg1: GeoBorderList, arg2: GeoBorder) -> None: + """ + + append( (GeoBorderList)arg1, (GeoBorder)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::GeoBorder) + """ + ... + + def count(self, arg1: GeoBorderList, arg2: GeoBorder) -> int: + """ + + count( (GeoBorderList)arg1, (GeoBorder)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::GeoBorder) + """ + ... + + def extend(self, arg1: GeoBorderList, arg2: object) -> None: + """ + + extend( (GeoBorderList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: GeoBorderList, arg2: GeoBorder) -> int: + """ + + index( (GeoBorderList)arg1, (GeoBorder)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::GeoBorder) + """ + ... + + def insert(self, arg1: GeoBorderList, arg2: int, arg3: GeoBorder) -> None: + """ + + insert( (GeoBorderList)arg1, (int)arg2, (GeoBorder)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::GeoBorder) + """ + ... + + def reverse(self, arg1: GeoBorderList) -> None: + """ + + reverse( (GeoBorderList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class Lane: + def assign(self, arg1: Lane, other: Lane) -> Lane: + """ + + assign( (Lane)arg1, (Lane)other) -> Lane : + + C++ signature : + ad::map::lane::Lane {lvalue} assign(ad::map::lane::Lane {lvalue},ad::map::lane::Lane) + """ + ... + + @property + def boundingSphere(self) -> point.BoundingSphere: ... + + @property + def complianceVersion(self) -> int: ... + + @property + def contactLanes(self) -> ContactLaneList: ... + + @property + def direction(self) -> LaneDirection: ... + + @property + def edgeLeft(self) -> point.Geometry: ... + + @property + def edgeRight(self) -> point.Geometry: ... + + @property + def id(self) -> LaneId: ... + + @property + def length(self) -> ad.physics.Distance: ... + + @property + def lengthRange(self) -> ad.physics.MetricRange: ... + + @property + def restrictions(self) -> restriction.Restrictions: ... + + @property + def speedLimits(self) -> restriction.SpeedLimitList: ... + + @property + def type(self) -> LaneType: ... + + @property + def visibleLandmarks(self) -> landmark.LandmarkIdList: ... + + @property + def width(self) -> ad.physics.Distance: ... + + @property + def widthRange(self) -> ad.physics.MetricRange: ... + +class LaneAltitudeRange: + @property + def maximum(self) -> point.Altitude: ... + + @property + def minimum(self) -> point.Altitude: ... + +class LaneDirection(int): + BIDIRECTIONAL = 5 + + INVALID = 0 + + NEGATIVE = 3 + + NONE = 6 + + POSITIVE = 2 + + REVERSABLE = 4 + + UNKNOWN = 1 + +class LaneId: + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: LaneId, other: LaneId) -> LaneId: + """ + + assign( (LaneId)arg1, (LaneId)other) -> LaneId : + + C++ signature : + ad::map::lane::LaneId {lvalue} assign(ad::map::lane::LaneId {lvalue},ad::map::lane::LaneId) + """ + ... + + cMaxValue: float = 18446744073709551615 + + cMinValue: float = 0 + + def ensureValid(self, arg1: LaneId) -> None: + """ + + ensureValid( (LaneId)arg1) -> None : + + C++ signature : + void ensureValid(ad::map::lane::LaneId {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: LaneId) -> None: + """ + + ensureValidNonZero( (LaneId)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::map::lane::LaneId {lvalue}) + """ + ... + + def getMax(self) -> LaneId: + """ + + getMax() -> LaneId : + + C++ signature : + ad::map::lane::LaneId getMax() + """ + ... + + def getMin(self) -> LaneId: + """ + + getMin() -> LaneId : + + C++ signature : + ad::map::lane::LaneId getMin() + """ + ... + +class LaneIdList: + def append(self, arg1: LaneIdList, arg2: LaneId) -> None: + """ + + append( (LaneIdList)arg1, (LaneId)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::lane::LaneId) + """ + ... + + def count(self, arg1: LaneIdList, arg2: LaneId) -> int: + """ + + count( (LaneIdList)arg1, (LaneId)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::lane::LaneId) + """ + ... + + def extend(self, arg1: LaneIdList, arg2: object) -> None: + """ + + extend( (LaneIdList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: LaneIdList, arg2: LaneId) -> int: + """ + + index( (LaneIdList)arg1, (LaneId)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::lane::LaneId) + """ + ... + + def insert(self, arg1: LaneIdList, arg2: int, arg3: LaneId) -> None: + """ + + insert( (LaneIdList)arg1, (int)arg2, (LaneId)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::lane::LaneId) + """ + ... + + def reverse(self, arg1: LaneIdList) -> None: + """ + + reverse( (LaneIdList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: LaneIdList) -> None: + """ + + sort( (LaneIdList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class LaneIdSet: + def add(self, arg1: LaneIdSet, arg2: LaneId) -> None: + """ + + add( (LaneIdSet)arg1, (LaneId)arg2) -> None : + + C++ signature : + void add(std::set, std::allocator > {lvalue},ad::map::lane::LaneId) + """ + ... + + def count(self, arg1: LaneIdSet, arg2: LaneId) -> int: + """ + + count( (LaneIdSet)arg1, (LaneId)arg2) -> int : + + C++ signature : + unsigned long count(std::set, std::allocator > {lvalue},ad::map::lane::LaneId) + """ + ... + + def has_key(self, arg1: LaneIdSet, arg2: LaneId) -> bool: + """ + + has_key( (LaneIdSet)arg1, (LaneId)arg2) -> bool : + + C++ signature : + bool has_key(std::set, std::allocator > {lvalue},ad::map::lane::LaneId) + """ + ... + + def insert(self, arg1: LaneIdSet, arg2: LaneId) -> None: + """ + + insert( (LaneIdSet)arg1, (LaneId)arg2) -> None : + + C++ signature : + void insert(std::set, std::allocator > {lvalue},ad::map::lane::LaneId) + """ + ... + +class LaneType(int): + BIKE = 10 + + EMERGENCY = 5 + + INTERSECTION = 3 + + INVALID = 0 + + MULTI = 6 + + NORMAL = 2 + + OVERTAKING = 8 + + PEDESTRIAN = 7 + + SHOULDER = 4 + + TURN = 9 + + UNKNOWN = 1 + +class numeric_limits_less__ad_scope_map_scope_lane_scope_LaneId__greater_: + def epsilon(self) -> LaneId: + """ + + epsilon() -> LaneId : + + C++ signature : + ad::map::lane::LaneId epsilon() + """ + ... + + def lowest(self) -> LaneId: + """ + + lowest() -> LaneId : + + C++ signature : + ad::map::lane::LaneId lowest() + """ + ... + + def max(self) -> LaneId: + """ + + max() -> LaneId : + + C++ signature : + ad::map::lane::LaneId max() + """ + ... + +def calcLaneAltitudeRange(lane: Lane) -> LaneAltitudeRange: + """ + + calcLaneAltitudeRange( (Lane)lane) -> LaneAltitudeRange : + + C++ signature : + ad::map::lane::LaneAltitudeRange calcLaneAltitudeRange(ad::map::lane::Lane) + """ + +def calcLength(laneId: LaneId | match.LaneOccupiedRegion | ENUBorder | ECEFBorder | GeoBorder | ENUBorderList | ECEFBorderList | GeoBorderList) -> ad.physics.Distance: + """ + + calcLength( (LaneId)laneId) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(ad::map::lane::LaneId) + + calcLength( (LaneOccupiedRegion)laneOccupiedRegion) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(ad::map::match::LaneOccupiedRegion) + + calcLength( (ENUBorder)border) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(ad::map::lane::ENUBorder) + + calcLength( (ECEFBorder)border) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(ad::map::lane::ECEFBorder) + + calcLength( (GeoBorder)border) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(ad::map::lane::GeoBorder) + + calcLength( (ENUBorderList)borderList) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(std::vector >) + + calcLength( (ECEFBorderList)borderList) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(std::vector >) + + calcLength( (GeoBorderList)borderList) -> Distance : + + C++ signature : + ad::physics::Distance calcLength(std::vector >) + """ + +def calcWidth(obj: point.ParaPoint | LaneId | ad.physics.ParametricValue | point.ENUPoint | match.LaneOccupiedRegion) -> ad.physics.Distance: + """ + + calcWidth( (ParaPoint)paraPoint) -> Distance : + + C++ signature : + ad::physics::Distance calcWidth(ad::map::point::ParaPoint) + + calcWidth( (LaneId)laneId, (ParametricValue)longOffset) -> Distance : + + C++ signature : + ad::physics::Distance calcWidth(ad::map::lane::LaneId,ad::physics::ParametricValue) + + calcWidth( (ENUPoint)enuPoint) -> Distance : + + C++ signature : + ad::physics::Distance calcWidth(ad::map::point::ENUPoint) + + calcWidth( (LaneOccupiedRegion)laneOccupiedRegion) -> Distance : + + C++ signature : + ad::physics::Distance calcWidth(ad::map::match::LaneOccupiedRegion) + """ + +def findNearestPointOnLane(lane: Lane, pt: point.ECEFPoint, mmpos: match.MapMatchedPosition) -> bool: + """ + + findNearestPointOnLane( (Lane)lane, (ECEFPoint)pt, (MapMatchedPosition)mmpos) -> bool : + + C++ signature : + bool findNearestPointOnLane(ad::map::lane::Lane,ad::map::point::ECEFPoint,ad::map::match::MapMatchedPosition {lvalue}) + """ + +def findNearestPointOnLaneInterval(laneInterval: route.LaneInterval, pt: point.ECEFPoint, mmpos: match.MapMatchedPosition) -> bool: + """ + + findNearestPointOnLaneInterval( (LaneInterval)laneInterval, (ECEFPoint)pt, (MapMatchedPosition)mmpos) -> bool : + + C++ signature : + bool findNearestPointOnLaneInterval(ad::map::route::LaneInterval,ad::map::point::ECEFPoint,ad::map::match::MapMatchedPosition {lvalue}) + """ + +def fromString(str: str) -> ContactLocation | LaneType | ContactType | LaneDirection: + """ + + fromString( (str)str) -> ContactLocation : + + C++ signature : + ad::map::lane::ContactLocation fromString(std::__cxx11::basic_string, std::allocator >) + + fromString( (str)str) -> LaneType : + + C++ signature : + ad::map::lane::LaneType fromString(std::__cxx11::basic_string, std::allocator >) + + fromString( (str)str) -> ContactType : + + C++ signature : + ad::map::lane::ContactType fromString(std::__cxx11::basic_string, std::allocator >) + + fromString( (str)str) -> LaneDirection : + + C++ signature : + ad::map::lane::LaneDirection fromString(std::__cxx11::basic_string, std::allocator >) + """ + +def getContactLanes(lane: Lane, location: ContactLocation | ContactLocationList) -> ContactLaneList: + """ + + getContactLanes( (Lane)lane, (ContactLocation)location) -> ContactLaneList : + + C++ signature : + std::vector > getContactLanes(ad::map::lane::Lane,ad::map::lane::ContactLocation) + + getContactLanes( (Lane)lane, (ContactLocationList)locations) -> ContactLaneList : + + C++ signature : + std::vector > getContactLanes(ad::map::lane::Lane,std::vector >) + """ + +def getContactLocation(lane: Lane, to_lane_id: LaneId) -> ContactLocation: + """ + + getContactLocation( (Lane)lane, (LaneId)to_lane_id) -> ContactLocation : + + C++ signature : + ad::map::lane::ContactLocation getContactLocation(ad::map::lane::Lane,ad::map::lane::LaneId) + """ + +def getDirectNeighborhoodRelation(laneId: LaneId, checkLaneId: LaneId) -> ContactLocation: + """ + + getDirectNeighborhoodRelation( (LaneId)laneId, (LaneId)checkLaneId) -> ContactLocation : + + C++ signature : + ad::map::lane::ContactLocation getDirectNeighborhoodRelation(ad::map::lane::LaneId,ad::map::lane::LaneId) + """ + +def getDistanceEnuPointToLateralAlignmentEdge(enuPoint: point.ENUPoint, lateralAlignmentEdge: point.ENUEdge) -> ad.physics.Distance: + """ + + getDistanceEnuPointToLateralAlignmentEdge( (ENUPoint)enuPoint, (ENUEdge)lateralAlignmentEdge) -> Distance : + + C++ signature : + ad::physics::Distance getDistanceEnuPointToLateralAlignmentEdge(ad::map::point::ENUPoint,std::vector >) + """ + +def getDistanceToLane(laneId: LaneId, object: rss.world.Object) -> ad.physics.Distance: + """ + + getDistanceToLane( (LaneId)laneId, (Object)object) -> Distance : + + C++ signature : + ad::physics::Distance getDistanceToLane(ad::map::lane::LaneId,ad::map::match::Object) + """ + +def getDuration(lane: Lane, range: ad.physics.ParametricRange) -> ad.physics.Duration: + """ + + getDuration( (Lane)lane, (ParametricRange)range) -> Duration : + + C++ signature : + ad::physics::Duration getDuration(ad::map::lane::Lane,ad::physics::ParametricRange) + """ + +def getENUHeading(borderList: ENUBorderList, enuPoint: point.ENUPoint) -> point.ENUHeading: + """ + + getENUHeading( (ENUBorderList)borderList, (ENUPoint)enuPoint) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getENUHeading(std::vector >,ad::map::point::ENUPoint) + """ + +def getENULanePoint(parametricPoint: point.ParaPoint, lateralOffset: ad.physics.ParametricValue) -> point.ENUHeading: + """ + + getENULanePoint( (ParaPoint)parametricPoint [, (ParametricValue)lateralOffset=]) -> ENUPoint : + + C++ signature : + ad::map::point::ENUPoint getENULanePoint(ad::map::point::ParaPoint [,ad::physics::ParametricValue=]) + """ + +def getEndPoint(lane: Lane) -> point.ECEFPoint: + """ + + getEndPoint( (Lane)lane) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint getEndPoint(ad::map::lane::Lane) + """ + +def getHOV(lane: Lane) -> int: + """ + + getHOV( (Lane)lane) -> int : + + C++ signature : + unsigned short getHOV(ad::map::lane::Lane) + """ + +def getLane(id: LaneId) -> Lane: + """ + + getLane( (LaneId)id) -> Lane : + + C++ signature : + ad::map::lane::Lane getLane(ad::map::lane::LaneId) + """ + +def getLaneECEFHeading(position: match.MapMatchedPosition | point.ParaPoint, /) -> point.ECEFHeading: + """ + + getLaneECEFHeading( (MapMatchedPosition)mapMatchedPosition) -> ECEFHeading : + + C++ signature : + ad::map::point::ECEFHeading getLaneECEFHeading(ad::map::match::MapMatchedPosition) + + getLaneECEFHeading( (ParaPoint)paraPoint) -> ECEFHeading : + + C++ signature : + ad::map::point::ECEFHeading getLaneECEFHeading(ad::map::point::ParaPoint) + """ + + +@overload +def getLaneENUHeading(position: match.MapMatchedPosition | point.ParaPoint, /): + """ + + getLaneENUHeading( (MapMatchedPosition)mapMatchedPosition) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::match::MapMatchedPosition) + + getLaneENUHeading( (ParaPoint)paraPoint, (GeoPoint)gnssReference) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::point::ParaPoint,ad::map::point::GeoPoint) + + getLaneENUHeading( (ParaPoint)position) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::point::ParaPoint) + """ + +@overload +def getLaneENUHeading(paraPoint: point.ParaPoint, gnssReference: point.GeoPoint) -> point.ENUHeading: + """ + + getLaneENUHeading( (MapMatchedPosition)mapMatchedPosition) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::match::MapMatchedPosition) + + getLaneENUHeading( (ParaPoint)paraPoint, (GeoPoint)gnssReference) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::point::ParaPoint,ad::map::point::GeoPoint) + + getLaneENUHeading( (ParaPoint)position) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::point::ParaPoint) + """ + +def getLanePtr(id: LaneId) -> Lane: + """ + + getLanePtr( (LaneId)id) -> Lane : + + C++ signature : + std::shared_ptr getLanePtr(ad::map::lane::LaneId) + """ + +def getLanes() -> LaneIdList: + """ + + getLanes() -> LaneIdList : + + C++ signature : + std::vector > getLanes() + """ + +def getLateralAlignmentEdge(border: ENUBorder, lateralAlignment: ad.physics.ParametricValue) -> point.ENUEdge: + """ + + getLateralAlignmentEdge( (ENUBorder)border, (ParametricValue)lateralAlignment) -> ENUEdge : + + C++ signature : + std::vector > getLateralAlignmentEdge(ad::map::lane::ENUBorder,ad::physics::ParametricValue) + """ + +def getMaxSpeed(lane: Lane, range: ad.physics.ParametricRange) -> ad.physics.Speed: + """ + + getMaxSpeed( (Lane)lane, (ParametricRange)range) -> Speed : + + C++ signature : + ad::physics::Speed getMaxSpeed(ad::map::lane::Lane,ad::physics::ParametricRange) + """ + +def getParametricPoint(lane: Lane, longitudinalOffset: ad.physics.ParametricValue, lateralOffset: ad.physics.ParametricValue) -> point.ECEFPoint: + """ + + getParametricPoint( (Lane)lane, (ParametricValue)longitudinalOffset, (ParametricValue)lateralOffset) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint getParametricPoint(ad::map::lane::Lane,ad::physics::ParametricValue,ad::physics::ParametricValue) + """ + +def getProjectedParametricPoint(lane: Lane, longitudinalOffset: ad.physics.ParametricValue, lateralOffset: ad.physics.ParametricValue) -> point.ECEFPoint: + """ + + getProjectedParametricPoint( (Lane)lane, (ParametricValue)longitudinalOffset, (ParametricValue)lateralOffset) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint getProjectedParametricPoint(ad::map::lane::Lane,ad::physics::ParametricValue,ad::physics::ParametricValue) + """ + +def getSpeedLimits(lane: Lane, range: ad.physics.ParametricRange) -> restriction.SpeedLimitList: + """ + + getSpeedLimits( (Lane)lane, (ParametricRange)range) -> SpeedLimitList : + + C++ signature : + std::vector > getSpeedLimits(ad::map::lane::Lane,ad::physics::ParametricRange) + """ + +def getStartPoint(lane: Lane) -> point.ECEFPoint: + """ + + getStartPoint( (Lane)lane) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint getStartPoint(ad::map::lane::Lane) + """ + +def getWidth(lane: Lane, longitudinalOffset: ad.physics.ParametricValue) -> ad.physics.Distance: + """ + + getWidth( (Lane)lane, (ParametricValue)longitudinalOffset) -> Distance : + + C++ signature : + ad::physics::Distance getWidth(ad::map::lane::Lane,ad::physics::ParametricValue) + """ + +def isAccessOk(lane: Lane | ContactLane, vehicle: restriction.VehicleDescriptor) -> bool: + """ + + isAccessOk( (Lane)lane, (VehicleDescriptor)vehicle) -> bool : + + C++ signature : + bool isAccessOk(ad::map::lane::Lane,ad::map::restriction::VehicleDescriptor) + + isAccessOk( (ContactLane)contactLane, (VehicleDescriptor)vehicle) -> bool : + + C++ signature : + bool isAccessOk(ad::map::lane::ContactLane,ad::map::restriction::VehicleDescriptor) + """ + +def isHeadingInLaneDirection(position: point.ParaPoint, heading: point.ENUHeading) -> bool: + """ + + isHeadingInLaneDirection( (ParaPoint)position, (ENUHeading)heading) -> bool : + + C++ signature : + bool isHeadingInLaneDirection(ad::map::point::ParaPoint,ad::map::point::ENUHeading) + """ + + +def isLaneDirectionNegative(lane: Lane | LaneId) -> bool: + """ + + isLaneDirectionNegative( (Lane)lane) -> bool : + + C++ signature : + bool isLaneDirectionNegative(ad::map::lane::Lane) + + isLaneDirectionNegative( (LaneId)laneId) -> bool : + + C++ signature : + bool isLaneDirectionNegative(ad::map::lane::LaneId) + """ + +def isLaneDirectionPositive(lane: Lane | LaneId) -> bool: + """ + + isLaneDirectionPositive( (Lane)lane) -> bool : + + C++ signature : + bool isLaneDirectionPositive(ad::map::lane::Lane) + + isLaneDirectionPositive( (LaneId)laneId) -> bool : + + C++ signature : + bool isLaneDirectionPositive(ad::map::lane::LaneId) + """ + +def isLanePartOfAnIntersection(lane: Lane) -> bool: + """ + + isLanePartOfAnIntersection( (Lane)lane) -> bool : + + C++ signature : + bool isLanePartOfAnIntersection(ad::map::lane::Lane) + """ + +def isLaneRelevantForExpansion(laneId: LaneId, relevantLanes: LaneIdSet) -> bool: + """ + + isLaneRelevantForExpansion( (LaneId)laneId, (LaneIdSet)relevantLanes) -> bool : + + C++ signature : + bool isLaneRelevantForExpansion(ad::map::lane::LaneId,std::set, std::allocator >) + """ + +def isLeftMost(lane: Lane) -> bool: + """ + + isLeftMost( (Lane)lane) -> bool : + + C++ signature : + bool isLeftMost(ad::map::lane::Lane) + """ + +def isNear(lane: Lane, boundingSphere: point.BoundingSphere) -> bool: + """ + + isNear( (Lane)lane, (BoundingSphere)boundingSphere) -> bool : + + C++ signature : + bool isNear(ad::map::lane::Lane,ad::map::point::BoundingSphere) + """ + +def isPhysicalPredecessor(lane: Lane, other: Lane) -> bool: + """ + + isPhysicalPredecessor( (Lane)lane, (Lane)other) -> bool : + + C++ signature : + bool isPhysicalPredecessor(ad::map::lane::Lane,ad::map::lane::Lane) + """ + +def isPyhsicalSuccessor(lane: Lane, other: Lane) -> bool: + """ + + isPyhsicalSuccessor( (Lane)lane, (Lane)other) -> bool : + + C++ signature : + bool isPyhsicalSuccessor(ad::map::lane::Lane,ad::map::lane::Lane) + """ + +def isRightMost(lane: Lane) -> bool: + """ + + isRightMost( (Lane)lane) -> bool : + + C++ signature : + bool isRightMost(ad::map::lane::Lane) + """ + +def isRouteable(lane: Lane) -> bool: + """ + + isRouteable( (Lane)lane) -> bool : + + C++ signature : + bool isRouteable(ad::map::lane::Lane) + """ + +def isSameOrDirectNeighbor(id: LaneId, neighbor: LaneId) -> bool: + """ + + isSameOrDirectNeighbor( (LaneId)id, (LaneId)neighbor) -> bool : + + C++ signature : + bool isSameOrDirectNeighbor(ad::map::lane::LaneId,ad::map::lane::LaneId) + """ + +def isSuccessorOrPredecessor(laneId: LaneId, checkLaneId: LaneId) -> bool: + """ + + isSuccessorOrPredecessor( (LaneId)laneId, (LaneId)checkLaneId) -> bool : + + C++ signature : + bool isSuccessorOrPredecessor(ad::map::lane::LaneId,ad::map::lane::LaneId) + """ + +def isValid(laneId: LaneId | Lane | ContactLane, /, logErrors: bool=True) -> bool: + """ + + isValid( (LaneId)laneId [, (bool)logErrors=True]) -> bool : + + C++ signature : + bool isValid(ad::map::lane::LaneId [,bool=True]) + + isValid( (Lane)lane [, (bool)logErrors=True]) -> bool : + + C++ signature : + bool isValid(ad::map::lane::Lane [,bool=True]) + + isValid( (ContactLane)contactLane [, (bool)logErrors=True]) -> bool : + + C++ signature : + bool isValid(ad::map::lane::ContactLane [,bool=True]) + """ + +def isVanishingLaneEnd(lane: Lane) -> bool: + """ + + isVanishingLaneEnd( (Lane)lane) -> bool : + + C++ signature : + bool isVanishingLaneEnd(ad::map::lane::Lane) + """ + +def isVanishingLaneStart(lane: Lane) -> bool: + """ + + isVanishingLaneStart( (Lane)lane) -> bool : + + C++ signature : + bool isVanishingLaneStart(ad::map::lane::Lane) + """ + +def makeTransitionFromFirstBorderContinuous(first: ENUBorder, second: ENUBorder) -> None: + """ + + makeTransitionFromFirstBorderContinuous( (ENUBorder)first, (ENUBorder)second) -> None : + + C++ signature : + void makeTransitionFromFirstBorderContinuous(ad::map::lane::ENUBorder {lvalue},ad::map::lane::ENUBorder) + """ + +def makeTransitionFromFirstEdgeContinuous(first: point.ENUEdge, second: point.ENUEdge) -> None: + """ + + makeTransitionFromFirstEdgeContinuous( (ENUEdge)first, (ENUEdge)second) -> None : + + C++ signature : + void makeTransitionFromFirstEdgeContinuous(std::vector > {lvalue},std::vector >) + """ + +def makeTransitionToSecondBorderContinuous(first: ENUBorder, second: ENUBorder) -> None: + """ + + makeTransitionToSecondBorderContinuous( (ENUBorder)first, (ENUBorder)second) -> None : + + C++ signature : + void makeTransitionToSecondBorderContinuous(ad::map::lane::ENUBorder,ad::map::lane::ENUBorder {lvalue}) + """ + +def makeTransitionToSecondEdgeContinuous(first: point.ENUEdge, second: point.ENUEdge) -> None: + """ + + makeTransitionToSecondEdgeContinuous( (ENUEdge)first, (ENUEdge)second) -> None : + + C++ signature : + void makeTransitionToSecondEdgeContinuous(std::vector >,std::vector > {lvalue}) + """ + +def normalizeBorder(border: ENUBorder, previousBorder: ENUBorder) -> None: + """ + + normalizeBorder( (ENUBorder)border [, (ENUBorder)previousBorder=0]) -> None : + + C++ signature : + void normalizeBorder(ad::map::lane::ENUBorder {lvalue} [,ad::map::lane::ENUBorder const*=0]) + """ + +def oppositeLocation(e: ContactLocation) -> ContactLocation: + """ + + oppositeLocation( (ContactLocation)e) -> ContactLocation : + + C++ signature : + ad::map::lane::ContactLocation oppositeLocation(ad::map::lane::ContactLocation) + """ + +def projectParametricPointToEdges(lane: Lane, referencePoint: point.ECEFPoint | ad.physics.ParametricValue, point_on_left_edge: point.ECEFPoint, point_on_right_edge: point.ECEFPoint) -> bool: + """ + + projectParametricPointToEdges( (Lane)lane, (ECEFPoint)referencePoint, (ECEFPoint)point_on_left_edge, (ECEFPoint)point_on_right_edge) -> bool : + + C++ signature : + bool projectParametricPointToEdges(ad::map::lane::Lane,ad::map::point::ECEFPoint,ad::map::point::ECEFPoint {lvalue},ad::map::point::ECEFPoint {lvalue}) + + projectParametricPointToEdges( (Lane)lane, (ParametricValue)longitudinalOffset, (ECEFPoint)point_on_left_edge, (ECEFPoint)point_on_right_edge) -> bool : + + C++ signature : + bool projectParametricPointToEdges(ad::map::lane::Lane,ad::physics::ParametricValue,ad::map::point::ECEFPoint {lvalue},ad::map::point::ECEFPoint {lvalue}) + """ + +def projectPositionToLaneInHeadingDirection(position: point.ParaPoint, heading: point.ENUHeading, projectedPosition: point.ParaPoint) -> bool: + """ + + projectPositionToLaneInHeadingDirection( (ParaPoint)position, (ENUHeading)heading, (ParaPoint)projectedPosition) -> bool : + + C++ signature : + bool projectPositionToLaneInHeadingDirection(ad::map::point::ParaPoint,ad::map::point::ENUHeading,ad::map::point::ParaPoint {lvalue}) + """ + +def satisfiesFilter(lane: Lane, typeFilter: str, isHov: bool) -> bool: + """ + + satisfiesFilter( (Lane)lane, (str)typeFilter, (bool)isHov) -> bool : + + C++ signature : + bool satisfiesFilter(ad::map::lane::Lane,std::__cxx11::basic_string, std::allocator >,bool) + """ + +def toString(e: ContactLocation | LaneType | ContactType | LaneDirection) -> str: + """ + + toString( (ContactLocation)e) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > toString(ad::map::lane::ContactLocation) + + toString( (LaneType)e) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > toString(ad::map::lane::LaneType) + + toString( (ContactType)e) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > toString(ad::map::lane::ContactType) + + toString( (LaneDirection)e) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > toString(ad::map::lane::LaneDirection) + """ + +def to_string(value: object) -> str: + """ + + to_string( (LaneId)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::LaneId) + + to_string( (LaneIdList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ContactLocation)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::ContactLocation) + + to_string( (LaneType)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::LaneType) + + to_string( (ENUBorder)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::ENUBorder) + + to_string( (GeoBorder)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::GeoBorder) + + to_string( (ContactType)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::ContactType) + + to_string( (ContactTypeList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ContactLane)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::ContactLane) + + to_string( (ContactLaneList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (LaneDirection)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::LaneDirection) + + to_string( (Lane)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::Lane) + + to_string( (GeoBorderList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ECEFBorder)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::map::lane::ECEFBorder) + + to_string( (ENUBorderList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ECEFBorderList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ContactLocationList)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (LaneIdSet)laneIdSet) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::set, std::allocator >) + """ + +def uniqueLaneId(point: point.GeoPoint) -> LaneId: + """ + + uniqueLaneId( (GeoPoint)point) -> LaneId : + + C++ signature : + ad::map::lane::LaneId uniqueLaneId(ad::map::point::GeoPoint) + """ + +def uniqueParaPoint(point: point.GeoPoint) -> point.ParaPoint: + """ + + uniqueParaPoint( (GeoPoint)point) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint uniqueParaPoint(ad::map::point::GeoPoint) + """ diff --git a/PythonAPI/carla/source/carla/ad/map/match.pyi b/PythonAPI/carla/source/carla/ad/map/match.pyi new file mode 100644 index 0000000000..3eb452cd6c --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/match.pyi @@ -0,0 +1,564 @@ +from typing import overload +import ad +from . import * + +class AdMapMatching(): + @property + def MaxHeadingHintFactor(self) -> float: ... + + @property + def RouteHintFactor(self) -> float: ... + + @overload + def addHeadingHint(self, arg1: AdMapMatching, yaw: point.ENUHeading, enuReferencePoint: point.GeoPoint) -> None: ... + + @overload + def addHeadingHint(self, arg1: AdMapMatching, headingHint: point.ECEFHeading) -> None: + ''' + + addHeadingHint( (AdMapMatching)arg1, (ECEFHeading)headingHint) -> None : + + C++ signature : + void addHeadingHint(ad::map::match::AdMapMatching {lvalue},ad::map::point::ECEFHeading) + + addHeadingHint( (AdMapMatching)arg1, (ENUHeading)yaw, (GeoPoint)enuReferencePoint) -> None : + + C++ signature : + void addHeadingHint(ad::map::match::AdMapMatching {lvalue},ad::map::point::ENUHeading,ad::map::point::GeoPoint) + ''' + ... + + def addRouteHint(self, arg1: AdMapMatching, routeHint: route.FullRoute) -> None: + ''' + + addRouteHint( (AdMapMatching)arg1, (FullRoute)routeHint) -> None : + + C++ signature : + void addRouteHint(ad::map::match::AdMapMatching {lvalue},ad::map::route::FullRoute) + ''' + ... + + def clearHeadingHints(self, arg1: AdMapMatching) -> None: + ''' + + clearHeadingHints( (AdMapMatching)arg1) -> None : + + C++ signature : + void clearHeadingHints(ad::map::match::AdMapMatching {lvalue}) + ''' + ... + + def clearHints(self, arg1: AdMapMatching) -> None: + ''' + + clearHints( (AdMapMatching)arg1) -> None : + + C++ signature : + void clearHints(ad::map::match::AdMapMatching {lvalue}) + ''' + ... + + def clearRelevantLanes(self, arg1: AdMapMatching) -> None: + ''' + + clearRelevantLanes( (AdMapMatching)arg1) -> None : + + C++ signature : + void clearRelevantLanes(ad::map::match::AdMapMatching {lvalue}) + ''' + ... + + def clearRouteHints(self, arg1: AdMapMatching) -> None: + ''' + + clearRouteHints( (AdMapMatching)arg1) -> None : + + C++ signature : + void clearRouteHints(ad::map::match::AdMapMatching {lvalue}) + ''' + ... + + @overload + def findLanes(self, ecefPoint: point.ECEFPoint, distance: ad.physics.Distance, relevantLanes: lane.LaneIdSet, geoPoint: point.GeoPoint, distance: ad.physics.Distance, relevantLanes: LaneIdSet) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_: + ''' + + findLanes( (ECEFPoint)ecefPoint, (Distance)distance [, (LaneIdSet)relevantLanes=]) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > findLanes(ad::map::point::ECEFPoint,ad::physics::Distance [,std::set, std::allocator >=]) + + findLanes( (GeoPoint)geoPoint, (Distance)distance [, (LaneIdSet)relevantLanes=]) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > findLanes(ad::map::point::GeoPoint,ad::physics::Distance [,std::set, std::allocator >=]) + ''' + ... + + def findRouteLanes(self, ecefPoint: point.ECEFPoint, route: route.FullRoute) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_: + ''' + + findRouteLanes( (ECEFPoint)ecefPoint, (FullRoute)route) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > findRouteLanes(ad::map::point::ECEFPoint,ad::map::route::FullRoute) + ''' + ... + + def getLaneENUHeading(self, arg1: AdMapMatching, mapMatchedPosition: MapMatchedPosition) -> ENUHeading: + ''' + + getLaneENUHeading( (AdMapMatching)arg1, (MapMatchedPosition)mapMatchedPosition) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getLaneENUHeading(ad::map::match::AdMapMatching {lvalue},ad::map::match::MapMatchedPosition) + ''' + ... + + def getLaneOccupiedRegions(self, arg1: AdMapMatching, enuObjectPositionList: ENUObjectPositionList, samplingDistance: Distance) -> LaneOccupiedRegionList: + ''' + + getLaneOccupiedRegions( (AdMapMatching)arg1, (ENUObjectPositionList)enuObjectPositionList [, (Distance)samplingDistance=]) -> LaneOccupiedRegionList : + + C++ signature : + std::vector > getLaneOccupiedRegions(ad::map::match::AdMapMatching {lvalue},std::vector > [,ad::physics::Distance=]) + ''' + ... + + def getMapMatchedBoundingBox(self, arg1: AdMapMatching, enuObjectPosition: ENUObjectPosition, samplingDistance: Distance) -> MapMatchedObjectBoundingBox: + ''' + + getMapMatchedBoundingBox( (AdMapMatching)arg1, (ENUObjectPosition)enuObjectPosition [, (Distance)samplingDistance=]) -> MapMatchedObjectBoundingBox : + + C++ signature : + ad::map::match::MapMatchedObjectBoundingBox getMapMatchedBoundingBox(ad::map::match::AdMapMatching {lvalue},ad::map::match::ENUObjectPosition [,ad::physics::Distance=]) + ''' + ... + + def getMapMatchedPositions(self, arg1: AdMapMatching, geoPoint: GeoPoint, distance: Distance, minProbability: Probabilityarg1: AdMapMatching, enuPoint: ENUPoint, enuReferencePoint: GeoPoint, distance: Distance, minProbability: Probabilityarg1: AdMapMatching, enuPoint: ENUPoint, distance: Distance, minProbability: Probabilityarg1: AdMapMatching, enuObjectPosition: ENUObjectPosition, distance: Distance, minProbability: Probability) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_: + ''' + + getMapMatchedPositions( (AdMapMatching)arg1, (GeoPoint)geoPoint, (Distance)distance, (Probability)minProbability) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > getMapMatchedPositions(ad::map::match::AdMapMatching {lvalue},ad::map::point::GeoPoint,ad::physics::Distance,ad::physics::Probability) + + getMapMatchedPositions( (AdMapMatching)arg1, (ENUPoint)enuPoint, (GeoPoint)enuReferencePoint, (Distance)distance, (Probability)minProbability) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > getMapMatchedPositions(ad::map::match::AdMapMatching {lvalue},ad::map::point::ENUPoint,ad::map::point::GeoPoint,ad::physics::Distance,ad::physics::Probability) + + getMapMatchedPositions( (AdMapMatching)arg1, (ENUPoint)enuPoint, (Distance)distance, (Probability)minProbability) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > getMapMatchedPositions(ad::map::match::AdMapMatching {lvalue},ad::map::point::ENUPoint,ad::physics::Distance,ad::physics::Probability) + + getMapMatchedPositions( (AdMapMatching)arg1, (ENUObjectPosition)enuObjectPosition, (Distance)distance, (Probability)minProbability) -> vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_ : + + C++ signature : + std::vector > getMapMatchedPositions(ad::map::match::AdMapMatching {lvalue},ad::map::match::ENUObjectPosition,ad::physics::Distance,ad::physics::Probability) + ''' + ... + + def setRelevantLanes(self, arg1: AdMapMatching, relevantLanes: LaneIdSet) -> None: + ''' + + setRelevantLanes( (AdMapMatching)arg1, (LaneIdSet)relevantLanes) -> None : + + C++ signature : + void setRelevantLanes(ad::map::match::AdMapMatching {lvalue},std::set, std::allocator >) + ''' + ... + +class ENUObjectPosition(): + def assign(self, arg1: ENUObjectPosition, other: ENUObjectPosition) -> ENUObjectPosition: + ''' + + assign( (ENUObjectPosition)arg1, (ENUObjectPosition)other) -> ENUObjectPosition : + + C++ signature : + ad::map::match::ENUObjectPosition {lvalue} assign(ad::map::match::ENUObjectPosition {lvalue},ad::map::match::ENUObjectPosition) + ''' + ... + + @property + def centerPoint(self) -> point.ENUPoint: ... + + @property + def dimension(self) -> ad.physics.Dimension3D: ... + + @property + def enuReferencePoint(self) -> point.GeoPoint: ... + + @property + def heading(self) -> point.ENUHeading: ... + +class ENUObjectPositionList(): + def append(self, arg1: ENUObjectPositionList, arg2: ENUObjectPosition) -> None: + ''' + + append( (ENUObjectPositionList)arg1, (ENUObjectPosition)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::match::ENUObjectPosition) + ''' + ... + + def count(self, arg1: ENUObjectPositionList, arg2: ENUObjectPosition) -> int: + ''' + + count( (ENUObjectPositionList)arg1, (ENUObjectPosition)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::match::ENUObjectPosition) + ''' + ... + + def extend(self, arg1: ENUObjectPositionList, arg2: object) -> None: + ''' + + extend( (ENUObjectPositionList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + ''' + ... + + def index(self, arg1: ENUObjectPositionList, arg2: ENUObjectPosition) -> int: + ''' + + index( (ENUObjectPositionList)arg1, (ENUObjectPosition)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::match::ENUObjectPosition) + ''' + ... + + def insert(self, arg1: ENUObjectPositionList, arg2: int, arg3: ENUObjectPosition) -> None: + ''' + + insert( (ENUObjectPositionList)arg1, (int)arg2, (ENUObjectPosition)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::match::ENUObjectPosition) + ''' + ... + + def reverse(self, arg1: ENUObjectPositionList) -> None: + ''' + + reverse( (ENUObjectPositionList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + ''' + ... + +class LaneOccupiedRegion(): + def assign(self, arg1: LaneOccupiedRegion, other: LaneOccupiedRegion) -> LaneOccupiedRegion: + ''' + + assign( (LaneOccupiedRegion)arg1, (LaneOccupiedRegion)other) -> LaneOccupiedRegion : + + C++ signature : + ad::map::match::LaneOccupiedRegion {lvalue} assign(ad::map::match::LaneOccupiedRegion {lvalue},ad::map::match::LaneOccupiedRegion) + ''' + ... + + @property + def laneId(self) -> lane.LaneId: ... + + @property + def lateralRange(self) -> ad.physics.ParametricRange: ... + + @property + def longitudinalRange(self) -> ad.physics.ParametricRange: ... + +class LaneOccupiedRegionList(): + def append(self, arg1: LaneOccupiedRegionList, arg2: LaneOccupiedRegion) -> None: + ''' + + append( (LaneOccupiedRegionList)arg1, (LaneOccupiedRegion)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::match::LaneOccupiedRegion) + ''' + ... + + def count(self, arg1: LaneOccupiedRegionList, arg2: LaneOccupiedRegion) -> int: + ''' + + count( (LaneOccupiedRegionList)arg1, (LaneOccupiedRegion)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::match::LaneOccupiedRegion) + ''' + ... + + def extend(self, arg1: LaneOccupiedRegionList, arg2: object) -> None: + ''' + + extend( (LaneOccupiedRegionList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + ''' + ... + + def index(self, arg1: LaneOccupiedRegionList, arg2: LaneOccupiedRegion) -> int: + ''' + + index( (LaneOccupiedRegionList)arg1, (LaneOccupiedRegion)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::match::LaneOccupiedRegion) + ''' + ... + + def insert(self, arg1: LaneOccupiedRegionList, arg2: int, arg3: LaneOccupiedRegion) -> None: + ''' + + insert( (LaneOccupiedRegionList)arg1, (int)arg2, (LaneOccupiedRegion)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::match::LaneOccupiedRegion) + ''' + ... + + def reverse(self, arg1: LaneOccupiedRegionList) -> None: + ''' + + reverse( (LaneOccupiedRegionList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + ''' + ... + + def __getitem__(self, key: int) -> LaneOccupiedRegion: ... + + def __contains__(self, item: LaneOccupiedRegion) -> bool: ... + + def __delitem__(self, key: int) -> None: ... + + def __hash__(self) -> int: ... + + def __setitem__(self, key: int, value: LaneOccupiedRegion) -> None: ... + +class LanePoint(): + def assign(self, arg1: LanePoint, other: LanePoint) -> LanePoint: + ''' + + assign( (LanePoint)arg1, (LanePoint)other) -> LanePoint : + + C++ signature : + ad::map::match::LanePoint {lvalue} assign(ad::map::match::LanePoint {lvalue},ad::map::match::LanePoint) + ''' + ... + + @property + def laneLength(self) -> ad.physics.Distance: ... + + @property + def laneWidth(self) -> ad.physics.Distance: ... + + @property + def lateralT(self) -> ad.physics.RatioValue: ... + + @property + def paraPoint(self) -> point.ParaPoint: ... + +class MapMatchedObjectBoundingBox(): + def assign(self, arg1: MapMatchedObjectBoundingBox, other: MapMatchedObjectBoundingBox) -> MapMatchedObjectBoundingBox: + ''' + + assign( (MapMatchedObjectBoundingBox)arg1, (MapMatchedObjectBoundingBox)other) -> MapMatchedObjectBoundingBox : + + C++ signature : + ad::map::match::MapMatchedObjectBoundingBox {lvalue} assign(ad::map::match::MapMatchedObjectBoundingBox {lvalue},ad::map::match::MapMatchedObjectBoundingBox) + ''' + ... + + @property + def laneOccupiedRegions(self) -> LaneOccupiedRegionList: ... + + @property + def matchRadius(self) -> ad.physics.Distance: ... + + @property + def referencePointPositions(self) -> MapMatchedObjectReferencePositionList: ... + + @property + def samplingDistance(self) -> ad.physics.Distance: ... + +class MapMatchedObjectReferencePositionList(): + def append(self, arg1: MapMatchedObjectReferencePositionList, arg2: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_) -> None: + ''' + + append( (MapMatchedObjectReferencePositionList)arg1, (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg2) -> None : + + C++ signature : + void append(std::vector >, std::allocator > > > {lvalue},std::vector >) + ''' + ... + + def extend(self, arg1: MapMatchedObjectReferencePositionList, arg2: object) -> None: + ''' + + extend( (MapMatchedObjectReferencePositionList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector >, std::allocator > > > {lvalue},boost::python::api::object) + ''' + ... + + def insert(self, arg1: MapMatchedObjectReferencePositionList, arg2: int, arg3: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_) -> None: + ''' + + insert( (MapMatchedObjectReferencePositionList)arg1, (int)arg2, (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg3) -> None : + + C++ signature : + void insert(std::vector >, std::allocator > > > {lvalue},long,std::vector >) + ''' + ... + + def reverse(self, arg1: MapMatchedObjectReferencePositionList) -> None: + ''' + + reverse( (MapMatchedObjectReferencePositionList)arg1) -> None : + + C++ signature : + void reverse(std::vector >, std::allocator > > > {lvalue}) + ''' + ... + +class MapMatchedPosition(): + def assign(self, arg1: MapMatchedPosition, other: MapMatchedPosition) -> MapMatchedPosition: + ''' + + assign( (MapMatchedPosition)arg1, (MapMatchedPosition)other) -> MapMatchedPosition : + + C++ signature : + ad::map::match::MapMatchedPosition {lvalue} assign(ad::map::match::MapMatchedPosition {lvalue},ad::map::match::MapMatchedPosition) + ''' + ... + + @property + def lanePoint(self) -> LanePoint: ... + + @property + def matchedPoint(self) -> point.ECEFPoint: ... + + @property + def matchedPointDistance(self) -> ad.physics.Distance: ... + + @property + def probability(self) -> ad.physics.Probability: ... + + @property + def queryPoint(self) -> point.ECEFPoint: ... + + @property + def type(self) -> MapMatchedPositionType: ... + +class MapMatchedPositionType(int,): + INVALID = 0 + + LANE_IN = 2 + + LANE_LEFT = 3 + + LANE_RIGHT = 4 + + UNKNOWN = 1 + +class Object(): + def assign(self, arg1: Object, other: Object) -> Object: + ''' + + assign( (Object)arg1, (Object)other) -> Object : + + C++ signature : + ad::map::match::Object {lvalue} assign(ad::map::match::Object {lvalue},ad::map::match::Object) + ''' + ... + + @property + def enuPosition(self) -> ENUObjectPosition: ... + + @property + def mapMatchedBoundingBox(self) -> MapMatchedObjectBoundingBox: ... + +class ObjectReferencePoints(int,): + Center = 4 + + FrontLeft = 0 + + FrontRight = 1 + + NumPoints = 5 + + RearLeft = 2 + + RearRight = 3 + +class vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_(): + def append(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, arg2: MapMatchedPosition) -> None: + ''' + + append( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1, (MapMatchedPosition)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::match::MapMatchedPosition) + ''' + ... + + def count(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, arg2: MapMatchedPosition) -> int: + ''' + + count( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1, (MapMatchedPosition)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::match::MapMatchedPosition) + ''' + ... + + def extend(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, arg2: object) -> None: + ''' + + extend( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + ''' + ... + + def index(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, arg2: MapMatchedPosition) -> int: + ''' + + index( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1, (MapMatchedPosition)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::match::MapMatchedPosition) + ''' + ... + + def insert(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_, arg2: int, arg3: MapMatchedPosition) -> None: + ''' + + insert( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1, (int)arg2, (MapMatchedPosition)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::match::MapMatchedPosition) + ''' + ... + + def reverse(self, arg1: vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_) -> None: + ''' + + reverse( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + ''' + ... + diff --git a/PythonAPI/carla/source/carla/ad/map/point.pyi b/PythonAPI/carla/source/carla/ad/map/point.pyi new file mode 100644 index 0000000000..694ed1e662 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/point.pyi @@ -0,0 +1,836 @@ +from typing import overload + +import ad + +from . import * + +class Altitude(ad._Calculable): + cMaxValue: float = ... + cMinValue: float = ... + cPrecisionValue: float = 0.001 + +class BoundingSphere: + def assign(self, arg1: BoundingSphere, other: BoundingSphere) -> BoundingSphere: + """ + + assign( (BoundingSphere)arg1, (BoundingSphere)other) -> BoundingSphere : + + C++ signature : + ad::map::point::BoundingSphere {lvalue} assign(ad::map::point::BoundingSphere {lvalue},ad::map::point::BoundingSphere) + """ + ... + + @property + def center(self) -> ECEFPoint: ... + + @property + def radius(self) -> ad.physics.Distance: ... + +class CoordinateTransform: + def ECEF2ENU(self, arg1: CoordinateTransform, pt: ECEFPoint) -> ENUPoint: + """ + + ECEF2ENU( (CoordinateTransform)arg1, (ECEFPoint)pt) -> ENUPoint : + + C++ signature : + ad::map::point::ENUPoint ECEF2ENU(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ECEFPoint) + """ + ... + + def ECEF2Geo(self, arg1: CoordinateTransform, pt: ECEFPoint) -> GeoPoint: + """ + + ECEF2Geo( (CoordinateTransform)arg1, (ECEFPoint)pt) -> GeoPoint : + + C++ signature : + ad::map::point::GeoPoint ECEF2Geo(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ECEFPoint) + """ + ... + + def ENU2ECEF(self, arg1: CoordinateTransform, pt: ENUPoint) -> ECEFPoint: + """ + + ENU2ECEF( (CoordinateTransform)arg1, (ENUPoint)pt) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint ENU2ECEF(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ENUPoint) + """ + ... + + def ENU2Geo(self, arg1: CoordinateTransform, pt: ENUPoint) -> GeoPoint: + """ + + ENU2Geo( (CoordinateTransform)arg1, (ENUPoint)pt) -> GeoPoint : + + C++ signature : + ad::map::point::GeoPoint ENU2Geo(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ENUPoint) + """ + ... + + @property + def ENURef(self) -> int: ... + + @property + def ENUReferencePoint(self) -> GeoPoint: ... + + @property + def ENUValid(self) -> bool: ... + + def Geo2ECEF(self, arg1: CoordinateTransform, pt: GeoPoint) -> ECEFPoint: + """ + + Geo2ECEF( (CoordinateTransform)arg1, (GeoPoint)pt) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint Geo2ECEF(ad::map::point::CoordinateTransform {lvalue},ad::map::point::GeoPoint) + """ + ... + + def Geo2ENU(self, arg1: CoordinateTransform, pt: GeoPoint) -> ENUPoint: + """ + + Geo2ENU( (CoordinateTransform)arg1, (GeoPoint)pt) -> ENUPoint : + + C++ signature : + ad::map::point::ENUPoint Geo2ENU(ad::map::point::CoordinateTransform {lvalue},ad::map::point::GeoPoint) + """ + ... + + def WGS84_R(self, lat: Latitude) -> ad.physics.Distance: + """ + + WGS84_R( (Latitude)lat) -> Distance : + + C++ signature : + ad::physics::Distance WGS84_R(ad::map::point::Latitude) + """ + ... + + # NOTE: Overloads might not be correct, # TODO + + @overload + def convert(self, arg1: CoordinateTransform, x: ENUPoint, y: GeoPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: GeoPoint, y: ECEFPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: ECEFPoint, y: GeoPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: ECEFPoint, y: ENUPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: ENUPoint, y: ECEFPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: GeoPoint, y: ENUPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, x: ENUPoint, y: GeoPoint) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: GeoEdge, ys: ECEFEdge) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: ENUEdge, ys: ECEFEdge) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: ECEFEdge, ys: GeoEdge) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: ENUEdge, ys: GeoEdge) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: ECEFEdge, ys: ENUEdge) -> None: + ... + + @overload + def convert(self, arg1: CoordinateTransform, xs: GeoEdge, ys: ENUEdge) -> None: + ... + + def convert(self, arg1: CoordinateTransform, x, y) -> None: + """ + convert( (CoordinateTransform)arg1, (ECEFPoint)x, (ENUPoint)y) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ECEFPoint,ad::map::point::ENUPoint {lvalue}) + + convert( (CoordinateTransform)arg1, (ENUPoint)x, (ECEFPoint)y) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},ad::map::point::ENUPoint,ad::map::point::ECEFPoint {lvalue}) + + convert( (CoordinateTransform)arg1, (GeoEdge)xs, (ECEFEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + + convert( (CoordinateTransform)arg1, (ENUEdge)xs, (ECEFEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + + convert( (CoordinateTransform)arg1, (ECEFEdge)xs, (GeoEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + + convert( (CoordinateTransform)arg1, (ENUEdge)xs, (GeoEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + + convert( (CoordinateTransform)arg1, (ECEFEdge)xs, (ENUEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + + convert( (CoordinateTransform)arg1, (GeoEdge)xs, (ENUEdge)ys) -> None : + + C++ signature : + void convert(ad::map::point::CoordinateTransform {lvalue},std::vector >,std::vector > {lvalue}) + """ + ... + + def geocentricLatitude(self, lat: Latitude) -> float: + """ + + geocentricLatitude( (Latitude)lat) -> float : + + C++ signature : + double geocentricLatitude(ad::map::point::Latitude) + """ + ... + + def setGeoProjection(self, arg1: CoordinateTransform, geo_projection: str) -> bool: + """ + + setGeoProjection( (CoordinateTransform)arg1, (str)geo_projection) -> bool : + + C++ signature : + bool setGeoProjection(ad::map::point::CoordinateTransform {lvalue},std::__cxx11::basic_string, std::allocator >) + """ + ... + +class ECEFCoordinate(ad._Calculable): + cMaxValue: float = 1000000000.0 + cMinValue: float = -1000000000.0 + cPrecisionValue: float = 0.001 + +class ECEFEdge(ad._VectorSequence[ECEFPoint]): + ... + +class ECEFHeading: + def assign(self, arg1: ECEFHeading, other: ECEFHeading) -> ECEFHeading: + """ + + assign( (ECEFHeading)arg1, (ECEFHeading)other) -> ECEFHeading : + + C++ signature : + ad::map::point::ECEFHeading {lvalue} assign(ad::map::point::ECEFHeading {lvalue},ad::map::point::ECEFHeading) + """ + ... + + @property + def x(self) -> ECEFCoordinate: ... + + @property + def y(self) -> ECEFCoordinate: ... + + @property + def z(self) -> ECEFCoordinate: ... + +class ECEFPoint: + def assign(self, arg1: ECEFPoint, other: ECEFPoint) -> ECEFPoint: + """ + + assign( (ECEFPoint)arg1, (ECEFPoint)other) -> ECEFPoint : + + C++ signature : + ad::map::point::ECEFPoint {lvalue} assign(ad::map::point::ECEFPoint {lvalue},ad::map::point::ECEFPoint) + """ + ... + + @property + def x(self) -> ECEFCoordinate: ... + + @property + def y(self) -> ECEFCoordinate: ... + + @property + def z(self) -> ECEFCoordinate: ... + +class ENUCoordinate(ad._Calculable): + cMaxValue: float = 1000000.0 + cMinValue: float = -1000000.0 + cPrecisionValue: float = 0.001 + +class ENUEdge(ad._VectorSequence[ENUPoint]): + ... + +class ENUEdgeCache: + def assign(self, arg1: ENUEdgeCache, other: ENUEdgeCache) -> ENUEdgeCache: + """ + + assign( (ENUEdgeCache)arg1, (ENUEdgeCache)other) -> ENUEdgeCache : + + C++ signature : + ad::map::point::ENUEdgeCache {lvalue} assign(ad::map::point::ENUEdgeCache {lvalue},ad::map::point::ENUEdgeCache) + """ + ... + + @property + def enuEdge(self) -> ENUEdge: ... + + @property + def enuVersion(self) -> int: ... + +class ENUHeading(ad._Calculable): + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 0.0001 + +class ENUPoint(ad._FloatLike): + def assign(self, arg1: ENUPoint, other: ENUPoint) -> ENUPoint: + """ + + assign( (ENUPoint)arg1, (ENUPoint)other) -> ENUPoint : + + C++ signature : + ad::map::point::ENUPoint {lvalue} assign(ad::map::point::ENUPoint {lvalue},ad::map::point::ENUPoint) + """ + ... + + @property + def x(self) -> ENUCoordinate: ... + + @property + def y(self) -> ENUCoordinate: ... + + @property + def z(self) -> ENUCoordinate: ... + +class GeoEdge: + def append(self, arg1: GeoEdge, arg2: GeoPoint) -> None: + """ + + append( (GeoEdge)arg1, (GeoPoint)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::point::GeoPoint) + """ + ... + + def count(self, arg1: GeoEdge, arg2: GeoPoint) -> int: + """ + + count( (GeoEdge)arg1, (GeoPoint)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::point::GeoPoint) + """ + ... + + def extend(self, arg1: GeoEdge, arg2: object) -> None: + """ + + extend( (GeoEdge)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: GeoEdge, arg2: GeoPoint) -> int: + """ + + index( (GeoEdge)arg1, (GeoPoint)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::point::GeoPoint) + """ + ... + + def insert(self, arg1: GeoEdge, arg2: int, arg3: GeoPoint) -> None: + """ + + insert( (GeoEdge)arg1, (int)arg2, (GeoPoint)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::point::GeoPoint) + """ + ... + + def reverse(self, arg1: GeoEdge) -> None: + """ + + reverse( (GeoEdge)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class GeoPoint: + @property + def altitude(self) -> Altitude: ... + + def assign(self, arg1: GeoPoint, other: GeoPoint) -> GeoPoint: + """ + + assign( (GeoPoint)arg1, (GeoPoint)other) -> GeoPoint : + + C++ signature : + ad::map::point::GeoPoint {lvalue} assign(ad::map::point::GeoPoint {lvalue},ad::map::point::GeoPoint) + """ + ... + + @property + def latitude(self) -> Latitude: ... + + @property + def longitude(self) -> Longitude: ... + +class Geometry: + def assign(self, arg1: Geometry, other: Geometry) -> Geometry: + """ + + assign( (Geometry)arg1, (Geometry)other) -> Geometry : + + C++ signature : + ad::map::point::Geometry {lvalue} assign(ad::map::point::Geometry {lvalue},ad::map::point::Geometry) + """ + ... + + @property + def ecefEdge(self) -> ECEFEdge: ... + + @property + def isClosed(self) -> bool: ... + + @property + def isValid(self) -> bool: ... + + @property + def length(self) -> ad.physics.Distance: ... + + @property + def private_enuEdgeCache(self) -> ENUEdgeCache: ... + +class Latitude(ad._FloatLike): + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: Latitude, other: Latitude) -> Latitude: + """ + + assign( (Latitude)arg1, (Latitude)other) -> Latitude : + + C++ signature : + ad::map::point::Latitude {lvalue} assign(ad::map::point::Latitude {lvalue},ad::map::point::Latitude) + """ + ... + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 1e-08 + + def ensureValid(self, arg1: Latitude) -> None: + """ + + ensureValid( (Latitude)arg1) -> None : + + C++ signature : + void ensureValid(ad::map::point::Latitude {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: Latitude) -> None: + """ + + ensureValidNonZero( (Latitude)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::map::point::Latitude {lvalue}) + """ + ... + + def getMax(self) -> Latitude: + """ + + getMax() -> Latitude : + + C++ signature : + ad::map::point::Latitude getMax() + """ + ... + + def getMin(self) -> Latitude: + """ + + getMin() -> Latitude : + + C++ signature : + ad::map::point::Latitude getMin() + """ + ... + + def getPrecision(self) -> Latitude: + """ + + getPrecision() -> Latitude : + + C++ signature : + ad::map::point::Latitude getPrecision() + """ + ... + +class Longitude(ad._FloatLike): + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: Longitude, other: Longitude) -> Longitude: + """ + + assign( (Longitude)arg1, (Longitude)other) -> Longitude : + + C++ signature : + ad::map::point::Longitude {lvalue} assign(ad::map::point::Longitude {lvalue},ad::map::point::Longitude) + """ + ... + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 1e-08 + + def ensureValid(self, arg1: Longitude) -> None: + """ + + ensureValid( (Longitude)arg1) -> None : + + C++ signature : + void ensureValid(ad::map::point::Longitude {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: Longitude) -> None: + """ + + ensureValidNonZero( (Longitude)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::map::point::Longitude {lvalue}) + """ + ... + + def getMax(self) -> Longitude: + """ + + getMax() -> Longitude : + + C++ signature : + ad::map::point::Longitude getMax() + """ + ... + + def getMin(self) -> Longitude: + """ + + getMin() -> Longitude : + + C++ signature : + ad::map::point::Longitude getMin() + """ + ... + + def getPrecision(self) -> Longitude: + """ + + getPrecision() -> Longitude : + + C++ signature : + ad::map::point::Longitude getPrecision() + """ + ... + +class ParaPoint: + def assign(self, arg1: ParaPoint, other: ParaPoint) -> ParaPoint: + """ + + assign( (ParaPoint)arg1, (ParaPoint)other) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint {lvalue} assign(ad::map::point::ParaPoint {lvalue},ad::map::point::ParaPoint) + """ + ... + + @property + def laneId(self) -> lane.LaneId: ... + + @property + def parametricOffset(self) -> ad.physics.ParametricValue: ... + +class ParaPointList: + def append(self, arg1: ParaPointList, arg2: ParaPoint) -> None: + """ + + append( (ParaPointList)arg1, (ParaPoint)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::point::ParaPoint) + """ + ... + + def count(self, arg1: ParaPointList, arg2: ParaPoint) -> int: + """ + + count( (ParaPointList)arg1, (ParaPoint)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::point::ParaPoint) + """ + ... + + def extend(self, arg1: ParaPointList, arg2: object) -> None: + """ + + extend( (ParaPointList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ParaPointList, arg2: ParaPoint) -> int: + """ + + index( (ParaPointList)arg1, (ParaPoint)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::point::ParaPoint) + """ + ... + + def insert(self, arg1: ParaPointList, arg2: int, arg3: ParaPoint) -> None: + """ + + insert( (ParaPointList)arg1, (int)arg2, (ParaPoint)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::point::ParaPoint) + """ + ... + + def reverse(self, arg1: ParaPointList) -> None: + """ + + reverse( (ParaPointList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_Altitude__greater_: + def epsilon(self) -> Altitude: + """ + + epsilon() -> Altitude : + + C++ signature : + ad::map::point::Altitude epsilon() + """ + ... + + def lowest(self) -> Altitude: + """ + + lowest() -> Altitude : + + C++ signature : + ad::map::point::Altitude lowest() + """ + ... + + def max(self) -> Altitude: + """ + + max() -> Altitude : + + C++ signature : + ad::map::point::Altitude max() + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_ECEFCoordinate__greater_: + def epsilon(self) -> ECEFCoordinate: + """ + + epsilon() -> ECEFCoordinate : + + C++ signature : + ad::map::point::ECEFCoordinate epsilon() + """ + ... + + def lowest(self) -> ECEFCoordinate: + """ + + lowest() -> ECEFCoordinate : + + C++ signature : + ad::map::point::ECEFCoordinate lowest() + """ + ... + + def max(self) -> ECEFCoordinate: + """ + + max() -> ECEFCoordinate : + + C++ signature : + ad::map::point::ECEFCoordinate max() + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_ENUCoordinate__greater_: + def epsilon(self) -> ENUCoordinate: + """ + + epsilon() -> ENUCoordinate : + + C++ signature : + ad::map::point::ENUCoordinate epsilon() + """ + ... + + def lowest(self) -> ENUCoordinate: + """ + + lowest() -> ENUCoordinate : + + C++ signature : + ad::map::point::ENUCoordinate lowest() + """ + ... + + def max(self) -> ENUCoordinate: + """ + + max() -> ENUCoordinate : + + C++ signature : + ad::map::point::ENUCoordinate max() + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_ENUHeading__greater_: + def epsilon(self) -> ENUHeading: + """ + + epsilon() -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading epsilon() + """ + ... + + def lowest(self) -> ENUHeading: + """ + + lowest() -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading lowest() + """ + ... + + def max(self) -> ENUHeading: + """ + + max() -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading max() + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_Latitude__greater_: + def epsilon(self) -> Latitude: + """ + + epsilon() -> Latitude : + + C++ signature : + ad::map::point::Latitude epsilon() + """ + ... + + def lowest(self) -> Latitude: + """ + + lowest() -> Latitude : + + C++ signature : + ad::map::point::Latitude lowest() + """ + ... + + def max(self) -> Latitude: + """ + + max() -> Latitude : + + C++ signature : + ad::map::point::Latitude max() + """ + ... + +class numeric_limits_less__ad_scope_map_scope_point_scope_Longitude__greater_: + def epsilon(self) -> Longitude: + """ + + epsilon() -> Longitude : + + C++ signature : + ad::map::point::Longitude epsilon() + """ + ... + + def lowest(self) -> Longitude: + """ + + lowest() -> Longitude : + + C++ signature : + ad::map::point::Longitude lowest() + """ + ... + + def max(self) -> Longitude: + """ + + max() -> Longitude : + + C++ signature : + ad::map::point::Longitude max() + """ + ... diff --git a/PythonAPI/carla/source/carla/ad/map/restriction.pyi b/PythonAPI/carla/source/carla/ad/map/restriction.pyi new file mode 100644 index 0000000000..4ea5ed02a6 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/restriction.pyi @@ -0,0 +1,119 @@ +from ...libcarla import _CarlaEnum +import ad + +class Restriction: + def assign(self, arg1: Restriction, other: Restriction) -> Restriction: + """ + + assign( (Restriction)arg1, (Restriction)other) -> Restriction : + + C++ signature : + ad::map::restriction::Restriction {lvalue} assign(ad::map::restriction::Restriction {lvalue},ad::map::restriction::Restriction) + """ + ... + + @property + def negated(self) -> bool: ... + + @property + def passengersMin(self) -> int: ... + + @property + def roadUserTypes(self) -> RoadUserTypeList: ... + +class RestrictionList(ad._VectorSequence[Restriction]): + ... + +class Restrictions: + def assign(self, arg1: Restrictions, other: Restrictions) -> Restrictions: + """ + + assign( (Restrictions)arg1, (Restrictions)other) -> Restrictions : + + C++ signature : + ad::map::restriction::Restrictions {lvalue} assign(ad::map::restriction::Restrictions {lvalue},ad::map::restriction::Restrictions) + """ + ... + + @property + def conjunctions(self) -> RestrictionList: ... + + @property + def disjunctions(self) -> RestrictionList: ... + +class RoadUserType(int, _CarlaEnum): + BICYCLE = 7 + + BUS = 3 + + CAR = 2 + + CAR_DIESEL = 11 + + CAR_ELECTRIC = 8 + + CAR_HYBRID = 9 + + CAR_PETROL = 10 + + INVALID = 0 + + MOTORBIKE = 6 + + PEDESTRIAN = 5 + + TRUCK = 4 + + UNKNOWN = 1 + +class RoadUserTypeList(ad._VectorSequence[RoadUserType]): + ... + +class SpeedLimit: + def assign(self, arg1: SpeedLimit, other: SpeedLimit) -> SpeedLimit: + """ + + assign( (SpeedLimit)arg1, (SpeedLimit)other) -> SpeedLimit : + + C++ signature : + ad::map::restriction::SpeedLimit {lvalue} assign(ad::map::restriction::SpeedLimit {lvalue},ad::map::restriction::SpeedLimit) + """ + ... + + @property + def lanePiece(self) -> ad.physics.ParametricRange: ... + + @property + def speedLimit(self) -> ad.physics.Speed: ... + +class SpeedLimitList(ad._VectorSequence[SpeedLimit]): + ... + +class VehicleDescriptor: + def assign(self, arg1: VehicleDescriptor, other: VehicleDescriptor) -> VehicleDescriptor: + """ + + assign( (VehicleDescriptor)arg1, (VehicleDescriptor)other) -> VehicleDescriptor : + + C++ signature : + ad::map::restriction::VehicleDescriptor {lvalue} assign(ad::map::restriction::VehicleDescriptor {lvalue},ad::map::restriction::VehicleDescriptor) + """ + ... + + @property + def height(self) -> ad.physics.Distance: ... + + @property + def length(self) -> ad.physics.Distance: ... + + @property + def passengers(self) -> int: ... + + @property + def type(self) -> RoadUserType: ... + + @property + def weight(self) -> ad.physics.Weight: ... + + @property + def width(self) -> ad.physics.Distance: ... diff --git a/PythonAPI/carla/source/carla/ad/map/route.pyi b/PythonAPI/carla/source/carla/ad/map/route.pyi new file mode 100644 index 0000000000..159e535994 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/map/route.pyi @@ -0,0 +1,1381 @@ +# --------- Linting ------------ +# Not relevant for stubs +# pylint: disable=unused-argument,C0103,used-before-assignment +# +# needs change in API +# pylint: disable=too-many-locals,too-many-public-methods,too-many-arguments,too-many-public-methods,too-few-public-methods,too-many-lines,redefined-builtin +# +# Fixable +# pylint: disable=line-too-long +# Needs __all__ to be defined +# pylint: disable=useless-import-alias,unused-import +# +# False positives +# Should only trigger for class name used in itself +# pylint: disable=undefined-variable +# +# ruff: noqa: F401,F405,F403 +# ------------------------------- + +from typing import Iterable, TypeAlias, overload + +import ad +from ...libcarla import _CarlaEnum + +from . import * + + +AllNeighborLanes = RouteCreationMode.AllNeighborLanes +AllRoutableLanes = RouteCreationMode.AllRoutableLanes +AllRouteLanes = RouteSectionCreationMode.AllRouteLanes +DONT_CARE = RoutingDirection.DONT_CARE +Differ = CompareRouteResult.Differ +DontCutIntersectionAndPrependIfSucceededBeforeRoute = ShortenRouteMode.DontCutIntersectionAndPrependIfSucceededBeforeRoute +Equal = CompareRouteResult.Equal +FailedRouteEmpty = ShortenRouteResult.FailedRouteEmpty +Following = ConnectingRouteType.Following +Invalid = LaneChangeDirection.Invalid +LeftToRight = LaneChangeDirection.LeftToRight +Longer = CompareRouteResult.Longer +Merging = ConnectingRouteType.Merging +NEGATIVE = RoutingDirection.NEGATIVE +Normal = ShortenRouteMode.Normal +Off = FilterDuplicatesMode.Off +OnlyEqual = FilterDuplicatesMode.OnlyEqual +Opposing = ConnectingRouteType.Opposing +POSITIVE = RoutingDirection.POSITIVE +PrependIfSucceededBeforeRoute = ShortenRouteMode.PrependIfSucceededBeforeRoute +RightToLeft = LaneChangeDirection.RightToLeft +SameDrivingDirection = RouteCreationMode.SameDrivingDirection +Shorter = CompareRouteResult.Shorter +SingleLane = RouteSectionCreationMode.SingleLane +SubRoutesPreferLongerOnes = FilterDuplicatesMode.SubRoutesPreferLongerOnes +SubRoutesPreferShorterOnes = FilterDuplicatesMode.SubRoutesPreferShorterOnes +Succeeded = ShortenRouteResult.Succeeded +SucceededBeforeRoute = ShortenRouteResult.SucceededBeforeRoute +SucceededIntersectionNotCut = ShortenRouteResult.SucceededIntersectionNotCut +SucceededRouteEmpty = ShortenRouteResult.SucceededRouteEmpty +Undefined = RouteCreationMode.Undefined + +class CompareRouteResult(int, _CarlaEnum): + Differ = 3 + Equal = 0 + Longer = 2 + Shorter = 1 + +class ConnectingRoute: + def assign(self, other: ConnectingRoute) -> ConnectingRoute: + """ + + assign( (ConnectingRoute)arg1, (ConnectingRoute)other) -> ConnectingRoute : + + C++ signature : + ad::map::route::ConnectingRoute {lvalue} assign(ad::map::route::ConnectingRoute {lvalue},ad::map::route::ConnectingRoute) + """ + ... + + @property + def routeA(self) -> FullRoute: ... + + @property + def routeB(self) -> FullRoute: ... + + @property + def type(self) -> ConnectingRouteType: ... + +class ConnectingRouteType(int, _CarlaEnum): + Following = 1 + + Invalid = 0 + + Merging = 3 + + Opposing = 2 + +class FilterDuplicatesMode(int, _CarlaEnum): + Off = 0 + + OnlyEqual = 1 + + SubRoutesPreferLongerOnes = 3 + + SubRoutesPreferShorterOnes = 2 + +class FindLaneChangeResult: + @property + def Valid(self) -> bool: ... + + @property + def calcZoneLength(self) -> ad.physics.Distance: ... + + def get_queryRoute(self) -> FullRoute: + """ + + get_queryRoute( (FindLaneChangeResult)arg1) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute get_queryRoute(ad::map::route::FindLaneChangeResult {lvalue}) + """ + ... + + @property + def laneChangeDirection(self) -> LaneChangeDirection: ... + + @property + def laneChangeEndLaneSegmentIterator(self) -> Unknown: ... + + @property + def laneChangeEndRouteIterator(self) -> Unknown: ... + + @property + def laneChangeStartLaneSegmentIterator(self) -> Unknown: ... + + @property + def laneChangeStartRouteIterator(self) -> Unknown: ... + + @property + def numberOfConnectedLaneChanges(self) -> int: ... + +class FindWaypointResult: + @property + def LeftLane(self) -> FindWaypointResult: ... + + @property + def PredecessorLanes(self) -> FindWaypointResult: ... + + @property + def RightLane(self) -> FindWaypointResult: ... + + @property + def SuccessorLanes(self) -> FindWaypointResult: ... + + @property + def Valid(self) -> FindWaypointResult: ... + + def assign(self, other: FindWaypointResult) -> FindWaypointResult: + """ + + assign( (FindWaypointResult)arg1, (FindWaypointResult)other) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult {lvalue} assign(ad::map::route::FindWaypointResult {lvalue},ad::map::route::FindWaypointResult) + """ + ... + + def get_queryRoute(self) -> FullRoute: + """ + + get_queryRoute( (FindWaypointResult)arg1) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute get_queryRoute(ad::map::route::FindWaypointResult {lvalue}) + """ + ... + + @property + def laneSegmentIterator(self) -> FindWaypointResult: ... + + @property + def queryPosition(self) -> FindWaypointResult: ... + + @property + def roadSegmentIterator(self) -> FindWaypointResult: ... + +class FullRoute: + def assign(self, other: FullRoute) -> FullRoute: + """ + + assign( (FullRoute)arg1, (FullRoute)other) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute {lvalue} assign(ad::map::route::FullRoute {lvalue},ad::map::route::FullRoute) + """ + ... + + @property + def destinationLaneOffset(self) -> int: ... + + @property + def fullRouteSegmentCount(self) -> int: ... + + @property + def maxLaneOffset(self) -> int: ... + + @property + def minLaneOffset(self) -> int: ... + + @property + def roadSegments(self) -> RoadSegmentList: ... + + @property + def routeCreationMode(self) -> RouteCreationMode: ... + + @property + def routePlanningCounter(self) -> int: ... + +class FullRouteList: + def append(self, arg2: FullRoute) -> None: + """ + + append( (FullRouteList)arg1, (FullRoute)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::route::FullRoute) + """ + ... + + def count(self, arg2: FullRoute) -> int: + """ + + count( (FullRouteList)arg1, (FullRoute)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::route::FullRoute) + """ + ... + + def extend(self, arg2: Iterable[FullRoute]) -> None: + """ + + extend( (FullRouteList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg2: FullRoute) -> int: + """ + + index( (FullRouteList)arg1, (FullRoute)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::route::FullRoute) + """ + ... + + def insert(self, arg2: int, arg3: FullRoute) -> None: + """ + + insert( (FullRouteList)arg1, (int)arg2, (FullRoute)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::route::FullRoute) + """ + ... + + def reverse(self) -> None: + """ + + reverse( (FullRouteList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class LaneChangeDirection(int, _CarlaEnum): + Invalid = 2 + + LeftToRight = 0 + + RightToLeft = 1 + +class LaneInterval: + def assign(self, arg1: LaneInterval, other: LaneInterval) -> LaneInterval: + """ + + assign( (LaneInterval)arg1, (LaneInterval)other) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval {lvalue} assign(ad::map::route::LaneInterval {lvalue},ad::map::route::LaneInterval) + """ + ... + + @property + def end(self) -> ad.physics.ParametricValue: ... + + @property + def laneId(self) -> lane.LaneId: ... + + @property + def start(self) -> ad.physics.ParametricValue: ... + + @property + def wrongWay(self) -> bool: ... + +class LaneSegment: + def assign(self, other: LaneSegment) -> LaneSegment: + """ + + assign( (LaneSegment)arg1, (LaneSegment)other) -> LaneSegment : + + C++ signature : + ad::map::route::LaneSegment {lvalue} assign(ad::map::route::LaneSegment {lvalue},ad::map::route::LaneSegment) + """ + ... + + @property + def laneInterval(self) -> LaneInterval: ... + + @property + def leftNeighbor(self) -> lane.LaneId: ... + + @property + def predecessors(self) -> lane.LaneIdList: ... + + @property + def rightNeighbor(self) -> lane.LaneId: ... + + @property + def routeLaneOffset(self) -> int: ... + + @property + def successors(self) -> lane.LaneIdList: ... + +class LaneSegmentList(ad._VectorSequence[LaneSegment]): + ... +class RoadSegment: + def assign(self, other: RoadSegment) -> RoadSegment: + """ + + assign( (RoadSegment)arg1, (RoadSegment)other) -> RoadSegment : + + C++ signature : + ad::map::route::RoadSegment {lvalue} assign(ad::map::route::RoadSegment {lvalue},ad::map::route::RoadSegment) + """ + ... + + @property + def boundingSphere(self) -> point.BoundingSphere: ... + + @property + def drivableLaneSegments(self) -> LaneSegmentList: ... + + @property + def segmentCountFromDestination(self) -> int: ... + +class RoadSegmentList(ad._VectorSequence[ad.map.route.RoadSegment]): + ... + +class Route: + @property + def BasicRoutes(self) -> Unknown: ... + + @property + def Dest(self) -> Unknown: ... + + INVALID = 0 + + RawRoute: TypeAlias = Route + + @property + def RawRoutes(self) -> Unknown: ... + + @property + def RoutingDest(self) -> Unknown: ... + + @property + def RoutingStart(self) -> Unknown: ... + + SHORTEST = 1 + + SHORTEST_IGNORE_DIRECTION = 2 + + @property + def Start(self) -> Unknown: ... + + Type: TypeAlias = Route + + @property + def Valid(self) -> Unknown: ... + + @overload + def calculate(self) -> None: ... + + @overload + def calculate(self) -> bool: ... + + def calculate(self) -> bool | None: + """ + + calculate( (Route)arg1) -> bool : + + C++ signature : + bool calculate(ad::map::route::planning::Route {lvalue}) + + calculate( (Route)arg1) -> None : + + C++ signature : + void calculate(Route_wrapper {lvalue}) + """ + ... + + def getBasicRoute(self, routeIndex: int = 0) -> object: + """ + + getBasicRoute( (Route)arg1 [, (object)routeIndex=0]) -> object : + + C++ signature : + std::vector >, std::allocator > > > getBasicRoute(ad::map::route::planning::Route {lvalue} [,unsigned long=0]) + """ + ... + + def getRawRoute(self, routeIndex: int = 0) -> Route.RawRoute: + """ + + getRawRoute( (Route)arg1 [, (object)routeIndex=0]) -> RawRoute : + + C++ signature : + ad::map::route::planning::Route::RawRoute getRawRoute(ad::map::route::planning::Route {lvalue} [,unsigned long=0]) + """ + ... + + def getType(self) -> Route.Type: + """ + + getType( (Route)arg1) -> Type : + + C++ signature : + ad::map::route::planning::Route::Type getType(ad::map::route::planning::Route {lvalue}) + """ + ... + + @property + def laneDirectionIsIgnored(self) -> Unknown: ... + +class RouteCreationMode(int, _CarlaEnum): + AllNeighborLanes = 3 + + AllRoutableLanes = 2 + + SameDrivingDirection = 1 + + Undefined = 0 + +class RouteIterator: + @property + def Valid(self) -> FullRoute: ... + + def get_route(self) -> FullRoute: + """ + + get_route( (RouteIterator)arg1) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute get_route(ad::map::route::RouteIterator {lvalue}) + """ + ... + + @property + def roadSegmentIterator(self) -> FullRoute: ... + +class RouteParaPoint: + def assign(self, other: RouteParaPoint) -> RouteParaPoint: + """ + + assign( (RouteParaPoint)arg1, (RouteParaPoint)other) -> RouteParaPoint : + + C++ signature : + ad::map::route::RouteParaPoint {lvalue} assign(ad::map::route::RouteParaPoint {lvalue},ad::map::route::RouteParaPoint) + """ + ... + + @property + def parametricOffset(self) -> ad.physics.ParametricValue: ... + + @property + def routePlanningCounter(self) -> int: ... + + @property + def segmentCountFromDestination(self) -> int: ... + +class RouteSectionCreationMode(int, _CarlaEnum): + AllRouteLanes = 1 + + SingleLane = 0 + +class RoutingDirection(int, _CarlaEnum): + DONT_CARE = 0 + + NEGATIVE = 2 + + POSITIVE = 1 + +class RoutingParaPoint: + @property + def direction(self) -> RoutingDirection: ... + + @property + def point(self) -> point.ParaPoint: ... + +class ShortenRouteMode(int): + DontCutIntersectionAndPrependIfSucceededBeforeRoute = 2 + + Normal = 0 + + PrependIfSucceededBeforeRoute = 1 + +class ShortenRouteResult(int): + FailedRouteEmpty = 4 + + Succeeded = 0 + + SucceededBeforeRoute = 1 + + SucceededIntersectionNotCut = 3 + + SucceededRouteEmpty = 2 + +class vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_: + def append(self, arg2: RoutingParaPoint) -> None: + """ + + append( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1, (RoutingParaPoint)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::map::route::planning::RoutingParaPoint) + """ + ... + + def count(self, arg2: RoutingParaPoint) -> int: + """ + + count( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1, (RoutingParaPoint)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::map::route::planning::RoutingParaPoint) + """ + ... + + def extend(self, arg2: object) -> None: + """ + + extend( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg2: RoutingParaPoint) -> int: + """ + + index( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1, (RoutingParaPoint)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::map::route::planning::RoutingParaPoint) + """ + ... + + def insert(self, arg2: int, arg3: RoutingParaPoint) -> None: + """ + + insert( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1, (int)arg2, (RoutingParaPoint)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::map::route::planning::RoutingParaPoint) + """ + ... + + def reverse(self) -> None: + """ + + reverse( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self) -> None: + """ + + sort( (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + + +def calcLength(obj, /) -> ad.physics.Distance: ... + +def calcDuration(obj, /) -> ad.physics.Duration: ... + +def calcParametricLength(laneInterval: LaneInterval, /) -> ad.physics.ParametricValue: ... + +def calculateBypassingRoute(route: FullRoute, bypassingRoute: FullRoute, /) -> bool: ... + +def calculateConnectingRoute(*args, **kwargs): + """ + calculateConnectingRoute( (Object)startObject, (Object)destObject, (Distance)maxDistance, (Duration)maxDuration [, (FullRouteList)startObjectPredictionHints= [, (FullRouteList)destObjectPredictionHints= [, (LaneIdSet)relevantLanes=]]]) -> ConnectingRoute : + + C++ signature : + ad::map::route::ConnectingRoute calculateConnectingRoute(ad::map::match::Object,ad::map::match::Object,ad::physics::Distance,ad::physics::Duration [,std::vector >= [,std::vector >= [,std::set, std::allocator >=]]]) + + calculateConnectingRoute( (Object)startObject, (Object)destObject, (Distance)maxDistance [, (FullRouteList)startObjectPredictionHints= [, (FullRouteList)destObjectPredictionHints= [, (LaneIdSet)relevantLanes=]]]) -> ConnectingRoute : + + C++ signature : + ad::map::route::ConnectingRoute calculateConnectingRoute(ad::map::match::Object,ad::map::match::Object,ad::physics::Distance [,std::vector >= [,std::vector >= [,std::set, std::allocator >=]]]) + + calculateConnectingRoute( (Object)startObject, (Object)destObject, (Duration)maxDuration [, (FullRouteList)startObjectPredictionHints= [, (FullRouteList)destObjectPredictionHints= [, (LaneIdSet)relevantLanes=]]]) -> ConnectingRoute : + + C++ signature : + ad::map::route::ConnectingRoute calculateConnectingRoute(ad::map::match::Object,ad::map::match::Object,ad::physics::Duration [,std::vector >= [,std::vector >= [,std::set, std::allocator >=]]])""" +def calculateRouteParaPointAtDistance(*args, **kwargs): + """ + calculateRouteParaPointAtDistance( (FullRoute)route, (RouteParaPoint)origin, (Distance)distance, (RouteParaPoint)resultingPoint) -> bool : + + C++ signature : + bool calculateRouteParaPointAtDistance(ad::map::route::FullRoute,ad::map::route::RouteParaPoint,ad::physics::Distance,ad::map::route::RouteParaPoint {lvalue})""" +def compareRoutesOnIntervalLevel(*args, **kwargs): + """ + compareRoutesOnIntervalLevel( (FullRoute)left, (FullRoute)right) -> CompareRouteResult : + + C++ signature : + ad::map::route::planning::CompareRouteResult compareRoutesOnIntervalLevel(ad::map::route::FullRoute,ad::map::route::FullRoute)""" +def createFullRoute(*args, **kwargs): + """ + createFullRoute( (RawRoute)rawRoute, (RouteCreationMode)routeCreationMode, (LaneIdSet)relevantLanes) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute createFullRoute(ad::map::route::planning::Route::RawRoute,ad::map::route::RouteCreationMode,std::set, std::allocator >)""" +def createRoutingParaPoint(*args, **kwargs): + """ + createRoutingParaPoint( (LaneId)laneId, (ParametricValue)parametricOffset [, (RoutingDirection)routingDirection=route.RoutingDirection.DONT_CARE]) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingParaPoint(ad::map::lane::LaneId,ad::physics::ParametricValue [,ad::map::route::planning::RoutingDirection=route.RoutingDirection.DONT_CARE])""" + +@overload +def createRoutingPoint(ad) -> Any: + """ + createRoutingPoint( (LaneId)laneId, (ParametricValue)parametricOffset [, (RoutingDirection)routingDirection=route.RoutingDirection.DONT_CARE]) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingPoint(ad::map::lane::LaneId,ad::physics::ParametricValue [,ad::map::route::planning::RoutingDirection=route.RoutingDirection.DONT_CARE]) + + createRoutingPoint( (ParaPoint)paraPoint [, (RoutingDirection)routingDirection=route.RoutingDirection.DONT_CARE]) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingPoint(ad::map::point::ParaPoint [,ad::map::route::planning::RoutingDirection=route.RoutingDirection.DONT_CARE]) + + createRoutingPoint( (LaneOccupiedRegion)occupiedRegion [, (RoutingDirection)routingDirection=route.RoutingDirection.DONT_CARE]) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingPoint(ad::map::match::LaneOccupiedRegion [,ad::map::route::planning::RoutingDirection=route.RoutingDirection.DONT_CARE]) + + createRoutingPoint( (ParaPoint)paraPoint, (ENUHeading)heading) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingPoint(ad::map::point::ParaPoint,ad::map::point::ENUHeading) + + createRoutingPoint( (LaneOccupiedRegion)occupiedRegion, (ENUHeading)heading) -> RoutingParaPoint : + + C++ signature : + ad::map::route::planning::RoutingParaPoint createRoutingPoint(ad::map::match::LaneOccupiedRegion,ad::map::point::ENUHeading)""" + +@overload +def createRoutingPoint(obj, routingDirection: route.RoutingDirection=route.RoutingDirection.DONT_CARE) -> RoutingParaPoint: ... + +@overload +def createRoutingPoint(obj: match.LaneOccupiedRegion | point.ParaPoint, heading: point.ENUHeading) -> RoutingParaPoint: ... + +def cutIntervalAtEnd(*args, **kwargs): + """ + cutIntervalAtEnd( (LaneInterval)laneInterval, (ParametricValue)newIntervalEnd) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval cutIntervalAtEnd(ad::map::route::LaneInterval,ad::physics::ParametricValue)""" +def cutIntervalAtStart(*args, **kwargs): + """ + cutIntervalAtStart( (LaneInterval)laneInterval, (ParametricValue)newIntervalStart) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval cutIntervalAtStart(ad::map::route::LaneInterval,ad::physics::ParametricValue)""" +def extendIntervalFromEnd(*args, **kwargs): + """ + extendIntervalFromEnd( (LaneInterval)laneInterval, (Distance)distance) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval extendIntervalFromEnd(ad::map::route::LaneInterval,ad::physics::Distance)""" +def extendIntervalFromStart(*args, **kwargs): + """ + extendIntervalFromStart( (LaneInterval)laneInterval, (Distance)distance) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval extendIntervalFromStart(ad::map::route::LaneInterval,ad::physics::Distance)""" +def extendIntervalUntilEnd(ad) -> Any: + """ + extendIntervalUntilEnd( (LaneInterval)laneInterval) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval extendIntervalUntilEnd(ad::map::route::LaneInterval)""" +def extendIntervalUntilStart(ad) -> Any: + """ + extendIntervalUntilStart( (LaneInterval)laneInterval) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval extendIntervalUntilStart(ad::map::route::LaneInterval)""" +def extendRouteToDestinations(*args, **kwargs): + """ + extendRouteToDestinations( (FullRoute)route, (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)dest) -> bool : + + C++ signature : + bool extendRouteToDestinations(ad::map::route::FullRoute {lvalue},std::vector >) + + extendRouteToDestinations( (FullRoute)route, (GeoEdge)dest) -> bool : + + C++ signature : + bool extendRouteToDestinations(ad::map::route::FullRoute {lvalue},std::vector >) + + extendRouteToDestinations( (FullRoute)route, (ENUEdge)dest) -> bool : + + C++ signature : + bool extendRouteToDestinations(ad::map::route::FullRoute {lvalue},std::vector >)""" +def extendRouteToDistance(*args, **kwargs): + """ + extendRouteToDistance( (FullRoute)route, (Distance)length, (FullRouteList)additionalRoutes [, (LaneIdSet)relevantLanes=]) -> bool : + + C++ signature : + bool extendRouteToDistance(ad::map::route::FullRoute {lvalue},ad::physics::Distance,std::vector > {lvalue} [,std::set, std::allocator >=])""" +def filterDuplicatedRoutes(*args, **kwargs): + """ + filterDuplicatedRoutes( (FullRouteList)fullRoutes, (FilterDuplicatesMode)filterMode) -> FullRouteList : + + C++ signature : + std::vector > filterDuplicatedRoutes(std::vector >,ad::map::route::planning::FilterDuplicatesMode)""" +def findCenterWaypoint(*args, **kwargs): + """ + findCenterWaypoint( (Object)object, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult findCenterWaypoint(ad::map::match::Object,ad::map::route::FullRoute)""" +def findFirstLaneChange(*args, **kwargs): + """ + findFirstLaneChange( (MapMatchedPosition)currentPositionEgoVehicle, (FullRoute)route) -> FindLaneChangeResult : + + C++ signature : + ad::map::route::FindLaneChangeResult findFirstLaneChange(ad::map::match::MapMatchedPosition,ad::map::route::FullRoute)""" +def findNearestWaypoint(*args, **kwargs): + """ + findNearestWaypoint( (ParaPointList)positions, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult findNearestWaypoint(std::vector >,ad::map::route::FullRoute) + + findNearestWaypoint( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)mapMatchedPositions, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult findNearestWaypoint(std::vector >,ad::map::route::FullRoute)""" +def findWaypoint(*args, **kwargs): + """ + findWaypoint( (ParaPoint)position, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult findWaypoint(ad::map::point::ParaPoint,ad::map::route::FullRoute) + + findWaypoint( (LaneId)laneId, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult findWaypoint(ad::map::lane::LaneId,ad::map::route::FullRoute)""" +def fromString(*args, **kwargs): + """ + fromString( (str)str) -> ConnectingRouteType : + + C++ signature : + ad::map::route::ConnectingRouteType fromString(std::__cxx11::basic_string, std::allocator >) + + fromString( (str)str) -> RouteCreationMode : + + C++ signature : + ad::map::route::RouteCreationMode fromString(std::__cxx11::basic_string, std::allocator >) + + fromString( (str)str) -> LaneChangeDirection : + + C++ signature : + ad::map::route::LaneChangeDirection fromString(std::__cxx11::basic_string, std::allocator >)""" +def getECEFBorder(ad) -> Any: + """ + getECEFBorder( (LaneInterval)laneInterval) -> ECEFBorder : + + C++ signature : + ad::map::lane::ECEFBorder getECEFBorder(ad::map::route::LaneInterval)""" +def getECEFBorderOfRoadSegment(ad) -> Any: + """ + getECEFBorderOfRoadSegment( (RoadSegment)roadSegment [, (ParametricValue)parametricOffset]) -> ECEFBorder : + + C++ signature : + ad::map::lane::ECEFBorder getECEFBorderOfRoadSegment(ad::map::route::RoadSegment [,ad::physics::ParametricValue])""" +def getECEFBorderOfRoute(ad) -> Any: + """ + getECEFBorderOfRoute( (FullRoute)route) -> ECEFBorderList : + + C++ signature : + std::vector > getECEFBorderOfRoute(ad::map::route::FullRoute)""" +def getENUBorder(ad) -> Any: + """ + getENUBorder( (LaneInterval)laneInterval) -> ENUBorder : + + C++ signature : + ad::map::lane::ENUBorder getENUBorder(ad::map::route::LaneInterval)""" +def getENUBorderOfRoadSegment(ad) -> Any: + """ + getENUBorderOfRoadSegment( (RoadSegment)roadSegment [, (ParametricValue)parametricOffset]) -> ENUBorder : + + C++ signature : + ad::map::lane::ENUBorder getENUBorderOfRoadSegment(ad::map::route::RoadSegment [,ad::physics::ParametricValue])""" +def getENUBorderOfRoute(ad) -> Any: + """ + getENUBorderOfRoute( (FullRoute)route) -> ENUBorderList : + + C++ signature : + std::vector > getENUBorderOfRoute(ad::map::route::FullRoute)""" +def getENUHeadingOfRoute(*args, **kwargs): + """ + getENUHeadingOfRoute( (Object)object, (FullRoute)route) -> ENUHeading : + + C++ signature : + ad::map::point::ENUHeading getENUHeadingOfRoute(ad::map::match::Object,ad::map::route::FullRoute)""" +def getENUProjectedBorder(ad) -> lane.ENUBorder: + """ + getENUProjectedBorder( (LaneInterval)laneInterval) -> ENUBorder : + + C++ signature : + ad::map::lane::ENUBorder getENUProjectedBorder(ad::map::route::LaneInterval)""" +def getGeoBorder(ad) -> lane.GeoBorder: + """ + getGeoBorder( (LaneInterval)laneInterval) -> GeoBorder : + + C++ signature : + ad::map::lane::GeoBorder getGeoBorder(ad::map::route::LaneInterval)""" +def getGeoBorderOfRoadSegment(ad) -> lane.GeoBorder: + """ + getGeoBorderOfRoadSegment( (RoadSegment)roadSegment [, (ParametricValue)parametricOffset]) -> GeoBorder : + + C++ signature : + ad::map::lane::GeoBorder getGeoBorderOfRoadSegment(ad::map::route::RoadSegment [,ad::physics::ParametricValue])""" +def getGeoBorderOfRoute(ad) -> lane.GeoBorderList: + """ + getGeoBorderOfRoute( (FullRoute)route) -> GeoBorderList : + + C++ signature : + std::vector > getGeoBorderOfRoute(ad::map::route::FullRoute)""" +def getIntervalEnd(ad) -> point.ParaPoint: + """ + getIntervalEnd( (LaneInterval)laneInterval) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getIntervalEnd(ad::map::route::LaneInterval)""" +def getIntervalStart(ad) -> point.ParaPoint: + """ + getIntervalStart( (LaneInterval)laneInterval) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getIntervalStart(ad::map::route::LaneInterval) + + getIntervalStart( (FullRoute)route, (LaneId)laneId) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getIntervalStart(ad::map::route::FullRoute,ad::map::lane::LaneId)""" +def getLaneParaPoint(*args, **kwargs): + """ + getLaneParaPoint( (ParametricValue)routeParametricOffset, (LaneInterval)laneInterval) -> ParaPoint : + + C++ signature : + ad::map::point::ParaPoint getLaneParaPoint(ad::physics::ParametricValue,ad::map::route::LaneInterval)""" +def getLaneParaPoints(*args, **kwargs): + """ + getLaneParaPoints( (RouteParaPoint)routePosition, (FullRoute)route) -> ParaPointList : + + C++ signature : + std::vector > getLaneParaPoints(ad::map::route::RouteParaPoint,ad::map::route::FullRoute)""" +def getLeftECEFEdge(ad) -> point.ECEFEdge: + """ + getLeftECEFEdge( (LaneInterval)laneInterval) -> ECEFEdge : + + C++ signature : + std::vector > getLeftECEFEdge(ad::map::route::LaneInterval)""" +def getLeftENUEdge(ad) -> point.ENUEdge: + """ + getLeftENUEdge( (LaneInterval)laneInterval) -> ENUEdge : + + C++ signature : + std::vector > getLeftENUEdge(ad::map::route::LaneInterval)""" +def getLeftEdge(*args, **kwargs): + """ + getLeftEdge( (LaneInterval)laneInterval, (ENUEdge)enuEdge) -> None : + + C++ signature : + void getLeftEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getLeftEdge( (LaneInterval)laneInterval, (ECEFEdge)ecefEdge) -> None : + + C++ signature : + void getLeftEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getLeftEdge( (LaneInterval)laneInterval, (GeoEdge)geoEdge) -> None : + + C++ signature : + void getLeftEdge(ad::map::route::LaneInterval,std::vector > {lvalue})""" +def getLeftGeoEdge(ad) -> point.GeoEdge: + """ + getLeftGeoEdge( (LaneInterval)laneInterval) -> GeoEdge : + + C++ signature : + std::vector > getLeftGeoEdge(ad::map::route::LaneInterval)""" +def getLeftProjectedECEFEdge(ad) -> point.ECEFEdge: + """ + getLeftProjectedECEFEdge( (LaneInterval)laneInterval) -> ECEFEdge : + + C++ signature : + std::vector > getLeftProjectedECEFEdge(ad::map::route::LaneInterval)""" +def getLeftProjectedENUEdge(laneInterval: LaneInterval) -> point.ENUEdge: + """ + getLeftProjectedENUEdge( (LaneInterval)laneInterval) -> ENUEdge : + + C++ signature : + std::vector > getLeftProjectedENUEdge(ad::map::route::LaneInterval)""" +def getLeftProjectedEdge(*args, **kwargs): + """ + getLeftProjectedEdge( (LaneInterval)laneInterval, (ENUEdge)enuEdge) -> None : + + C++ signature : + void getLeftProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getLeftProjectedEdge( (LaneInterval)laneInterval, (ECEFEdge)ecefEdge) -> None : + + C++ signature : + void getLeftProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getLeftProjectedEdge( (LaneInterval)laneInterval, (GeoEdge)geoEdge) -> None : + + C++ signature : + void getLeftProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue})""" +def getLeftProjectedGeoEdge(ad) -> Any: + """ + getLeftProjectedGeoEdge( (LaneInterval)laneInterval) -> GeoEdge : + + C++ signature : + std::vector > getLeftProjectedGeoEdge(ad::map::route::LaneInterval)""" +def getMetricRanges(*args, **kwargs): + """ + getMetricRanges( (LaneInterval)laneInterval, (MetricRange)lengthRange, (MetricRange)widthRange) -> None : + + C++ signature : + void getMetricRanges(ad::map::route::LaneInterval,ad::physics::MetricRange {lvalue},ad::physics::MetricRange {lvalue})""" +def getProjectedParametricOffsetOnNeighborLane(*args, **kwargs): + """ + getProjectedParametricOffsetOnNeighborLane( (LaneInterval)currentInterval, (LaneInterval)neighborInterval, (ParametricValue)parametricOffset) -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue getProjectedParametricOffsetOnNeighborLane(ad::map::route::LaneInterval,ad::map::route::LaneInterval,ad::physics::ParametricValue)""" +def getRightECEFEdge(ad) -> Any: + """ + getRightECEFEdge( (LaneInterval)laneInterval) -> ECEFEdge : + + C++ signature : + std::vector > getRightECEFEdge(ad::map::route::LaneInterval)""" +def getRightENUEdge(ad) -> Any: + """ + getRightENUEdge( (LaneInterval)laneInterval) -> ENUEdge : + + C++ signature : + std::vector > getRightENUEdge(ad::map::route::LaneInterval)""" +def getRightEdge(*args, **kwargs): + """ + getRightEdge( (LaneInterval)laneInterval, (ENUEdge)enuEdge) -> None : + + C++ signature : + void getRightEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getRightEdge( (LaneInterval)laneInterval, (ECEFEdge)ecefEdge) -> None : + + C++ signature : + void getRightEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getRightEdge( (LaneInterval)laneInterval, (GeoEdge)geoEdge) -> None : + + C++ signature : + void getRightEdge(ad::map::route::LaneInterval,std::vector > {lvalue})""" +def getRightGeoEdge(laneInterval: LaneInterval) -> point.GeoEdge: + """ + getRightGeoEdge( (LaneInterval)laneInterval) -> GeoEdge : + + C++ signature : + std::vector > getRightGeoEdge(ad::map::route::LaneInterval)""" +def getRightProjectedECEFEdge(laneInterval: LaneInterval) -> point.ECEFEdge: + """ + getRightProjectedECEFEdge( (LaneInterval)laneInterval) -> ECEFEdge : + + C++ signature : + std::vector > getRightProjectedECEFEdge(ad::map::route::LaneInterval)""" +def getRightProjectedENUEdge(laneInterval: LaneInterval) -> point.ENUEdge: + """ + getRightProjectedENUEdge( (LaneInterval)laneInterval) -> ENUEdge : + + C++ signature : + std::vector > getRightProjectedENUEdge(ad::map::route::LaneInterval)""" +def getRightProjectedEdge(*args, **kwargs): + """ + getRightProjectedEdge( (LaneInterval)laneInterval, (ENUEdge)enuEdge) -> None : + + C++ signature : + void getRightProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getRightProjectedEdge( (LaneInterval)laneInterval, (ECEFEdge)ecefEdge) -> None : + + C++ signature : + void getRightProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue}) + + getRightProjectedEdge( (LaneInterval)laneInterval, (GeoEdge)geoEdge) -> None : + + C++ signature : + void getRightProjectedEdge(ad::map::route::LaneInterval,std::vector > {lvalue})""" +def getRightProjectedGeoEdge(ad) -> Any: + """ + getRightProjectedGeoEdge( (LaneInterval)laneInterval) -> GeoEdge : + + C++ signature : + std::vector > getRightProjectedGeoEdge(ad::map::route::LaneInterval)""" +def getRouteExpandedToAllNeighborLanes(ad) -> Any: + """ + getRouteExpandedToAllNeighborLanes( (FullRoute)route) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute getRouteExpandedToAllNeighborLanes(ad::map::route::FullRoute)""" +def getRouteExpandedToOppositeLanes(ad) -> Any: + """ + getRouteExpandedToOppositeLanes( (FullRoute)route) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute getRouteExpandedToOppositeLanes(ad::map::route::FullRoute)""" +def getRouteIterator(*args, **kwargs): + """ + getRouteIterator( (RouteParaPoint)routePosition, (FullRoute)route) -> RouteIterator : + + C++ signature : + ad::map::route::RouteIterator getRouteIterator(ad::map::route::RouteParaPoint,ad::map::route::FullRoute)""" +def getRouteParaPointFromParaPoint(*args, **kwargs): + """ + getRouteParaPointFromParaPoint( (ParaPoint)paraPoint, (FullRoute)route, (RouteParaPoint)routeParaPoint) -> bool : + + C++ signature : + bool getRouteParaPointFromParaPoint(ad::map::point::ParaPoint,ad::map::route::FullRoute,ad::map::route::RouteParaPoint {lvalue})""" +def getRouteSection(*args, **kwargs): + """ + getRouteSection( (FindWaypointResult)currentLane, (Distance)distanceFront, (Distance)distanceEnd, (FullRoute)route [, (RouteSectionCreationMode)routeSectionCreationMode=route.RouteSectionCreationMode.SingleLane]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute getRouteSection(ad::map::route::FindWaypointResult,ad::physics::Distance,ad::physics::Distance,ad::map::route::FullRoute [,ad::map::route::RouteSectionCreationMode=route.RouteSectionCreationMode.SingleLane]) + + getRouteSection( (ParaPoint)centerPoint, (Distance)distanceFront, (Distance)distanceEnd, (FullRoute)route [, (RouteSectionCreationMode)routeSectionCreationMode=route.RouteSectionCreationMode.SingleLane]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute getRouteSection(ad::map::point::ParaPoint,ad::physics::Distance,ad::physics::Distance,ad::map::route::FullRoute [,ad::map::route::RouteSectionCreationMode=route.RouteSectionCreationMode.SingleLane]) + + getRouteSection( (Object)object, (FullRoute)route [, (RouteSectionCreationMode)routeSectionCreationMode=route.RouteSectionCreationMode.SingleLane]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute getRouteSection(ad::map::match::Object,ad::map::route::FullRoute [,ad::map::route::RouteSectionCreationMode=route.RouteSectionCreationMode.SingleLane])""" +def getSignedDistance(*args, **kwargs): + """ + getSignedDistance( (LaneInterval)laneInterval, (ParaPoint)first, (ParaPoint)second) -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue getSignedDistance(ad::map::route::LaneInterval,ad::map::point::ParaPoint,ad::map::point::ParaPoint)""" + + +@overload +def getSpeedLimits(ad) -> restriction.SpeedLimitList: ... + +@overload +def getSpeedLimits(*args) -> restriction.SpeedLimitList: ... + + +def getUnsignedDistance(*args, **kwargs): + """ + getUnsignedDistance( (LaneInterval)laneInterval, (ParaPoint)first, (ParaPoint)second) -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue getUnsignedDistance(ad::map::route::LaneInterval,ad::map::point::ParaPoint,ad::map::point::ParaPoint)""" +def intersectionOnRoute(*args, **kwargs): + """ + intersectionOnRoute( (Intersection)intersection, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult intersectionOnRoute(ad::map::intersection::Intersection,ad::map::route::FullRoute)""" +def isAfterInterval(*args, **kwargs): + """ + isAfterInterval( (LaneInterval)laneInterval, (ParametricValue)parametricOffset) -> bool : + + C++ signature : + bool isAfterInterval(ad::map::route::LaneInterval,ad::physics::ParametricValue) + + isAfterInterval( (LaneInterval)laneInterval, (ParaPoint)point) -> bool : + + C++ signature : + bool isAfterInterval(ad::map::route::LaneInterval,ad::map::point::ParaPoint)""" +def isBeforeInterval(*args, **kwargs): + """ + isBeforeInterval( (LaneInterval)laneInterval, (ParametricValue)parametricOffset) -> bool : + + C++ signature : + bool isBeforeInterval(ad::map::route::LaneInterval,ad::physics::ParametricValue) + + isBeforeInterval( (LaneInterval)laneInterval, (ParaPoint)point) -> bool : + + C++ signature : + bool isBeforeInterval(ad::map::route::LaneInterval,ad::map::point::ParaPoint)""" +def isConnectedRoutePartOfAnIntersection(ad) -> Any: + """ + isConnectedRoutePartOfAnIntersection( (ConnectingRoute)connectingRoute) -> bool : + + C++ signature : + bool isConnectedRoutePartOfAnIntersection(ad::map::route::ConnectingRoute)""" +def isDegenerated(ad) -> Any: + """ + isDegenerated( (LaneInterval)laneInterval) -> bool : + + C++ signature : + bool isDegenerated(ad::map::route::LaneInterval)""" +def isEndOfInterval(*args, **kwargs): + """ + isEndOfInterval( (LaneInterval)laneInterval, (ParaPoint)point) -> bool : + + C++ signature : + bool isEndOfInterval(ad::map::route::LaneInterval,ad::map::point::ParaPoint)""" +def isObjectHeadingInRouteDirection(*args, **kwargs): + """ + isObjectHeadingInRouteDirection( (Object)object, (FullRoute)route) -> bool : + + C++ signature : + bool isObjectHeadingInRouteDirection(ad::map::match::Object,ad::map::route::FullRoute)""" +def isRouteDirectionAlignedWithDrivingDirection(ad) -> Any: + """ + isRouteDirectionAlignedWithDrivingDirection( (LaneInterval)laneInterval) -> bool : + + C++ signature : + bool isRouteDirectionAlignedWithDrivingDirection(ad::map::route::LaneInterval)""" +def isRouteDirectionNegative(ad) -> Any: + """ + isRouteDirectionNegative( (LaneInterval)laneInterval) -> bool : + + C++ signature : + bool isRouteDirectionNegative(ad::map::route::LaneInterval)""" +def isRouteDirectionPositive(ad) -> Any: + """ + isRouteDirectionPositive( (LaneInterval)laneInterval) -> bool : + + C++ signature : + bool isRouteDirectionPositive(ad::map::route::LaneInterval)""" +def isStartOfInterval(*args, **kwargs): + """ + isStartOfInterval( (LaneInterval)laneInterval, (ParaPoint)point) -> bool : + + C++ signature : + bool isStartOfInterval(ad::map::route::LaneInterval,ad::map::point::ParaPoint)""" +def isWithinInterval(*args, **kwargs): + """ + isWithinInterval( (RoadSegment)roadSegment, (ParaPoint)point) -> bool : + + C++ signature : + bool isWithinInterval(ad::map::route::RoadSegment,ad::map::point::ParaPoint) + + isWithinInterval( (LaneInterval)laneInterval, (ParametricValue)parametricOffset) -> bool : + + C++ signature : + bool isWithinInterval(ad::map::route::LaneInterval,ad::physics::ParametricValue) + + isWithinInterval( (LaneInterval)laneInterval, (ParaPoint)point) -> bool : + + C++ signature : + bool isWithinInterval(ad::map::route::LaneInterval,ad::map::point::ParaPoint)""" +def objectOnRoute(*args, **kwargs): + """ + objectOnRoute( (MapMatchedObjectBoundingBox)object, (FullRoute)route) -> FindWaypointResult : + + C++ signature : + ad::map::route::FindWaypointResult objectOnRoute(ad::map::match::MapMatchedObjectBoundingBox,ad::map::route::FullRoute)""" +def overlapsInterval(*args, **kwargs): + """ + overlapsInterval( (LaneInterval)laneInterval, (ParametricRange)range) -> bool : + + C++ signature : + bool overlapsInterval(ad::map::route::LaneInterval,ad::physics::ParametricRange)""" +def planRoute(*args, **kwargs): + """ + planRoute( (RoutingParaPoint)start, (RoutingParaPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,ad::map::route::planning::RoutingParaPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (ParaPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::ParaPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (ENUHeading)startHeading, (ParaPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::ENUHeading,ad::map::point::ParaPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (ENUHeading)startHeading, (ParaPoint)dest, (ENUHeading)destHeading [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::ENUHeading,ad::map::point::ParaPoint,ad::map::point::ENUHeading [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (RoutingParaPoint)start, (GeoPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,ad::map::point::GeoPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (RoutingParaPoint)start, (ENUPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,ad::map::point::ENUPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (GeoPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::GeoPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (ENUHeading)startHeading, (GeoPoint)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::ENUHeading,ad::map::point::GeoPoint [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (PointOfInterest)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::config::PointOfInterest [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (RoutingParaPoint)start, (GeoEdge)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,std::vector > [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (RoutingParaPoint)start, (ENUEdge)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,std::vector > [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (RoutingParaPoint)start, (vector_less_ad_scope_map_scope_route_scope_planning_scope_RoutingParaPoint_greater_)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::route::planning::RoutingParaPoint,std::vector > [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection]) + + planRoute( (ParaPoint)start, (ENUHeading)startHeading, (GeoEdge)dest [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection]) -> FullRoute : + + C++ signature : + ad::map::route::FullRoute planRoute(ad::map::point::ParaPoint,ad::map::point::ENUHeading,std::vector > [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection])""" +def predictRoutes(*args, **kwargs): + """ + predictRoutes( (RoutingParaPoint)start, (Distance)predictionDistance, (Duration)predictionDuration [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutes(ad::map::route::planning::RoutingParaPoint,ad::physics::Distance,ad::physics::Duration [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]]) + + predictRoutes( (MapMatchedObjectBoundingBox)start, (Distance)predictionDistance, (Duration)predictionDuration [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutes(ad::map::match::MapMatchedObjectBoundingBox,ad::physics::Distance,ad::physics::Duration [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]])""" +def predictRoutesDirectionless(*args, **kwargs): + """ + predictRoutesDirectionless( (ParaPoint)start, (Distance)predictionDistance, (Duration)predictionDuration [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.AllRoutableLanes [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutesDirectionless(ad::map::point::ParaPoint,ad::physics::Distance,ad::physics::Duration [,ad::map::route::RouteCreationMode=route.RouteCreationMode.AllRoutableLanes [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]])""" +def predictRoutesOnDistance(*args, **kwargs): + """ + predictRoutesOnDistance( (RoutingParaPoint)start, (Distance)predictionDistance [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutesOnDistance(ad::map::route::planning::RoutingParaPoint,ad::physics::Distance [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]]) + + predictRoutesOnDistance( (MapMatchedObjectBoundingBox)start, (Distance)predictionDistance [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutesOnDistance(ad::map::match::MapMatchedObjectBoundingBox,ad::physics::Distance [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]])""" +def predictRoutesOnDuration(*args, **kwargs): + """ + predictRoutesOnDuration( (RoutingParaPoint)start, (Duration)predictionDuration [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutesOnDuration(ad::map::route::planning::RoutingParaPoint,ad::physics::Duration [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]]) + + predictRoutesOnDuration( (MapMatchedObjectBoundingBox)start, (Duration)predictionDuration [, (RouteCreationMode)routeCreationMode=route.RouteCreationMode.SameDrivingDirection [, (FilterDuplicatesMode)filterMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [, (LaneIdSet)relevantLanes=]]]) -> FullRouteList : + + C++ signature : + std::vector > predictRoutesOnDuration(ad::map::match::MapMatchedObjectBoundingBox,ad::physics::Duration [,ad::map::route::RouteCreationMode=route.RouteCreationMode.SameDrivingDirection [,ad::map::route::planning::FilterDuplicatesMode=route.FilterDuplicatesMode.SubRoutesPreferLongerOnes [,std::set, std::allocator >=]]])""" +def restrictIntervalFromBegin(*args, **kwargs): + """ + restrictIntervalFromBegin( (LaneInterval)laneInterval, (Distance)distance) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval restrictIntervalFromBegin(ad::map::route::LaneInterval,ad::physics::Distance)""" +def shortenIntervalFromBegin(*args, **kwargs): + """ + shortenIntervalFromBegin( (LaneInterval)laneInterval, (Distance)distance) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval shortenIntervalFromBegin(ad::map::route::LaneInterval,ad::physics::Distance)""" +def shortenIntervalFromEnd(*args, **kwargs): + """ + shortenIntervalFromEnd( (LaneInterval)laneInterval, (Distance)distance) -> LaneInterval : + + C++ signature : + ad::map::route::LaneInterval shortenIntervalFromEnd(ad::map::route::LaneInterval,ad::physics::Distance)""" +def shortenRoute(*args, **kwargs): + """ + shortenRoute( (ParaPoint)currentPosition, (FullRoute)route [, (ShortenRouteMode)shortenRouteMode=route.ShortenRouteMode.Normal]) -> ShortenRouteResult : + + C++ signature : + ad::map::route::ShortenRouteResult shortenRoute(ad::map::point::ParaPoint,ad::map::route::FullRoute {lvalue} [,ad::map::route::ShortenRouteMode=route.ShortenRouteMode.Normal]) + + shortenRoute( (ParaPointList)currentPositions, (FullRoute)route [, (ShortenRouteMode)shortenRouteMode=route.ShortenRouteMode.Normal]) -> ShortenRouteResult : + + C++ signature : + ad::map::route::ShortenRouteResult shortenRoute(std::vector >,ad::map::route::FullRoute {lvalue} [,ad::map::route::ShortenRouteMode=route.ShortenRouteMode.Normal]) + + shortenRoute( (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)mapMatchedPositions, (FullRoute)route [, (ShortenRouteMode)shortenRouteMode=route.ShortenRouteMode.Normal]) -> ShortenRouteResult : + + C++ signature : + ad::map::route::ShortenRouteResult shortenRoute(std::vector >,ad::map::route::FullRoute {lvalue} [,ad::map::route::ShortenRouteMode=route.ShortenRouteMode.Normal])""" +def shortenRouteToDistance(*args, **kwargs): + """ + shortenRouteToDistance( (FullRoute)route, (Distance)length) -> None : + + C++ signature : + void shortenRouteToDistance(ad::map::route::FullRoute {lvalue},ad::physics::Distance)""" +def shortenSegmentFromBegin(*args, **kwargs): + """ + shortenSegmentFromBegin( (RoadSegment)roadSegment, (Distance)distance) -> None : + + C++ signature : + void shortenSegmentFromBegin(ad::map::route::RoadSegment {lvalue},ad::physics::Distance)""" +def shortenSegmentFromEnd(*args, **kwargs): + """ + shortenSegmentFromEnd( (RoadSegment)roadSegment, (Distance)distance) -> None : + + C++ signature : + void shortenSegmentFromEnd(ad::map::route::RoadSegment {lvalue},ad::physics::Distance)""" +def signedDistanceToLane(*args, **kwargs): + """ + signedDistanceToLane( (LaneId)checkLaneId, (FullRoute)route, (vector_less_ad_scope_map_scope_match_scope_MapMatchedPosition_greater_)mapMatchedPositions) -> Distance : + + C++ signature : + ad::physics::Distance signedDistanceToLane(ad::map::lane::LaneId,ad::map::route::FullRoute,std::vector >)""" +def toParametricRange(ad) -> ad.physics.ParametricRange: + """ + toParametricRange( (LaneInterval)laneInterval) -> ParametricRange : + + C++ signature : + ad::physics::ParametricRange toParametricRange(ad::map::route::LaneInterval)""" + +def toString(ad) -> str: ... + +def to_string(ad) -> str: ... + +def updateRoutePlanningCounters(route: FullRoute) -> None: ... diff --git a/PythonAPI/carla/source/carla/ad/physics.pyi b/PythonAPI/carla/source/carla/ad/physics.pyi new file mode 100644 index 0000000000..da8b38a869 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/physics.pyi @@ -0,0 +1,1743 @@ + +from collections.abc import MutableSequence + +from ad import _FloatLike, _Calculable, _Assignable, _SortableSequence, _VectorSequence + +class Acceleration(_Calculable): + + cMaxValue: float = 1000.0 + + cMinValue: float = -1000.0 + + cPrecisionValue: float = 0.0001 + +class Acceleration3D(_FloatLike, _Assignable): + + @property + def x(self) -> Acceleration: ... + + @property + def y(self) -> Acceleration: ... + + @property + def z(self) -> Acceleration: ... + +class Acceleration3DList(_VectorSequence[Acceleration3D]): ... + +class AccelerationList(_VectorSequence[Acceleration]): + def append(self, arg1: AccelerationList, arg2: Acceleration) -> None: + """ + + append( (AccelerationList)arg1, (Acceleration)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::Acceleration) + """ + ... + + def count(self, arg1: AccelerationList, arg2: Acceleration) -> int: + """ + + count( (AccelerationList)arg1, (Acceleration)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::Acceleration) + """ + ... + + def extend(self, arg1: AccelerationList, arg2: object) -> None: + """ + + extend( (AccelerationList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: AccelerationList, arg2: Acceleration) -> int: + """ + + index( (AccelerationList)arg1, (Acceleration)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::Acceleration) + """ + ... + + def insert(self, arg1: AccelerationList, arg2: int, arg3: Acceleration) -> None: + """ + + insert( (AccelerationList)arg1, (int)arg2, (Acceleration)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::Acceleration) + """ + ... + + def reverse(self, arg1: AccelerationList) -> None: + """ + + reverse( (AccelerationList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: AccelerationList) -> None: + """ + + sort( (AccelerationList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class AccelerationRange: + def assign(self, arg1: AccelerationRange, other: AccelerationRange) -> AccelerationRange: + """ + + assign( (AccelerationRange)arg1, (AccelerationRange)other) -> AccelerationRange : + + C++ signature : + ad::physics::AccelerationRange {lvalue} assign(ad::physics::AccelerationRange {lvalue},ad::physics::AccelerationRange) + """ + ... + + @property + def maximum(self) -> Acceleration: ... + + @property + def minimum(self) -> Acceleration: ... + +class AccelerationRangeList: + def append(self, arg1: AccelerationRangeList, arg2: AccelerationRange) -> None: + """ + + append( (AccelerationRangeList)arg1, (AccelerationRange)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::AccelerationRange) + """ + ... + + def count(self, arg1: AccelerationRangeList, arg2: AccelerationRange) -> int: + """ + + count( (AccelerationRangeList)arg1, (AccelerationRange)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::AccelerationRange) + """ + ... + + def extend(self, arg1: AccelerationRangeList, arg2: object) -> None: + """ + + extend( (AccelerationRangeList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: AccelerationRangeList, arg2: AccelerationRange) -> int: + """ + + index( (AccelerationRangeList)arg1, (AccelerationRange)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::AccelerationRange) + """ + ... + + def insert(self, arg1: AccelerationRangeList, arg2: int, arg3: AccelerationRange) -> None: + """ + + insert( (AccelerationRangeList)arg1, (int)arg2, (AccelerationRange)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::AccelerationRange) + """ + ... + + def reverse(self, arg1: AccelerationRangeList) -> None: + """ + + reverse( (AccelerationRangeList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class Angle(_FloatLike): + cMaxValue: float = ... # likely unbound and depends on platform + + cMinValue: float = ... # likely unbound and depends on platform + + cPrecisionValue: float = 0.001 + +class AngleList(_SortableSequence[Angle]): + ... + +class AngleRange: + def assign(self, arg1: AngleRange, other: AngleRange) -> AngleRange: + """ + + assign( (AngleRange)arg1, (AngleRange)other) -> AngleRange : + + C++ signature : + ad::physics::AngleRange {lvalue} assign(ad::physics::AngleRange {lvalue},ad::physics::AngleRange) + """ + ... + + @property + def maximum(self) -> Angle: ... + + @property + def minimum(self) -> Angle: ... + +class AngleRangeList(_VectorSequence[AngleRange]): + ... + +class AngularAcceleration(_Calculable): + cMaxValue: float = 1000.0 + + cMinValue: float = -1000.0 + + cPrecisionValue: float = 0.0001 + + +class AngularAccelerationList(_SortableSequence[AngularAcceleration]): + ... + +class AngularVelocity(_Calculable): + + cMaxValue: float = 1000.0 + + cMinValue: float = -1000.0 + + cPrecisionValue: float = 0.001 + +class AngularVelocity3D: + def assign(self, arg1: AngularVelocity3D, other: AngularVelocity3D) -> AngularVelocity3D: + """ + + assign( (AngularVelocity3D)arg1, (AngularVelocity3D)other) -> AngularVelocity3D : + + C++ signature : + ad::physics::AngularVelocity3D {lvalue} assign(ad::physics::AngularVelocity3D {lvalue},ad::physics::AngularVelocity3D) + """ + ... + + @property + def x(self) -> AngularVelocity: ... + + @property + def y(self) -> AngularVelocity: ... + + @property + def z(self) -> AngularVelocity: ... + +class AngularVelocity3DList(_VectorSequence[AngularVelocity3D]): + ... + +class AngularVelocityList(_SortableSequence[AngularVelocity]): + ... + +class Dimension2D: + def assign(self, arg1: Dimension2D, other: Dimension2D) -> Dimension2D: + """ + + assign( (Dimension2D)arg1, (Dimension2D)other) -> Dimension2D : + + C++ signature : + ad::physics::Dimension2D {lvalue} assign(ad::physics::Dimension2D {lvalue},ad::physics::Dimension2D) + """ + ... + + @property + def length(self) -> Distance: ... + + @property + def width(self) -> Distance: ... + +class Dimension2DList(_VectorSequence[Dimension2D]): + ... + +class Dimension3D: + def assign(self, arg1: Dimension3D, other: Dimension3D) -> Dimension3D: + """ + + assign( (Dimension3D)arg1, (Dimension3D)other) -> Dimension3D : + + C++ signature : + ad::physics::Dimension3D {lvalue} assign(ad::physics::Dimension3D {lvalue},ad::physics::Dimension3D) + """ + ... + + @property + def height(self) -> Distance: ... + + @property + def length(self) -> Distance: ... + + @property + def width(self) -> Distance: ... + +class Dimension3DList(_VectorSequence[Dimension3D]): + ... + +class Distance(_Calculable): + cMaxValue: float = 1000000000.0 + + cMinValue: float = -1000000000.0 + + cPrecisionValue: float = 0.001 + + +class Distance2D: + def assign(self, other: Distance2D) -> Distance2D: + """ + + assign( (Distance2D)arg1, (Distance2D)other) -> Distance2D : + + C++ signature : + ad::physics::Distance2D {lvalue} assign(ad::physics::Distance2D {lvalue},ad::physics::Distance2D) + """ + ... + + @property + def x(self) -> Distance: ... + + @property + def y(self) -> Distance: ... + +class Distance2DList(_VectorSequence[Distance2D]): + ... + +class Distance3D: + def assign(self, arg1: Distance3D, other: Distance3D) -> Distance3D: + """ + + assign( (Distance3D)arg1, (Distance3D)other) -> Distance3D : + + C++ signature : + ad::physics::Distance3D {lvalue} assign(ad::physics::Distance3D {lvalue},ad::physics::Distance3D) + """ + ... + + @property + def x(self) -> Distance: ... + + @property + def y(self) -> Distance: ... + + @property + def z(self) -> Distance: ... + +class Distance3DList(_VectorSequence[Distance3D]): + ... + +class DistanceList(_SortableSequence[Distance]): + ... + +class DistanceSquared(_Calculable): + + cMaxValue: float = 1e+18 + + cMinValue: float = -1e+18 + + cPrecisionValue: float = 1e-06 + + +class DistanceSquaredList: + def append(self, arg1: DistanceSquaredList, arg2: DistanceSquared) -> None: + """ + + append( (DistanceSquaredList)arg1, (DistanceSquared)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::DistanceSquared) + """ + ... + + def count(self, arg1: DistanceSquaredList, arg2: DistanceSquared) -> int: + """ + + count( (DistanceSquaredList)arg1, (DistanceSquared)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::DistanceSquared) + """ + ... + + def extend(self, arg1: DistanceSquaredList, arg2: object) -> None: + """ + + extend( (DistanceSquaredList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: DistanceSquaredList, arg2: DistanceSquared) -> int: + """ + + index( (DistanceSquaredList)arg1, (DistanceSquared)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::DistanceSquared) + """ + ... + + def insert(self, arg1: DistanceSquaredList, arg2: int, arg3: DistanceSquared) -> None: + """ + + insert( (DistanceSquaredList)arg1, (int)arg2, (DistanceSquared)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::DistanceSquared) + """ + ... + + def reverse(self, arg1: DistanceSquaredList) -> None: + """ + + reverse( (DistanceSquaredList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: DistanceSquaredList) -> None: + """ + + sort( (DistanceSquaredList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class Duration(_Calculable): + + cMaxValue: float = 1000000.0 + + cMinValue: float = -1000000.0 + + cPrecisionValue: float = 0.001 + +class DurationList(_SortableSequence[Duration]): + ... + +class DurationSquared(_Calculable): + + cMaxValue: float = 1000000000000.0 + + cMinValue: float = -1000000000000.0 + + cPrecisionValue: float = 1e-06 + +class DurationSquaredList: + def append(self, arg1: DurationSquaredList, arg2: DurationSquared) -> None: + """ + + append( (DurationSquaredList)arg1, (DurationSquared)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::DurationSquared) + """ + ... + + def count(self, arg1: DurationSquaredList, arg2: DurationSquared) -> int: + """ + + count( (DurationSquaredList)arg1, (DurationSquared)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::DurationSquared) + """ + ... + + def extend(self, arg1: DurationSquaredList, arg2: object) -> None: + """ + + extend( (DurationSquaredList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: DurationSquaredList, arg2: DurationSquared) -> int: + """ + + index( (DurationSquaredList)arg1, (DurationSquared)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::DurationSquared) + """ + ... + + def insert(self, arg1: DurationSquaredList, arg2: int, arg3: DurationSquared) -> None: + """ + + insert( (DurationSquaredList)arg1, (int)arg2, (DurationSquared)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::DurationSquared) + """ + ... + + def reverse(self, arg1: DurationSquaredList) -> None: + """ + + reverse( (DurationSquaredList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: DurationSquaredList) -> None: + """ + + sort( (DurationSquaredList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class MetricRange: + def assign(self, arg1: MetricRange, other: MetricRange) -> MetricRange: + """ + + assign( (MetricRange)arg1, (MetricRange)other) -> MetricRange : + + C++ signature : + ad::physics::MetricRange {lvalue} assign(ad::physics::MetricRange {lvalue},ad::physics::MetricRange) + """ + ... + + @property + def maximum(self) -> Distance: ... + + @property + def minimum(self) -> Distance: ... + +class MetricRangeList: + def append(self, arg1: MetricRangeList, arg2: MetricRange) -> None: + """ + + append( (MetricRangeList)arg1, (MetricRange)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::MetricRange) + """ + ... + + def count(self, arg1: MetricRangeList, arg2: MetricRange) -> int: + """ + + count( (MetricRangeList)arg1, (MetricRange)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::MetricRange) + """ + ... + + def extend(self, arg1: MetricRangeList, arg2: object) -> None: + """ + + extend( (MetricRangeList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: MetricRangeList, arg2: MetricRange) -> int: + """ + + index( (MetricRangeList)arg1, (MetricRange)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::MetricRange) + """ + ... + + def insert(self, arg1: MetricRangeList, arg2: int, arg3: MetricRange) -> None: + """ + + insert( (MetricRangeList)arg1, (int)arg2, (MetricRange)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::MetricRange) + """ + ... + + def reverse(self, arg1: MetricRangeList) -> None: + """ + + reverse( (MetricRangeList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class ParametricRange: + def assign(self, arg1: ParametricRange, other: ParametricRange) -> ParametricRange: + """ + + assign( (ParametricRange)arg1, (ParametricRange)other) -> ParametricRange : + + C++ signature : + ad::physics::ParametricRange {lvalue} assign(ad::physics::ParametricRange {lvalue},ad::physics::ParametricRange) + """ + ... + + @property + def maximum(self) -> ParametricValue: ... + + @property + def minimum(self) -> ParametricValue: ... + +class ParametricRangeList: + def append(self, arg1: ParametricRangeList, arg2: ParametricRange) -> None: + """ + + append( (ParametricRangeList)arg1, (ParametricRange)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::ParametricRange) + """ + ... + + def count(self, arg1: ParametricRangeList, arg2: ParametricRange) -> int: + """ + + count( (ParametricRangeList)arg1, (ParametricRange)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::ParametricRange) + """ + ... + + def extend(self, arg1: ParametricRangeList, arg2: object) -> None: + """ + + extend( (ParametricRangeList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ParametricRangeList, arg2: ParametricRange) -> int: + """ + + index( (ParametricRangeList)arg1, (ParametricRange)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::ParametricRange) + """ + ... + + def insert(self, arg1: ParametricRangeList, arg2: int, arg3: ParametricRange) -> None: + """ + + insert( (ParametricRangeList)arg1, (int)arg2, (ParametricRange)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::ParametricRange) + """ + ... + + def reverse(self, arg1: ParametricRangeList) -> None: + """ + + reverse( (ParametricRangeList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class ParametricValue(_Calculable): + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 1e-06 + +class ParametricValueList: + def append(self, arg1: ParametricValueList, arg2: ParametricValue) -> None: + """ + + append( (ParametricValueList)arg1, (ParametricValue)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::ParametricValue) + """ + ... + + def count(self, arg1: ParametricValueList, arg2: ParametricValue) -> int: + """ + + count( (ParametricValueList)arg1, (ParametricValue)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::ParametricValue) + """ + ... + + def extend(self, arg1: ParametricValueList, arg2: object) -> None: + """ + + extend( (ParametricValueList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ParametricValueList, arg2: ParametricValue) -> int: + """ + + index( (ParametricValueList)arg1, (ParametricValue)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::ParametricValue) + """ + ... + + def insert(self, arg1: ParametricValueList, arg2: int, arg3: ParametricValue) -> None: + """ + + insert( (ParametricValueList)arg1, (int)arg2, (ParametricValue)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::ParametricValue) + """ + ... + + def reverse(self, arg1: ParametricValueList) -> None: + """ + + reverse( (ParametricValueList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: ParametricValueList) -> None: + """ + + sort( (ParametricValueList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class Probability(_Calculable): + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 1e-06 + +class ProbabilityList: + def append(self, arg1: ProbabilityList, arg2: Probability) -> None: + """ + + append( (ProbabilityList)arg1, (Probability)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::Probability) + """ + ... + + def count(self, arg1: ProbabilityList, arg2: Probability) -> int: + """ + + count( (ProbabilityList)arg1, (Probability)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::Probability) + """ + ... + + def extend(self, arg1: ProbabilityList, arg2: object) -> None: + """ + + extend( (ProbabilityList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ProbabilityList, arg2: Probability) -> int: + """ + + index( (ProbabilityList)arg1, (Probability)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::Probability) + """ + ... + + def insert(self, arg1: ProbabilityList, arg2: int, arg3: Probability) -> None: + """ + + insert( (ProbabilityList)arg1, (int)arg2, (Probability)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::Probability) + """ + ... + + def reverse(self, arg1: ProbabilityList) -> None: + """ + + reverse( (ProbabilityList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: ProbabilityList) -> None: + """ + + sort( (ProbabilityList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class RatioValue: + @property + def Valid(self) -> bool: ... + + def assign(self, arg1: RatioValue, other: RatioValue) -> RatioValue: + """ + + assign( (RatioValue)arg1, (RatioValue)other) -> RatioValue : + + C++ signature : + ad::physics::RatioValue {lvalue} assign(ad::physics::RatioValue {lvalue},ad::physics::RatioValue) + """ + ... + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 1e-09 + + def ensureValid(self, arg1: RatioValue) -> None: + """ + + ensureValid( (RatioValue)arg1) -> None : + + C++ signature : + void ensureValid(ad::physics::RatioValue {lvalue}) + """ + ... + + def ensureValidNonZero(self, arg1: RatioValue) -> None: + """ + + ensureValidNonZero( (RatioValue)arg1) -> None : + + C++ signature : + void ensureValidNonZero(ad::physics::RatioValue {lvalue}) + """ + ... + + def getMax(self) -> RatioValue: + """ + + getMax() -> RatioValue : + + C++ signature : + ad::physics::RatioValue getMax() + """ + ... + + def getMin(self) -> RatioValue: + """ + + getMin() -> RatioValue : + + C++ signature : + ad::physics::RatioValue getMin() + """ + ... + + def getPrecision(self) -> RatioValue: + """ + + getPrecision() -> RatioValue : + + C++ signature : + ad::physics::RatioValue getPrecision() + """ + ... + +class RatioValueList: + def append(self, arg1: RatioValueList, arg2: RatioValue) -> None: + """ + + append( (RatioValueList)arg1, (RatioValue)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::RatioValue) + """ + ... + + def count(self, arg1: RatioValueList, arg2: RatioValue) -> int: + """ + + count( (RatioValueList)arg1, (RatioValue)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::RatioValue) + """ + ... + + def extend(self, arg1: RatioValueList, arg2: object) -> None: + """ + + extend( (RatioValueList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: RatioValueList, arg2: RatioValue) -> int: + """ + + index( (RatioValueList)arg1, (RatioValue)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::RatioValue) + """ + ... + + def insert(self, arg1: RatioValueList, arg2: int, arg3: RatioValue) -> None: + """ + + insert( (RatioValueList)arg1, (int)arg2, (RatioValue)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::RatioValue) + """ + ... + + def reverse(self, arg1: RatioValueList) -> None: + """ + + reverse( (RatioValueList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: RatioValueList) -> None: + """ + + sort( (RatioValueList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class Speed(_Calculable): + cMaxValue: float = 1000.0 + + cMinValue: float = -1000.0 + + cPrecisionValue: float = 0.001 + + + +class SpeedList(MutableSequence[Speed]): + def append(self, arg1: SpeedList, arg2: Speed) -> None: + """ + + append( (SpeedList)arg1, (Speed)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::Speed) + """ + ... + + def count(self, arg1: SpeedList, arg2: Speed) -> int: + """ + + count( (SpeedList)arg1, (Speed)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::Speed) + """ + ... + + def extend(self, arg1: SpeedList, arg2: object) -> None: + """ + + extend( (SpeedList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: SpeedList, arg2: Speed) -> int: + """ + + index( (SpeedList)arg1, (Speed)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::Speed) + """ + ... + + def insert(self, arg1: SpeedList, arg2: int, arg3: Speed) -> None: + """ + + insert( (SpeedList)arg1, (int)arg2, (Speed)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::Speed) + """ + ... + + def reverse(self, arg1: SpeedList) -> None: + """ + + reverse( (SpeedList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: SpeedList) -> None: + """ + + sort( (SpeedList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class SpeedRange: + def assign(self, arg1: SpeedRange, other: SpeedRange) -> SpeedRange: + """ + + assign( (SpeedRange)arg1, (SpeedRange)other) -> SpeedRange : + + C++ signature : + ad::physics::SpeedRange {lvalue} assign(ad::physics::SpeedRange {lvalue},ad::physics::SpeedRange) + """ + ... + + @property + def maximum(self) -> Speed: ... + + @property + def minimum(self) -> Speed: ... + +class SpeedRangeList: + def append(self, arg1: SpeedRangeList, arg2: SpeedRange) -> None: + """ + + append( (SpeedRangeList)arg1, (SpeedRange)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::SpeedRange) + """ + ... + + def count(self, arg1: SpeedRangeList, arg2: SpeedRange) -> int: + """ + + count( (SpeedRangeList)arg1, (SpeedRange)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::SpeedRange) + """ + ... + + def extend(self, arg1: SpeedRangeList, arg2: object) -> None: + """ + + extend( (SpeedRangeList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: SpeedRangeList, arg2: SpeedRange) -> int: + """ + + index( (SpeedRangeList)arg1, (SpeedRange)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::SpeedRange) + """ + ... + + def insert(self, arg1: SpeedRangeList, arg2: int, arg3: SpeedRange) -> None: + """ + + insert( (SpeedRangeList)arg1, (int)arg2, (SpeedRange)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::SpeedRange) + """ + ... + + def reverse(self, arg1: SpeedRangeList) -> None: + """ + + reverse( (SpeedRangeList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + +class SpeedSquared(_Calculable): + cMaxValue: float = 1000000.0 + + cMinValue: float = -1000000.0 + + cPrecisionValue: float = 1e-06 + +class SpeedSquaredList: + def append(self, arg1: SpeedSquaredList, arg2: SpeedSquared) -> None: + """ + + append( (SpeedSquaredList)arg1, (SpeedSquared)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::SpeedSquared) + """ + ... + + def count(self, arg1: SpeedSquaredList, arg2: SpeedSquared) -> int: + """ + + count( (SpeedSquaredList)arg1, (SpeedSquared)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::SpeedSquared) + """ + ... + + def extend(self, arg1: SpeedSquaredList, arg2: object) -> None: + """ + + extend( (SpeedSquaredList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: SpeedSquaredList, arg2: SpeedSquared) -> int: + """ + + index( (SpeedSquaredList)arg1, (SpeedSquared)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::SpeedSquared) + """ + ... + + def insert(self, arg1: SpeedSquaredList, arg2: int, arg3: SpeedSquared) -> None: + """ + + insert( (SpeedSquaredList)arg1, (int)arg2, (SpeedSquared)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::SpeedSquared) + """ + ... + + def reverse(self, arg1: SpeedSquaredList) -> None: + """ + + reverse( (SpeedSquaredList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: SpeedSquaredList) -> None: + """ + + sort( (SpeedSquaredList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class Velocity: + def assign(self, arg1: Velocity, other: Velocity) -> Velocity: + """ + + assign( (Velocity)arg1, (Velocity)other) -> Velocity : + + C++ signature : + ad::physics::Velocity {lvalue} assign(ad::physics::Velocity {lvalue},ad::physics::Velocity) + """ + ... + + @property + def x(self) -> Speed: ... + + @property + def y(self) -> Speed: ... + + @property + def z(self) -> Speed: ... + +class VelocityList(_VectorSequence[Velocity]): + ... + +class Weight(_Calculable): + + cMaxValue: float = ... + + cMinValue: float = ... + + cPrecisionValue: float = 0.001 + +class WeightList: + def append(self, arg1: WeightList, arg2: Weight) -> None: + """ + + append( (WeightList)arg1, (Weight)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::physics::Weight) + """ + ... + + def count(self, arg1: WeightList, arg2: Weight) -> int: + """ + + count( (WeightList)arg1, (Weight)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::physics::Weight) + """ + ... + + def extend(self, arg1: WeightList, arg2: object) -> None: + """ + + extend( (WeightList)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: WeightList, arg2: Weight) -> int: + """ + + index( (WeightList)arg1, (Weight)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::physics::Weight) + """ + ... + + def insert(self, arg1: WeightList, arg2: int, arg3: Weight) -> None: + """ + + insert( (WeightList)arg1, (int)arg2, (Weight)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::physics::Weight) + """ + ... + + def reverse(self, arg1: WeightList) -> None: + """ + + reverse( (WeightList)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: WeightList) -> None: + """ + + sort( (WeightList)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Acceleration__greater_: + def epsilon(self) -> Acceleration: + """ + + epsilon() -> Acceleration : + + C++ signature : + ad::physics::Acceleration epsilon() + """ + ... + + def lowest(self) -> Acceleration: + """ + + lowest() -> Acceleration : + + C++ signature : + ad::physics::Acceleration lowest() + """ + ... + + def max(self) -> Acceleration: + """ + + max() -> Acceleration : + + C++ signature : + ad::physics::Acceleration max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Angle__greater_: + def epsilon(self) -> Angle: + """ + + epsilon() -> Angle : + + C++ signature : + ad::physics::Angle epsilon() + """ + ... + + def lowest(self) -> Angle: + """ + + lowest() -> Angle : + + C++ signature : + ad::physics::Angle lowest() + """ + ... + + def max(self) -> Angle: + """ + + max() -> Angle : + + C++ signature : + ad::physics::Angle max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_AngularAcceleration__greater_: + def epsilon(self) -> AngularAcceleration: + """ + + epsilon() -> AngularAcceleration : + + C++ signature : + ad::physics::AngularAcceleration epsilon() + """ + ... + + def lowest(self) -> AngularAcceleration: + """ + + lowest() -> AngularAcceleration : + + C++ signature : + ad::physics::AngularAcceleration lowest() + """ + ... + + def max(self) -> AngularAcceleration: + """ + + max() -> AngularAcceleration : + + C++ signature : + ad::physics::AngularAcceleration max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_AngularVelocity__greater_: + def epsilon(self) -> AngularVelocity: + """ + + epsilon() -> AngularVelocity : + + C++ signature : + ad::physics::AngularVelocity epsilon() + """ + ... + + def lowest(self) -> AngularVelocity: + """ + + lowest() -> AngularVelocity : + + C++ signature : + ad::physics::AngularVelocity lowest() + """ + ... + + def max(self) -> AngularVelocity: + """ + + max() -> AngularVelocity : + + C++ signature : + ad::physics::AngularVelocity max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_DistanceSquared__greater_: + def epsilon(self) -> DistanceSquared: + """ + + epsilon() -> DistanceSquared : + + C++ signature : + ad::physics::DistanceSquared epsilon() + """ + ... + + def lowest(self) -> DistanceSquared: + """ + + lowest() -> DistanceSquared : + + C++ signature : + ad::physics::DistanceSquared lowest() + """ + ... + + def max(self) -> DistanceSquared: + """ + + max() -> DistanceSquared : + + C++ signature : + ad::physics::DistanceSquared max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Distance__greater_: + def epsilon(self) -> Distance: + """ + + epsilon() -> Distance : + + C++ signature : + ad::physics::Distance epsilon() + """ + ... + + def lowest(self) -> Distance: + """ + + lowest() -> Distance : + + C++ signature : + ad::physics::Distance lowest() + """ + ... + + def max(self) -> Distance: + """ + + max() -> Distance : + + C++ signature : + ad::physics::Distance max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_DurationSquared__greater_: + def epsilon(self) -> DurationSquared: + """ + + epsilon() -> DurationSquared : + + C++ signature : + ad::physics::DurationSquared epsilon() + """ + ... + + def lowest(self) -> DurationSquared: + """ + + lowest() -> DurationSquared : + + C++ signature : + ad::physics::DurationSquared lowest() + """ + ... + + def max(self) -> DurationSquared: + """ + + max() -> DurationSquared : + + C++ signature : + ad::physics::DurationSquared max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Duration__greater_: + def epsilon(self) -> Duration: + """ + + epsilon() -> Duration : + + C++ signature : + ad::physics::Duration epsilon() + """ + ... + + def lowest(self) -> Duration: + """ + + lowest() -> Duration : + + C++ signature : + ad::physics::Duration lowest() + """ + ... + + def max(self) -> Duration: + """ + + max() -> Duration : + + C++ signature : + ad::physics::Duration max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_ParametricValue__greater_: + def epsilon(self) -> ParametricValue: + """ + + epsilon() -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue epsilon() + """ + ... + + def lowest(self) -> ParametricValue: + """ + + lowest() -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue lowest() + """ + ... + + def max(self) -> ParametricValue: + """ + + max() -> ParametricValue : + + C++ signature : + ad::physics::ParametricValue max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Probability__greater_: + def epsilon(self) -> Probability: + """ + + epsilon() -> Probability : + + C++ signature : + ad::physics::Probability epsilon() + """ + ... + + def lowest(self) -> Probability: + """ + + lowest() -> Probability : + + C++ signature : + ad::physics::Probability lowest() + """ + ... + + def max(self) -> Probability: + """ + + max() -> Probability : + + C++ signature : + ad::physics::Probability max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_RatioValue__greater_: + def epsilon(self) -> RatioValue: + """ + + epsilon() -> RatioValue : + + C++ signature : + ad::physics::RatioValue epsilon() + """ + ... + + def lowest(self) -> RatioValue: + """ + + lowest() -> RatioValue : + + C++ signature : + ad::physics::RatioValue lowest() + """ + ... + + def max(self) -> RatioValue: + """ + + max() -> RatioValue : + + C++ signature : + ad::physics::RatioValue max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_SpeedSquared__greater_: + def epsilon(self) -> SpeedSquared: + """ + + epsilon() -> SpeedSquared : + + C++ signature : + ad::physics::SpeedSquared epsilon() + """ + ... + + def lowest(self) -> SpeedSquared: + """ + + lowest() -> SpeedSquared : + + C++ signature : + ad::physics::SpeedSquared lowest() + """ + ... + + def max(self) -> SpeedSquared: + """ + + max() -> SpeedSquared : + + C++ signature : + ad::physics::SpeedSquared max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Speed__greater_: + def epsilon(self) -> Speed: + """ + + epsilon() -> Speed : + + C++ signature : + ad::physics::Speed epsilon() + """ + ... + + def lowest(self) -> Speed: + """ + + lowest() -> Speed : + + C++ signature : + ad::physics::Speed lowest() + """ + ... + + def max(self) -> Speed: + """ + + max() -> Speed : + + C++ signature : + ad::physics::Speed max() + """ + ... + +class numeric_limits_less__ad_scope_physics_scope_Weight__greater_: + def epsilon(self) -> Weight: + """ + + epsilon() -> Weight : + + C++ signature : + ad::physics::Weight epsilon() + """ + ... + + def lowest(self) -> Weight: + """ + + lowest() -> Weight : + + C++ signature : + ad::physics::Weight lowest() + """ + ... + + def max(self) -> Weight: + """ + + max() -> Weight : + + C++ signature : + ad::physics::Weight max() + """ + ... diff --git a/PythonAPI/carla/source/carla/ad/rss/__init__.pyi b/PythonAPI/carla/source/carla/ad/rss/__init__.pyi new file mode 100644 index 0000000000..079c0eef2c --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/__init__.pyi @@ -0,0 +1,11 @@ +from .. import map +from . import core, situation, state, unstructured, world + +__all__ = [ + 'core', + 'map', + 'situation', + 'state', + 'unstructured', + 'world', +] diff --git a/PythonAPI/carla/source/carla/ad/rss/core.pyi b/PythonAPI/carla/source/carla/ad/rss/core.pyi new file mode 100644 index 0000000000..22a313b382 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/core.pyi @@ -0,0 +1,58 @@ +from typing import overload + +from . import * + +class RssCheck: + + @overload + def calculateProperResponse(self, worldModel: world.WorldModel, situationSnapshot: situation.SituationSnapshot, rssStateSnapshot: state.RssStateSnapshot, properResponse: state.ProperResponse) -> bool: + ... + + @overload + def calculateProperResponse(self, worldModel: world.WorldModel, properResponse: state.ProperResponse) -> bool: + """ + + calculateProperResponse( (RssCheck)arg1, (WorldModel)worldModel, (ProperResponse)properResponse) -> bool : + + C++ signature : + bool calculateProperResponse(ad::rss::core::RssCheck {lvalue},ad::rss::world::WorldModel,ad::rss::state::ProperResponse {lvalue}) + + calculateProperResponse( (RssCheck)arg1, (WorldModel)worldModel, (SituationSnapshot)situationSnapshot, (RssStateSnapshot)rssStateSnapshot, (ProperResponse)properResponse) -> bool : + + C++ signature : + bool calculateProperResponse(ad::rss::core::RssCheck {lvalue},ad::rss::world::WorldModel,ad::rss::situation::SituationSnapshot {lvalue},ad::rss::state::RssStateSnapshot {lvalue},ad::rss::state::ProperResponse {lvalue}) + """ + ... + +class RssResponseResolving: + def provideProperResponse(self, arg1: RssResponseResolving, currentStateSnapshot: state.RssStateSnapshot, response: state.ProperResponse) -> bool: + """ + + provideProperResponse( (RssResponseResolving)arg1, (RssStateSnapshot)currentStateSnapshot, (ProperResponse)response) -> bool : + + C++ signature : + bool provideProperResponse(ad::rss::core::RssResponseResolving {lvalue},ad::rss::state::RssStateSnapshot,ad::rss::state::ProperResponse {lvalue}) + """ + ... + +class RssSituationChecking: + def checkSituations(self, arg1: RssSituationChecking, situationSnapshot: situation.SituationSnapshot, rssStateSnapshot: state.RssStateSnapshot) -> bool: + """ + + checkSituations( (RssSituationChecking)arg1, (SituationSnapshot)situationSnapshot, (RssStateSnapshot)rssStateSnapshot) -> bool : + + C++ signature : + bool checkSituations(ad::rss::core::RssSituationChecking {lvalue},ad::rss::situation::SituationSnapshot,ad::rss::state::RssStateSnapshot {lvalue}) + """ + ... + +class RssSituationExtraction: + def extractSituations(self, arg1: RssSituationExtraction, worldModel: world.WorldModel, situationSnapshot: situation.SituationSnapshot) -> bool: + """ + + extractSituations( (RssSituationExtraction)arg1, (WorldModel)worldModel, (SituationSnapshot)situationSnapshot) -> bool : + + C++ signature : + bool extractSituations(ad::rss::core::RssSituationExtraction {lvalue},ad::rss::world::WorldModel,ad::rss::situation::SituationSnapshot {lvalue}) + """ + ... diff --git a/PythonAPI/carla/source/carla/ad/rss/situation.pyi b/PythonAPI/carla/source/carla/ad/rss/situation.pyi new file mode 100644 index 0000000000..2c5436e77a --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/situation.pyi @@ -0,0 +1,124 @@ +import ad +from ad import _Assignable +from ...libcarla import _CarlaEnum + +from . import * + +class LateralRelativePosition(int, _CarlaEnum): + AtLeft = 0 + + AtRight = 4 + + Overlap = 2 + + OverlapLeft = 1 + + OverlapRight = 3 + +class LongitudinalRelativePosition(int, _CarlaEnum): + AtBack = 4 + + InFront = 0 + + Overlap = 2 + + OverlapBack = 3 + + OverlapFront = 1 + +class RelativePosition(_Assignable): + + @property + def lateralDistance(self) -> ad.physics.Distance: ... + + @property + def lateralPosition(self) -> LateralRelativePosition: ... + + @property + def longitudinalDistance(self) -> ad.physics.Distance: ... + + @property + def longitudinalPosition(self) -> LongitudinalRelativePosition: ... + +class Situation(_Assignable): + + @property + def egoVehicleState(self) -> VehicleState: ... + + @property + def objectId(self) -> int: ... + + @property + def otherVehicleState(self) -> VehicleState: ... + + @property + def relativePosition(self) -> RelativePosition: ... + + @property + def situationId(self) -> int: ... + + @property + def situationType(self) -> SituationType: ... + +class SituationSnapshot(_Assignable): + + @property + def defaultEgoVehicleRssDynamics(self) -> world.RssDynamics: ... + + @property + def situations(self) -> SituationVector: ... + + @property + def timeIndex(self) -> int: ... + +class SituationType(int, _CarlaEnum): + IntersectionEgoHasPriority = 3 + + IntersectionObjectHasPriority = 4 + + IntersectionSamePriority = 5 + + NotRelevant = 0 + + OppositeDirection = 2 + + SameDirection = 1 + + Unstructured = 6 + +class SituationVector(ad._VectorSequence[Situation]): + ... + +class VehicleState(_Assignable): + + @property + def distanceToEnterIntersection(self) -> ad.physics.Distance: ... + + @property + def distanceToLeaveIntersection(self) -> ad.physics.Distance: ... + + @property + def dynamics(self) -> world.RssDynamics: ... + + @property + def hasPriority(self) -> bool: ... + + @property + def isInCorrectLane(self) -> bool: ... + + @property + def objectState(self) -> world.ObjectState: ... + + @property + def objectType(self) -> world.ObjectType: ... + + @property + def velocity(self) -> VelocityRange: ... + +class VelocityRange(_Assignable): + + @property + def speedLat(self) -> ad.physics.SpeedRange: ... + + @property + def speedLon(self) -> ad.physics.SpeedRange: ... diff --git a/PythonAPI/carla/source/carla/ad/rss/state.pyi b/PythonAPI/carla/source/carla/ad/rss/state.pyi new file mode 100644 index 0000000000..a8b1e4e139 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/state.pyi @@ -0,0 +1,352 @@ +from typing import Self +from ... import ad +from ...libcarla import _CarlaEnum +from . import * + +def isDangerous(rssState: RssState) -> bool: + ... + +def isLateralSafe(rssState: RssState) -> bool: + ... + +def isLongitudinalSafe(rssState: RssState) -> bool: + ... + +class AccelerationRestriction(): + def assign(self, arg1: AccelerationRestriction, other: AccelerationRestriction) -> AccelerationRestriction: + ''' + + assign( (AccelerationRestriction)arg1, (AccelerationRestriction)other) -> AccelerationRestriction : + + C++ signature : + ad::rss::state::AccelerationRestriction {lvalue} assign(ad::rss::state::AccelerationRestriction {lvalue},ad::rss::state::AccelerationRestriction) + ''' + ... + + @property + def lateralLeftRange(self) -> ad.physics.AccelerationRange: ... + + @property + def lateralRightRange(self) -> ad.physics.AccelerationRange: ... + + @property + def longitudinalRange(self) -> ad.physics.AccelerationRange: ... + +class HeadingRange(ad._Assignable): + + def __init__(self, other: HeadingRange | None = None) -> None: + ... + + @property + def begin(self) -> ad.physics.Angle: + ... + + @begin.setter + def begin(self, value: ad.physics.Angle | float) -> None: + ... + + @property + def end(self) -> ad.physics.Angle: + ... + + @end.setter + def end(self, value: ad.physics.Angle | float) -> None: + ... + + +class HeadingRangeVector(ad._Vector[HeadingRange]): + def append(self, arg1: HeadingRangeVector, arg2: HeadingRange) -> None: + ''' + + append( (HeadingRangeVector)arg1, (HeadingRange)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},ad::rss::state::HeadingRange) + ''' + ... + + def count(self, arg1: HeadingRangeVector, arg2: HeadingRange) -> int: + ''' + + count( (HeadingRangeVector)arg1, (HeadingRange)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},ad::rss::state::HeadingRange) + ''' + ... + + def extend(self, arg1: HeadingRangeVector, arg2: object) -> None: + ''' + + extend( (HeadingRangeVector)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + ''' + ... + + def index(self, arg1: HeadingRangeVector, arg2: HeadingRange) -> int: + ''' + + index( (HeadingRangeVector)arg1, (HeadingRange)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},ad::rss::state::HeadingRange) + ''' + ... + + def insert(self, arg1: HeadingRangeVector, arg2: int, arg3: HeadingRange) -> None: + ''' + + insert( (HeadingRangeVector)arg1, (int)arg2, (HeadingRange)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,ad::rss::state::HeadingRange) + ''' + ... + + def reverse(self, arg1: HeadingRangeVector) -> None: + ''' + + reverse( (HeadingRangeVector)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + ''' + ... + +class LateralResponse(int,): + BrakeMin = 1 + + None = 0 # type: ignore + +class LateralRssState(): + @property + def alphaLat(self) -> world.LateralRssAccelerationValues: ... + + def assign(self, arg1: LateralRssState, other: LateralRssState) -> LateralRssState: + ''' + + assign( (LateralRssState)arg1, (LateralRssState)other) -> LateralRssState : + + C++ signature : + ad::rss::state::LateralRssState {lvalue} assign(ad::rss::state::LateralRssState {lvalue},ad::rss::state::LateralRssState) + ''' + ... + + @property + def isSafe(self) -> bool: ... + + @property + def response(self) -> LateralResponse: ... + + @property + def rssStateInformation(self) -> RssStateInformation: ... + +class LongitudinalResponse(int,): + BrakeMin = 2 + + BrakeMinCorrect = 1 + + None = 0 # type: ignore + +class LongitudinalRssState(): + @property + def alphaLon(self) -> world.LongitudinalRssAccelerationValues: ... + + def assign(self, arg1: LongitudinalRssState, other: LongitudinalRssState) -> LongitudinalRssState: + ''' + + assign( (LongitudinalRssState)arg1, (LongitudinalRssState)other) -> LongitudinalRssState : + + C++ signature : + ad::rss::state::LongitudinalRssState {lvalue} assign(ad::rss::state::LongitudinalRssState {lvalue},ad::rss::state::LongitudinalRssState) + ''' + ... + + @property + def isSafe(self) -> bool: ... + + @property + def response(self) -> LongitudinalResponse: ... + + @property + def rssStateInformation(self) -> RssStateInformation: ... + +class ProperResponse(): + @property + def accelerationRestrictions(self) -> AccelerationRestriction: ... + + def assign(self, arg1: ProperResponse, other: ProperResponse) -> ProperResponse: + ''' + + assign( (ProperResponse)arg1, (ProperResponse)other) -> ProperResponse : + + C++ signature : + ad::rss::state::ProperResponse {lvalue} assign(ad::rss::state::ProperResponse {lvalue},ad::rss::state::ProperResponse) + ''' + ... + + @property + def dangerousObjects(self) -> world.ObjectIdVector: ... + + @property + def headingRanges(self) -> HeadingRangeVector: ... + + @property + def isSafe(self) -> bool: ... + + @property + def lateralResponseLeft(self) -> LateralResponse: ... + + @property + def lateralResponseRight(self) -> LateralResponse: ... + + @property + def longitudinalResponse(self) -> LongitudinalResponse: ... + + @property + def timeIndex(self) -> int: ... + + @property + def unstructuredSceneResponse(self) -> UnstructuredSceneResponse: ... + +class RssState(): + def assign(self, other: RssState) -> RssState: + ''' + + assign( (RssState)arg1, (RssState)other) -> RssState : + + C++ signature : + ad::rss::state::RssState {lvalue} assign(ad::rss::state::RssState {lvalue},ad::rss::state::RssState) + ''' + ... + + @property + def lateralStateLeft(self) -> LateralRssState: ... + + @property + def lateralStateRight(self) -> LateralRssState: ... + + @property + def longitudinalState(self) -> LongitudinalRssState: ... + + @property + def objectId(self) -> int: ... + + @property + def situationId(self) -> int: ... + + @property + def situationType(self) -> situation.SituationType: ... + + @property + def unstructuredSceneState(self) -> UnstructuredSceneRssState: ... + +class RssStateEvaluator(int, _CarlaEnum): + None = 0 # type: ignore + LongitudinalDistanceOppositeDirectionEgoCorrectLane = 1 + LongitudinalDistanceOppositeDirection = 2 + LongitudinalDistanceSameDirectionEgoFront = 3 + LongitudinalDistanceSameDirectionOtherInFront = 4 + LateralDistance = 5 + IntersectionOtherPriorityEgoAbleToStop = 6 + IntersectionEgoPriorityOtherAbleToStop = 7 + IntersectionEgoInFront = 8 + IntersectionOtherInFront = 9 + IntersectionOverlap = 10 + +class RssStateInformation(): + def assign(self, arg1: RssStateInformation, other: RssStateInformation) -> RssStateInformation: + ''' + + assign( (RssStateInformation)arg1, (RssStateInformation)other) -> RssStateInformation : + + C++ signature : + ad::rss::state::RssStateInformation {lvalue} assign(ad::rss::state::RssStateInformation {lvalue},ad::rss::state::RssStateInformation) + ''' + ... + + @property + def currentDistance(self) -> ad.physics.Distance: ... + + @property + def evaluator(self) -> RssStateEvaluator: ... + + @property + def safeDistance(self) -> ad.physics.Distance: ... + +class RssStateSnapshot(): + def assign(self, other: RssStateSnapshot) -> RssStateSnapshot: + ''' + + assign( (RssStateSnapshot)arg1, (RssStateSnapshot)other) -> RssStateSnapshot : + + C++ signature : + ad::rss::state::RssStateSnapshot {lvalue} assign(ad::rss::state::RssStateSnapshot {lvalue},ad::rss::state::RssStateSnapshot) + ''' + ... + + @property + def defaultEgoVehicleRssDynamics(self) -> world.RssDynamics: ... + + @property + def individualResponses(self) -> RssStateVector: ... + + @property + def timeIndex(self) -> int: ... + + @property + def unstructuredSceneEgoInformation(self) -> UnstructuredSceneStateInformation: ... + +class RssStateVector(ad._VectorSequence[RssState]): + ... + +class UnstructuredSceneResponse(int, _CarlaEnum): + None = 0 # type: ignore # is named None in the C++ code + ContinueForward = 1 + DriveAway = 2 + Brake = 3 + +class UnstructuredSceneRssState(): + @property + def alphaLon(self) -> world.LongitudinalRssAccelerationValues: ... + + def assign(self, arg1: UnstructuredSceneRssState, other: UnstructuredSceneRssState) -> UnstructuredSceneRssState: + ''' + + assign( (UnstructuredSceneRssState)arg1, (UnstructuredSceneRssState)other) -> UnstructuredSceneRssState : + + C++ signature : + ad::rss::state::UnstructuredSceneRssState {lvalue} assign(ad::rss::state::UnstructuredSceneRssState {lvalue},ad::rss::state::UnstructuredSceneRssState) + ''' + ... + + @property + def headingRange(self) -> HeadingRange: ... + + @property + def isSafe(self) -> bool: ... + + @property + def response(self) -> UnstructuredSceneResponse: ... + + @property + def rssStateInformation(self) -> UnstructuredSceneStateInformation: ... + +class UnstructuredSceneStateInformation(): + def assign(self, arg1: UnstructuredSceneStateInformation, other: UnstructuredSceneStateInformation) -> UnstructuredSceneStateInformation: + ''' + + assign( (UnstructuredSceneStateInformation)arg1, (UnstructuredSceneStateInformation)other) -> UnstructuredSceneStateInformation : + + C++ signature : + ad::rss::state::UnstructuredSceneStateInformation {lvalue} assign(ad::rss::state::UnstructuredSceneStateInformation {lvalue},ad::rss::state::UnstructuredSceneStateInformation) + ''' + ... + + @property + def brakeTrajectorySet(self) -> ad.physics.Distance2DList: ... + + @property + def continueForwardTrajectorySet(self) -> ad.physics.Distance2DList: ... diff --git a/PythonAPI/carla/source/carla/ad/rss/unstructured.pyi b/PythonAPI/carla/source/carla/ad/rss/unstructured.pyi new file mode 100644 index 0000000000..f8229a9e89 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/unstructured.pyi @@ -0,0 +1,231 @@ +from typing import overload +from ... import ad +from .. import _Vector +from . import * + +class DebugDrawing: + class DebugLine: + ... + + class DebugPoint: + ... + + class DebugPolygon: + ... + + class NullDeleter: + ... + + def drawLine(self, arg1: DebugDrawing, line: object, color: str, ns: str) -> None: + """ + + drawLine( (DebugDrawing)arg1, (object)line [, (str)color='white' [, (str)ns='']]) -> None : + + C++ signature : + void drawLine(ad::rss::unstructured::DebugDrawing {lvalue},boost::geometry::model::linestring, std::vector, std::allocator> [,std::__cxx11::basic_string, std::allocator >='white' [,std::__cxx11::basic_string, std::allocator >='']]) + """ + ... + + def drawPolygon(self, arg1: DebugDrawing, polygon: object, color: str, ns: str) -> None: + """ + + drawPolygon( (DebugDrawing)arg1, (object)polygon [, (str)color='white' [, (str)ns='']]) -> None : + + C++ signature : + void drawPolygon(ad::rss::unstructured::DebugDrawing {lvalue},boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator> [,std::__cxx11::basic_string, std::allocator >='white' [,std::__cxx11::basic_string, std::allocator >='']]) + """ + ... + + def enable(self, arg1: DebugDrawing, value: bool) -> None: + """ + + enable( (DebugDrawing)arg1, (bool)value) -> None : + + C++ signature : + void enable(ad::rss::unstructured::DebugDrawing {lvalue},bool) + """ + ... + + def getInstance(self) -> DebugDrawing: + """ + + getInstance() -> DebugDrawing : + + C++ signature : + std::shared_ptr getInstance() + """ + ... + + def isEnabled(self, arg1: DebugDrawing) -> bool: + """ + + isEnabled( (DebugDrawing)arg1) -> bool : + + C++ signature : + bool isEnabled(ad::rss::unstructured::DebugDrawing {lvalue}) + """ + ... + + @property + def mEnabled(self) -> bool: ... + + @property + def mLines(self) -> vector_less_ad_scope_rss_scope_unstructured_scope_DebugDrawing_scope_DebugLine_greater_: ... + + @property + def mPolygons(self) -> vector_less_ad_scope_rss_scope_unstructured_scope_DebugDrawing_scope_DebugPolygon_greater_: ... + + def reset(self, arg1: DebugDrawing) -> None: + """ + + reset( (DebugDrawing)arg1) -> None : + + C++ signature : + void reset(ad::rss::unstructured::DebugDrawing {lvalue}) + """ + ... + +class vector_less_ad_scope_rss_scope_unstructured_scope_DebugDrawing_scope_DebugLine_greater_(_Vector[DebugDrawing.DebugLine]): + ... + +class vector_less_ad_scope_rss_scope_unstructured_scope_DebugDrawing_scope_DebugPoint_greater_(_Vector[DebugDrawing.DebugPoint]): + ... + +class vector_less_ad_scope_rss_scope_unstructured_scope_DebugDrawing_scope_DebugPolygon_greater_(_Vector[DebugDrawing.DebugPolygon]): + ... + +def collides(trajectorySet1: ad.physics.Distance2DList, trajectorySet2: ad.physics.Distance2DList): + """ + collides( (Distance2DList)trajectorySet1, (Distance2DList)trajectorySet2) -> bool : + + C++ signature : + bool collides(std::vector >,std::vector >)""" +def combinePolygon(*args, **kwargs): + """ + combinePolygon( (object)a, (object)b, (object)result) -> bool : + + C++ signature : + bool combinePolygon(boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator>,boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator>,boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator> {lvalue})""" +def getCircleOrigin(*args, **kwargs): + """ + getCircleOrigin( (object)point, (Distance)radius, (Angle)angle) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy getCircleOrigin(boost::geometry::model::d2::point_xy,ad::physics::Distance,ad::physics::Angle)""" + +@overload +def getHeadingOverlap(a: state.HeadingRange, b: state.HeadingRange, overlapRanges: state.HeadingRangeVector) -> bool: + """ + get the overlap between two angle ranges + [out] : overlapRanges + + getHeadingOverlap( (HeadingRange)a, (HeadingRange)b, (HeadingRangeVector)overlapRanges) -> bool : + + C++ signature : + bool getHeadingOverlap(ad::rss::state::HeadingRange,ad::rss::state::HeadingRange,std::vector > {lvalue}) + + getHeadingOverlap( (HeadingRange)headingRange, (HeadingRangeVector)overlapRanges) -> bool : + + C++ signature : + bool getHeadingOverlap(ad::rss::state::HeadingRange,std::vector > {lvalue})""" + +@overload +def getHeadingOverlap(headingRange: state.HeadingRange, overlapRanges: state.HeadingRangeVector) -> bool: + """ + get the overlap between an angle range and a heading range + [in,out]: overlapRanges + + getHeadingOverlap( (HeadingRange)a, (HeadingRange)b, (HeadingRangeVector)overlapRanges) -> bool : + + C++ signature : + bool getHeadingOverlap(ad::rss::state::HeadingRange,ad::rss::state::HeadingRange,std::vector > {lvalue}) + + getHeadingOverlap( (HeadingRange)headingRange, (HeadingRangeVector)overlapRanges) -> bool : + + C++ signature : + bool getHeadingOverlap(ad::rss::state::HeadingRange,std::vector > {lvalue})""" + + +def getPointOnCircle(origin: Unknown, radius: ad.physics.Distance, angle: ad.physics.Angle) -> Unknown: + """ + getPointOnCircle( (object)origin, (Distance)radius, (Angle)angle) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy getPointOnCircle(boost::geometry::model::d2::point_xy,ad::physics::Distance,ad::physics::Angle)""" +def isInsideHeadingRange(angle: ad.physics.Angle, range: ad.rss.state.HeadingRange): + """ + isInsideHeadingRange( (Angle)angle, (HeadingRange)range) -> bool : + + C++ signature : + bool isInsideHeadingRange(ad::physics::Angle,ad::rss::state::HeadingRange)""" +def rotateAroundPoint(*args, **kwargs): + """ + rotateAroundPoint( (object)origin, (object)relativePoint, (Angle)angle) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy rotateAroundPoint(boost::geometry::model::d2::point_xy,boost::geometry::model::d2::point_xy,ad::physics::Angle)""" +def toDistance(*args, **kwargs): + """ + toDistance( (object)point) -> Distance2D : + + C++ signature : + ad::physics::Distance2D toDistance(boost::geometry::model::d2::point_xy)""" + + +@overload +def toPoint(distance: ad.physics.Distance2D) -> Unknown: + """ + toPoint( (Distance2D)distance) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy toPoint(ad::physics::Distance2D) + + toPoint( (Distance)distanceX, (Distance)distanceY) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy toPoint(ad::physics::Distance,ad::physics::Distance) + """ + +@overload +def toPoint(distanceX: ad.physics.Distance, distanceY: ad.physics.Distance) -> Unknown: + """ + toPoint( (Distance2D)distance) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy toPoint(ad::physics::Distance2D) + + toPoint( (Distance)distanceX, (Distance)distanceY) -> object : + + C++ signature : + boost::geometry::model::d2::point_xy toPoint(ad::physics::Distance,ad::physics::Distance) + """ + +def toPolygon(trajectorySet: ad.physics.Distance2DList, polygon): + """ + toPolygon( (Distance2DList)trajectorySet, (object)polygon) -> None : + + C++ signature : + void toPolygon(std::vector >,boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator> {lvalue})""" +def toTrajectorySet(polygon, trajectorySet: ad.physics.Distance2DList) -> None: + """ + toTrajectorySet( (object)polygon, (Distance2DList)trajectorySet) -> None : + + C++ signature : + void toTrajectorySet(boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator>,std::vector > {lvalue})""" + +def to_string(value: object) -> str: + """ + to_string( (object)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(boost::geometry::model::d2::point_xy) + + to_string( (object)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(boost::geometry::model::polygon, false, true, std::vector, std::vector, std::allocator, std::allocator>) + + to_string( (object)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(boost::geometry::model::linestring, std::vector, std::allocator>)""" diff --git a/PythonAPI/carla/source/carla/ad/rss/world.pyi b/PythonAPI/carla/source/carla/ad/rss/world.pyi new file mode 100644 index 0000000000..e6ef2f78d4 --- /dev/null +++ b/PythonAPI/carla/source/carla/ad/rss/world.pyi @@ -0,0 +1,492 @@ +from typing import ClassVar, overload +from carla import ad + +from . import * + +class LaneDrivingDirection(int): + Bidirectional = 0 + + Negative = 2 + + Positive = 1 + +class LaneSegment: + def assign(self, arg1: LaneSegment, other: LaneSegment) -> LaneSegment: + """ + + assign( (LaneSegment)arg1, (LaneSegment)other) -> LaneSegment : + + C++ signature : + ad::rss::world::LaneSegment {lvalue} assign(ad::rss::world::LaneSegment {lvalue},ad::rss::world::LaneSegment) + """ + ... + + @property + def drivingDirection(self) -> LaneDrivingDirection: ... + + @property + def id(self) -> int: ... + + @property + def length(self) -> ad.physics.MetricRange: ... + + @property + def type(self) -> LaneSegmentType: ... + + @property + def width(self) -> ad.physics.MetricRange: ... + +class LaneSegmentType(int): + Intersection = 1 + + Normal = 0 + +class LateralRssAccelerationValues: + @property + def accelMax(self) -> ad.physics.Acceleration: ... + + def assign(self, arg1: LateralRssAccelerationValues, other: LateralRssAccelerationValues) -> LateralRssAccelerationValues: + """ + + assign( (LateralRssAccelerationValues)arg1, (LateralRssAccelerationValues)other) -> LateralRssAccelerationValues : + + C++ signature : + ad::rss::world::LateralRssAccelerationValues {lvalue} assign(ad::rss::world::LateralRssAccelerationValues {lvalue},ad::rss::world::LateralRssAccelerationValues) + """ + ... + + @property + def brakeMin(self) -> ad.physics.Acceleration: ... + +class LongitudinalRssAccelerationValues: + @property + def accelMax(self) -> ad.physics.Acceleration: ... + + def assign(self, arg1: LongitudinalRssAccelerationValues, other: LongitudinalRssAccelerationValues) -> LongitudinalRssAccelerationValues: + """ + + assign( (LongitudinalRssAccelerationValues)arg1, (LongitudinalRssAccelerationValues)other) -> LongitudinalRssAccelerationValues : + + C++ signature : + ad::rss::world::LongitudinalRssAccelerationValues {lvalue} assign(ad::rss::world::LongitudinalRssAccelerationValues {lvalue},ad::rss::world::LongitudinalRssAccelerationValues) + """ + ... + + @property + def brakeMax(self) -> ad.physics.Acceleration: ... + + @property + def brakeMin(self) -> ad.physics.Acceleration: ... + + @property + def brakeMinCorrect(self) -> ad.physics.Acceleration: ... + +class Object: + def assign(self, arg1: Object, other: Object) -> Object: + """ + + assign( (Object)arg1, (Object)other) -> Object : + + C++ signature : + ad::rss::world::Object {lvalue} assign(ad::rss::world::Object {lvalue},ad::rss::world::Object) + """ + ... + + @property + def objectId(self) -> int: ... + + @property + def objectType(self) -> ObjectType: ... + + @property + def occupiedRegions(self) -> OccupiedRegionVector: ... + + @property + def state(self) -> ObjectState: ... + + @property + def velocity(self) -> Velocity: ... + +class ObjectIdVector(ad._Vector[object]): + def append(self, arg1: ObjectIdVector, arg2: object) -> None: + """ + + append( (ObjectIdVector)arg1, (object)arg2) -> None : + + C++ signature : + void append(std::vector > {lvalue},unsigned long) + """ + ... + + def count(self, arg1: ObjectIdVector, arg2: object) -> int: + """ + + count( (ObjectIdVector)arg1, (object)arg2) -> int : + + C++ signature : + unsigned long count(std::vector > {lvalue},unsigned long) + """ + ... + + def extend(self, arg1: ObjectIdVector, arg2: object) -> None: + """ + + extend( (ObjectIdVector)arg1, (object)arg2) -> None : + + C++ signature : + void extend(std::vector > {lvalue},boost::python::api::object) + """ + ... + + def index(self, arg1: ObjectIdVector, arg2: object) -> int: + """ + + index( (ObjectIdVector)arg1, (object)arg2) -> int : + + C++ signature : + unsigned long index(std::vector > {lvalue},unsigned long) + """ + ... + + def insert(self, arg1: ObjectIdVector, arg2: int, arg3: object) -> None: + """ + + insert( (ObjectIdVector)arg1, (int)arg2, (object)arg3) -> None : + + C++ signature : + void insert(std::vector > {lvalue},long,unsigned long) + """ + ... + + def reverse(self, arg1: ObjectIdVector) -> None: + """ + + reverse( (ObjectIdVector)arg1) -> None : + + C++ signature : + void reverse(std::vector > {lvalue}) + """ + ... + + def sort(self, arg1: ObjectIdVector) -> None: + """ + + sort( (ObjectIdVector)arg1) -> None : + + C++ signature : + void sort(std::vector > {lvalue}) + """ + ... + +class ObjectState: + def assign(self, arg1: ObjectState, other: ObjectState) -> ObjectState: + """ + + assign( (ObjectState)arg1, (ObjectState)other) -> ObjectState : + + C++ signature : + ad::rss::world::ObjectState {lvalue} assign(ad::rss::world::ObjectState {lvalue},ad::rss::world::ObjectState) + """ + ... + + @property + def centerPoint(self) -> ad.physics.Distance2D: ... + + @property + def dimension(self) -> ad.physics.Dimension2D: ... + + @property + def speed(self) -> ad.physics.Speed: ... + + @property + def steeringAngle(self) -> ad.physics.Angle: ... + + @property + def yaw(self) -> ad.physics.Angle: ... + + @property + def yawRate(self) -> ad.physics.AngularVelocity: ... + +class ObjectType(int): + ArtificialObject = 4 + + EgoVehicle = 1 + + Invalid = 0 + + OtherVehicle = 2 + + Pedestrian = 3 + +class OccupiedRegion: + __instance_size__: ClassVar[int] = ... + + def assign(self, arg1: OccupiedRegion, other: OccupiedRegion) -> OccupiedRegion: + """ + + assign( (OccupiedRegion)arg1, (OccupiedRegion)other) -> OccupiedRegion : + + C++ signature : + ad::rss::world::OccupiedRegion {lvalue} assign(ad::rss::world::OccupiedRegion {lvalue},ad::rss::world::OccupiedRegion) + """ + ... + + @property + def latRange(self) -> ad.physics.ParametricRange: ... + + @property + def lonRange(self) -> ad.physics.ParametricRange: ... + + @property + def segmentId(self) -> int: ... + + @classmethod + def __eq__(cls, other: object, /) -> bool: + """ + __eq__( (OccupiedRegion)arg1, (OccupiedRegion)arg2) -> object : + + C++ signature : + _object* __eq__(ad::rss::world::OccupiedRegion {lvalue},ad::rss::world::OccupiedRegion) + """ + + @classmethod + def __ne__(cls, other: object, /) -> bool: + """ + __ne__( (OccupiedRegion)arg1, (OccupiedRegion)arg2) -> object : + + C++ signature : + _object* __ne__(ad::rss::world::OccupiedRegion {lvalue},ad::rss::world::OccupiedRegion) + """ + + @classmethod + def __reduce__(cls): ... + +class OccupiedRegionVector(ad._VectorSequence[OccupiedRegion]): + ... + +class RoadArea(ad._VectorSequence[RoadSegment]): + __instance_size__: ClassVar[int] = ... + +class RoadSegment(ad._VectorSequence[LaneSegment]): + __instance_size__: ClassVar[int] = ... + +class RssDynamics(ad._Assignable): + __instance_size__: ClassVar[int] = ... + + @property + def alphaLat(self) -> LateralRssAccelerationValues: ... + + @property + def alphaLon(self) -> LongitudinalRssAccelerationValues: ... + + @property + def lateralFluctuationMargin(self) -> ad.physics.Distance: ... + + @property + def maxSpeedOnAcceleration(self) -> ad.physics.Speed: ... + + @property + def responseTime(self) -> ad.physics.Duration: ... + + @property + def unstructuredSettings(self) -> UnstructuredSettings: ... + +class Scene(ad._Assignable): + @property + def egoVehicle(self) -> Object: ... + + @property + def egoVehicleRoad(self) -> RoadArea: ... + + @property + def egoVehicleRssDynamics(self) -> RssDynamics: ... + + @property + def intersectingRoad(self) -> RoadArea: ... + + @property + def object(self) -> Object: ... + + @property + def objectRssDynamics(self) -> RssDynamics: ... + + @property + def situationType(self) -> situation.SituationType: ... + +class SceneVector(ad._VectorSequence[Scene]): + ... + +class UnstructuredSettings(ad._Assignable): + @property + def driveAwayMaxAngle(self) -> ad.physics.Angle: ... + + @property + def pedestrianBackIntermediateHeadingChangeRatioSteps(self) -> int: ... + + @property + def pedestrianBrakeIntermediateAccelerationSteps(self) -> int: ... + + @property + def pedestrianContinueForwardIntermediateAccelerationSteps(self) -> int: ... + + @property + def pedestrianContinueForwardIntermediateHeadingChangeRatioSteps(self) -> int: ... + + @property + def pedestrianFrontIntermediateHeadingChangeRatioSteps(self) -> int: ... + + @property + def pedestrianTurningRadius(self) -> ad.physics.Distance: ... + + @property + def vehicleBackIntermediateYawRateChangeRatioSteps(self) -> int: ... + + @property + def vehicleBrakeIntermediateAccelerationSteps(self) -> int: ... + + @property + def vehicleContinueForwardIntermediateAccelerationSteps(self) -> int: ... + + @property + def vehicleContinueForwardIntermediateYawRateChangeRatioSteps(self) -> int: ... + + @property + def vehicleFrontIntermediateYawRateChangeRatioSteps(self) -> int: ... + + @property + def vehicleMinRadius(self) -> ad.physics.Distance: ... + + @property + def vehicleTrajectoryCalculationStep(self) -> ad.physics.Duration: ... + + @property + def vehicleYawRateChange(self) -> ad.physics.AngularAcceleration: ... + +class Velocity(ad._Assignable): + + @property + def speedLatMax(self) -> ad.physics.Speed: ... + + @property + def speedLatMin(self) -> ad.physics.Speed: ... + + @property + def speedLonMax(self) -> ad.physics.Speed: ... + + @property + def speedLonMin(self) -> ad.physics.Speed: ... + +class WorldModel(ad._Assignable): + @property + def defaultEgoVehicleRssDynamics(self) -> RssDynamics: ... + + @property + def scenes(self) -> SceneVector: ... + + @property + def timeIndex(self) -> int: ... + +@overload +def to_string(value: (OccupiedRegion | OccupiedRegionVector | ObjectIdVector | LongitudinalRssAccelerationValues + | Velocity | LaneDrivingDirection | LaneSegment | LaneSegmentType | RoadSegment + | LateralRssAccelerationValues | UnstructuredSettings | RssDynamics | ObjectState | ObjectType + | Object | RoadArea | Scene | SceneVector | WorldModel)) -> str: + """ + to_string( (OccupiedRegion)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::OccupiedRegion) + + to_string( (OccupiedRegionVector)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (ObjectIdVector)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (LongitudinalRssAccelerationValues)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::LongitudinalRssAccelerationValues) + + to_string( (Velocity)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::Velocity) + + to_string( (LaneDrivingDirection)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::LaneDrivingDirection) + + to_string( (LaneSegmentType)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::LaneSegmentType) + + to_string( (LaneSegment)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::LaneSegment) + + to_string( (RoadSegment)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (LateralRssAccelerationValues)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::LateralRssAccelerationValues) + + to_string( (UnstructuredSettings)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::UnstructuredSettings) + + to_string( (RssDynamics)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::RssDynamics) + + to_string( (ObjectState)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::ObjectState) + + to_string( (ObjectType)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::ObjectType) + + to_string( (Object)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::Object) + + to_string( (RoadArea)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >, std::allocator > > >) + + to_string( (Scene)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::Scene) + + to_string( (SceneVector)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(std::vector >) + + to_string( (WorldModel)value) -> str : + + C++ signature : + std::__cxx11::basic_string, std::allocator > to_string(ad::rss::world::WorldModel) + """ +@overload +def to_string(ad) -> str: + ... diff --git a/PythonAPI/carla/source/carla/command.pyi b/PythonAPI/carla/source/carla/command.pyi new file mode 100644 index 0000000000..e9499f21a1 --- /dev/null +++ b/PythonAPI/carla/source/carla/command.pyi @@ -0,0 +1,510 @@ +""" +Submodule with commands that can be used with `carla.Client.apply_batch` +and `carla.Client.apply_batch_sync`. +""" +# needs change in API +# pylint: disable=too-many-locals,too-many-public-methods,too-many-arguments,too-many-public-methods,too-few-public-methods,too-many-lines +# Fixable low-priority +# pylint: disable=line-too-long,R0801# needs change in API +# pylint: disable=too-many-locals,too-many-public-methods,too-many-arguments,too-many-public-methods,too-few-public-methods,too-many-lines +# Fixable low-priority +# pylint: disable=line-too-long,R0801 + +from typing import ( # pylint: disable=no-name-in-module + Protocol, + overload, + type_check_only, +) + +from .libcarla import ( + AckermannControllerSettings, + Actor, + ActorBlueprint, + Transform, + Vector3D, + VehicleControl, + VehicleLightState, + VehiclePhysicsControl, +) + +__all__ = [ + "ApplyAngularImpulse", + "ApplyForce", + "ApplyImpulse", + "ApplyTargetAngularVelocity", + "ApplyTargetVelocity", + "ApplyTorque", + "ApplyTransform", + "ApplyVehicleAckermannControl", + "ApplyVehicleControl", + "ApplyVehiclePhysicsControl", + "ApplyWalkerControl", + "ApplyWalkerState", + "DestroyActor", + "FutureActor", + "Response", + "SetAutopilot", + "SetEnableGravity", + "SetSimulatePhysics", + "SetVehicleLightState", + "ShowDebugTelemetry", + "SpawnActor", +] + +@type_check_only +class _IsCommand(Protocol): + """ + Indicates a command from the command namespace. + + Non commands are `FutureActor` or `Response`. + """ + +class ApplyAngularImpulse(_IsCommand): + """Command adaptation of `add_angular_impulse()` in `carla.Actor`. Applies an angular impulse to an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def impulse(self) -> Vector3D: + """Angular impulse applied to the actor (degrees*s).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, impulse: Vector3D) -> None: + """Applies an angular impulse to an actor. + + Args: + `actor (Union[Actor,int])`: Actor or its ID to whom the command will be applied to.\n + `impulse (Vector3D)`: (degrees*s) + """ + # endregion + +class ApplyForce(_IsCommand): + """Command adaptation of `add_force()` in `carla.Actor`. Applies a force to an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def force(self) -> Vector3D: + """Force applied to the actor over time (N).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, force: Vector3D) -> None: + """Applies a force to an actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `force (Vector3D)`: (N) + """ + # endregion + +class ApplyImpulse(_IsCommand): + """Command adaptation of `add_impulse()` in `carla.Actor`. Applies an impulse to an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def impulse(self) -> Vector3D: + """Impulse applied to the actor (N*s).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, impulse: Vector3D) -> None: + """Applies an impulse to an actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `impulse (Vector3D)`: (N*s) + """ + # endregion + +class ApplyTargetAngularVelocity(_IsCommand): + """Command adaptation of `set_target_angular_velocity()` in `carla.Actor`. Sets the actor's angular velocity vector.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def angular_velocity(self) -> Vector3D: + """The 3D angular velocity that will be applied to the actor (deg/s).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, angular_velocity: Vector3D) -> None: + """Sets the actor's angular velocity vector. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `angular_velocity (Vector3D)`: Angular velocity vector applied to the actor. + """ + # endregion + +class ApplyTargetVelocity(_IsCommand): + """Command adaptation of `set_target_velocity()` in `carla.Actor`. Sets the actor's target velocity vector.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def velocity(self) -> Vector3D: + """The 3D velocity applied to the actor (m/s).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, velocity: Vector3D) -> None: + """Sets the actor's target velocity vector. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `velocity (Vector3D)`: Velocity vector applied to the actor. + """ + # endregion + +class ApplyTorque(_IsCommand): + """Command adaptation of `add_torque()` in carla.Actor. Applies a torque to an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + + @property + def transform(self) -> Vector3D: + """Torque applied to the actor over time (degrees).""" + + # endregion + + # region Methods + def __init__(self, actor: Actor | int, torque: Vector3D) -> None: + """Sets a new transform to an actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `torque (Vector3D)`: Torque vector in global coordinates (degrees). + """ + # endregion + +class ApplyTransform(_IsCommand): + """Command adaptation of `set_transform()` in `carla.Actor`. Sets a new transform to an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def transform(self) -> Transform: + """Transformation to be applied.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, transform: Transform) -> None: + """Sets a new transform to an actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `transform (Transform)` + """ + # endregion + +class ApplyVehicleAckermannControl(_IsCommand): + """Command adaptation of `apply_ackermann_control()` in `carla.Vehicle`. Applies a certain akermann control to a vehicle.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def control(self) -> AckermannControllerSettings: + """Vehicle ackermann control to be applied.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, control: AckermannControllerSettings) -> None: + """Applies a certain akermann control to a vehicle. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `control (AckermannControllerSettings)`: Vehicle ackermann control to be applied. + """ + # endregion + +class ApplyVehicleControl(_IsCommand): + """Command adaptation of `apply_control()` in `carla.Vehicle`. Applies a certain control to a vehicle.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def control(self) -> VehicleControl: + """Vehicle control to be applied.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, control: VehicleControl) -> None: + """Applies a certain control to a vehicle. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `control (VehicleControl)`: Vehicle control to be applied. + """ + # endregion + +class ApplyVehiclePhysicsControl(_IsCommand): + """Command adaptation of `apply_physics_control()` in `carla.Vehicle`. Applies a new physics control to a vehicle, modifying its physical parameters.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + @property + def control(self) -> VehiclePhysicsControl: + """Physics control to be applied.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, control: VehicleControl) -> None: + """Applies a new physics control to a vehicle, modifying its physical parameters. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `control (VehicleControl)`: Physics control to be applied. + """ + # endregion + +class ApplyWalkerControl(_IsCommand): + """Command adaptation of `apply_control()` in `carla.Walker`. Applies a control to a walker.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Walker actor affected by the command.""" + @property + def control(self) -> VehiclePhysicsControl: + """Walker control to be applied.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, control: VehicleControl) -> None: + """Applies a control to a walker. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `control (VehicleControl)`: Walker control to be applied. + """ + # endregion + +class ApplyWalkerState(_IsCommand): + """Apply a state to the walker actor. Specially useful to initialize an actor them with a specific location, orientation and speed.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Walker actor affected by the command.""" + @property + def transform(self) -> Transform: + """Transform to be applied.""" + @property + def speed(self) -> float: + """Speed to be applied (m/s).""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, transform: Transform, speed: float) -> None: + """Apply a state to the walker actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `transform (Transform)`: Transform to be applied.\n + `speed (float)`: Speed to be applied (m/s). + """ + # endregion + +class DestroyActor(_IsCommand): + """Command adaptation of `destroy()` in `carla.Actor` that tells the simulator to destroy this actor. It has no effect if the actor was already destroyed. When executed with `apply_batch_sync()` in c`arla.Client` there will be a `command.Response` that will return a boolean stating whether the actor was successfully destroyed.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor affected by the command.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int) -> None: + """Command adaptation of `destroy()` in `carla.Actor` that tells the simulator to destroy this actor. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to. + """ + # endregion + +class FutureActor: + """A utility object used to reference an actor that will be created in the command in the previous step, it has no parameters or methods.""" + +class Response: + """States the result of executing a command as either the ID of the actor to whom the command was applied to (when succeeded) or an error string (when failed). actor ID, depending on whether or not the command succeeded. The method `apply_batch_sync()` in c`arla.Client` returns a list of these to summarize the execution of a batch.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor to whom the command was applied to. States that the command was successful.""" + @property + def error(self) -> str: + """A string stating the command has failed.""" + # endregion + + # region Methods + def has_error(self) -> bool: + """Returns `True` if the command execution fails, and `False` if it was successful.""" + # endregion + +class SetAutopilot(_IsCommand): + """Command adaptation of `set_autopilot()` in `carla.Vehicle`. Turns on/off the vehicle's autopilot mode.""" + + # region Instance Methods + @property + def actor_id(self) -> int: + """Actor that is affected by the command.""" + @property + def enabled(self) -> bool: + """If autopilot should be activated or not.""" + @property + def port(self) -> int: + """Port of the Traffic Manager where the vehicle is to be registered or unlisted.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, enabled: bool, port: int = 8000) -> None: + """Turns on/off the vehicle's autopilot mode. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `enabled (bool)`: _description_\n + `port (int, optional)`: The Traffic Manager port where the vehicle is to be registered or unlisted. If None is passed, it will consider a TM at default port 8000. Defaults to 8000. + """ + # endregion + +class SetEnableGravity(_IsCommand): + """Command adaptation of `set_enable_gravity()` in `carla.Actor`. Enables or disables gravity on an actor.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor that is affected by the command.""" + @property + def enabled(self) -> bool: + """If gravity should be activated or not.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, enabled: bool) -> None: + """Enables or disables gravity on an actor. + + Args: + `actor (Actor | int)`: Actor or Actor ID to which the command will be applied to.\n + `enabled (bool)`: If gravity should be activated or not. + """ + # endregion + +class SetSimulatePhysics(_IsCommand): + """Command adaptation of `set_simulate_physics()` in `carla.Actor`. Determines whether an actor will be affected by physics or not.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor that is affected by the command.""" + @property + def enabled(self) -> bool: + """If physics should be activated or not.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, enabled: bool) -> None: + """Determines whether an actor will be affected by physics or not. + + Args: + `actor (Actor | int)`: Actor or Actor ID to which the command will be applied to.\n + `enabled (bool)`: If physics should be activated or not. + """ + # endregion + +class SetVehicleLightState(_IsCommand): + """Command adaptation of `set_light_state()` in `carla.Vehicle`. Sets the light state of a vehicle.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor that is affected by the command.""" + @property + def light_state(self) -> VehicleLightState: + """Recaps the state of the lights of a vehicle, these can be used as a flags.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, light_state: VehicleLightState) -> None: + """Sets the light state of a vehicle. + + Args: + `actor (Actor | int)`: Actor or its ID to whom the command will be applied to.\n + `light_state (VehicleLightState)`: Recaps the state of the lights of a vehicle, these can be used as a flags. + """ + # endregion + +class ShowDebugTelemetry(_IsCommand): + """Command adaptation of `show_debug_telemetry()` in `carla.Actor`. Displays vehicle control telemetry data.""" + + # region Instance Variables + @property + def actor_id(self) -> int: + """Actor that is affected by the command.""" + @property + def enabled(self) -> bool: + """If debug should be activated or not.""" + # endregion + + # region Methods + def __init__(self, actor: Actor | int, enabled: bool) -> None: + """Displays vehicle control telemetry data. + + Args: + `actor (Actor | int)`: Actor or Actor ID to which the command will be applied to.\n + `enabled (bool)`: If debug should be activated or not. + """ + # endregion + +class SpawnActor(_IsCommand): + """Command adaptation of `spawn_actor()` in `carla.World`. Spawns an actor into the world based on the blueprint provided and the transform. If a parent is provided, the actor is attached to it.""" + + # region Instance Variables + @property + def transform(self) -> Transform: + """Transform to be applied.""" + @property + def parent_id(self) -> int: + """Identificator of the parent actor.""" + # endregion + + # region Methods + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, blueprint: ActorBlueprint, transform: Transform) -> None: ... + @overload + def __init__(self, blueprint: ActorBlueprint, transform: Transform, parent: Actor | int) -> None: ... + + def then(self, command: _IsCommand) -> _IsCommand: + """Links another command to be executed right after. It allows to ease very common flows such as spawning a set of vehicles by command and then using this method to set them to autopilot automatically. + + Args: + `command (command)`: a Carla command. + """ + # endregion diff --git a/PythonAPI/carla/source/carla/libcarla.pyi b/PythonAPI/carla/source/carla/libcarla.pyi index b8691681fc..8a600e4332 100644 --- a/PythonAPI/carla/source/carla/libcarla.pyi +++ b/PythonAPI/carla/source/carla/libcarla.pyi @@ -1,77 +1,141 @@ -from enum import Enum, Flag, IntFlag +# --------- Linting ------------ +# Not relevant for stubs +# pylint: disable=unused-argument,C0103,used-before-assignment,dangerous-default-value,super-init-not-called,no-name-in-module +# +# needs change in API +# pylint: disable=too-many-locals,too-many-public-methods,too-many-arguments,too-many-public-methods,too-few-public-methods,too-many-lines,redefined-builtin +# +# Fixable +# pylint: disable=line-too-long +# Needs __all__ to be defined +# pylint: disable=useless-import-alias,unused-import +# +# False positives +# Should only trigger for class name used in itself +# pylint: disable=undefined-variable +# +# ruff: noqa: F401,F403,F405 +# ------------------------------- + import sys -from typing import (Callable, Iterable, Iterator, Union, Optional, overload, ClassVar, Any, TypeVar, - type_check_only) +from enum import Enum, Flag, IntFlag +from typing import ( # pylint: disable=no-name-in-module + Any, + Callable, + Generic, + Iterator, + NoReturn, + Optional, + Sequence, + TypeVar, + Union, + overload, + type_check_only, +) + +# ----------- RSS -------------- +# Available only on RSS build +from . import ad as ad + +# "as" marks them as reexport for pyright as long as __all__ is not specified +from .__carla_rss import ( + RssActorConstellationData as RssActorConstellationData, + RssActorConstellationResult as RssActorConstellationResult, + RssEgoDynamicsOnRoute as RssEgoDynamicsOnRoute, + RssLogLevel as RssLogLevel, + RssResponse as RssResponse, + RssRestrictor as RssRestrictor, + RssRoadBoundariesMode as RssRoadBoundariesMode, + RssSensor as RssSensor, +) +# ------------------------------- +from . import command + +# pylint: disable=wildcard-import,unused-wildcard-import +from .command import * + +if sys.version_info >= (3, 13): + from typing import TypeVar # pylint: disable=reimported +else: + # allow reimporting for users that do not have typing_extensions and <3.13 + from typing_extensions import TypeVar # pylint: disable=reimported if sys.version_info >= (3, 11): - from typing import Self + from typing import Never, Self else: - from typing_extensions import Self - + from typing_extensions import Never, Self + if sys.version_info >= (3, 9): from typing import Annotated else: from typing_extensions import Annotated - + if sys.version_info >= (3, 8): from typing import Literal else: from typing_extensions import Literal - # Note: __protected_variables are not part of the carla module, they are helpers to complete the stubs. __SensorData = TypeVar("__SensorData", bound=SensorData) """Generic that allows subclassing.""" +__Actor = TypeVar("__Actor", bound=Actor, default=Actor, infer_variance=True) # noqa: F405 +"""Generic Actor type that allows subclassing.""" + @type_check_only -class __CarlaEnum(Enum): +class _CarlaEnum(Enum): """ - CARLA's Enums have a `values` and `names` attribute that are not part of the python `enum.Enum` + CARLA's Enums have a `values` and `names` attribute that are not part of the python `enum.Enum` class. This abstract stub class adds these attributes. + + Attention: + This class derives from `enum.Enum` to allow usage with `Literal`, + however it is not a subclass of enum.Enum in the actual implementation. """ - - values : ClassVar[dict[int, Self]] - names : ClassVar[dict[str, Self]] - - def __init_subclass__(cls): - cls.values : dict[int, cls] - cls.names : dict[str, cls] - -class AckermannControllerSettings(): + values: dict[int, Self] + names: dict[str, Self] + + @property + def name(self: Never) -> NoReturn: # pylint: disable=invalid-overridden-method,function-redefined + """The name attribute is not available in CARLA's enums.""" + @property + def value(self: Never) -> NoReturn: # pylint: disable=invalid-overridden-method,function-redefined + """The value attribute is not available in CARLA's enums.""" + + def __init_subclass__(cls) -> None: + cls.values: dict[int, Self] # noqa: B032 + cls.names: dict[str, Self] # noqa: B032 + +# pylint: disable=function-redefined +class AckermannControllerSettings: """Manages the settings of the Ackermann PID controller.""" # region Instance Variables @property def speed_kp(self) -> float: """Proportional term of the speed PID controller.""" - ... @property def speed_ki(self) -> float: """Integral term of the speed PID controller.""" - ... @property def speed_kd(self) -> float: """Derivative term of the speed PID controller.""" - ... @property def accel_kp(self) -> float: """Proportional term of the acceleration PID controller.""" - ... @property def accel_ki(self) -> float: """Integral term of the acceleration PID controller.""" - ... @property def accel_kd(self) -> float: """Derivative term of the acceleration PID controller.""" - ... # endregion # region Methods @@ -81,21 +145,20 @@ class AckermannControllerSettings(): speed_kd: float = 0.25, accel_kp: float = 0.01, accel_ki: float = 0.0, - accel_kd: float = 0.01): - """Manages the settings of the Ackermann PID controller. - """ + accel_kd: float = 0.01) -> None: + """Manages the settings of the Ackermann PID controller.""" # endregion # region Dunder Methods - def __eq__(self, __value: AckermannControllerSettings) -> bool: ... + def __eq__(self, other: AckermannControllerSettings, /) -> bool: ... - def __ne__(self, __value: AckermannControllerSettings) -> bool: ... + def __ne__(self, other: AckermannControllerSettings, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class Actor(): +# pylint: disable=function-redefined +class Actor: """CARLA defines actors as anything that plays a role in the simulation or can be moved around. That includes: pedestrians, vehicles, sensors and traffic signs (considering traffic lights as part of these). Actors are spawned in the simulation by `carla.World` and they need for a `carla.ActorBlueprint` to be created. These blueprints belong into a library provided by CARLA, find more about them here. @@ -105,42 +168,34 @@ class Actor(): # region Instance Variables @property def attributes(self) -> dict: - """A dictionary containing the attributes of the blueprint this actor was based on. - """ - ... + """A dictionary containing the attributes of the blueprint this actor was based on.""" @property def id(self) -> int: - """Identifier for this actor. Unique during a given episode. - """ - ... + """Identifier for this actor. Unique during a given episode.""" @property def type_id(self) -> str: """The identifier of the blueprint this actor was based on, - e.g., `vehicle.ford.mustang.`""" - ... + e.g., `vehicle.ford.mustang.` + """ @property def is_alive(self) -> bool: """Returns whether this object was destroyed using this actor handle.""" - ... @property def is_active(self) -> bool: """Returns whether this actor is active (`True`) or not (`False`).""" - ... @property def is_dormant(self) -> bool: """Returns whether this actor is dormant (`True`) or not (`False`) - the opposite of `is_active`.""" - ... @property def parent(self) -> Actor | None: """Actors may be attached to a parent actor that they will follow around. This is said actor.""" - ... @property def semantic_tags(self) -> list[int]: @@ -153,7 +208,6 @@ class Actor(): @property def actor_state(self) -> ActorState: """Returns the carla.ActorState, which can identify if the actor is Active, Dormant or Invalid.""" - ... @property def bounding_box(self) -> BoundingBox: @@ -167,9 +221,8 @@ class Actor(): This method should be used for instantaneous torques, usually applied once. Use `add_torque()` to apply rotation forces over a period of time. Args: - `angular_impulse (Vector3D - degrees*s)`: Angular impulse vector in global coordinates.\n + `angular_impulse (Vector3D - degrees*s)`: Angular impulse vector in global coordinates. """ - ... def add_force(self, force: Vector3D): """Applies a force at the center of mass of the actor. @@ -177,9 +230,8 @@ class Actor(): This method should be used for forces that are applied over a certain period of time. Use `add_impulse()` to apply an impulse that only lasts an instant. Args: - `force (Vector3D - N)`: Force vector in global coordinates.\n + `force (Vector3D - N)`: Force vector in global coordinates. """ - ... def add_impulse(self, impulse: Vector3D): """Applies an impulse at the center of mass of the actor. @@ -187,9 +239,8 @@ class Actor(): This method should be used for instantaneous forces, usually applied once. Use `add_force()` to apply forces over a period of time. Args: - `impulse (Vector3D - N*s)`: Impulse vector in global coordinates.\n + `impulse (Vector3D - N*s)`: Impulse vector in global coordinates. """ - ... def add_torque(self, torque: Vector3D): """Applies a torque at the center of mass of the actor. @@ -197,9 +248,8 @@ class Actor(): This method should be used for torques that are applied over a certain period of time. Use `add_angular_impulse()` to apply a torque that only lasts an instant. Args: - `torque (Vector3D - degrees)`: Torque vector in global coordinates.\n + `torque (Vector3D - degrees)`: Torque vector in global coordinates. """ - ... def destroy(self) -> bool: """Tells the simulator to destroy this actor and returns True if it was successful. @@ -208,12 +258,9 @@ class Actor(): + Warning: This method blocks the script until the destruction is completed by the simulator. """ - ... def disable_constant_velocity(self): - """Disables any constant velocity previously set for a `carla.Vehicle` actor. - """ - ... + """Disables any constant velocity previously set for a `carla.Vehicle` actor.""" def enable_constant_velocity(self, velocity: Vector3D): """Sets a vehicle's velocity vector to a constant value over time. @@ -225,21 +272,19 @@ class Actor(): + Warning: Enabling a constant velocity for a vehicle managed by the `Traffic Manager` may cause conflicts. This method overrides any changes in velocity by the TM. Args: - `velocity (Vector3D - m/s)`: Velocity vector in local space.\n + `velocity (Vector3D - m/s)`: Velocity vector in local space. """ - ... # endregion # region Getters def get_acceleration(self) -> Vector3D: - """Returns the actor's 3D acceleration vector the client received during last tick. + """Returns the actor's 3D acceleration vector the client received during last tick. The method does not call the simulator. Returns: - `Vector3D`: m/s^2\n + `Vector3D`: m/s^2 """ - ... def get_angular_velocity(self) -> Vector3D: """Returns the actor's angular velocity vector the client received during last tick. @@ -247,21 +292,19 @@ class Actor(): The method does not call the simulator. Returns: - `Vector3D`: deg/s\n + `Vector3D`: deg/s """ - ... def get_location(self) -> Location: - """Returns the actor's location the client received during last tick. + """Returns the actor's location the client received during last tick. The method does not call the simulator. + Setter: `carla.Actor.set_location` Returns: - `Location`: - meters\n + `Location`: - meters """ - ... def get_transform(self) -> Transform: """Returns the actor's transform (location and rotation) the client received during last tick. @@ -271,7 +314,7 @@ class Actor(): + Setter: `carla.Actor.set_transform` Returns: - `Transform`\n + `Transform` """ def get_velocity(self) -> Vector3D: @@ -280,17 +323,15 @@ class Actor(): The method does not call the simulator. Returns: - `Vector3D`: m/s\n + `Vector3D`: m/s """ - ... def get_world(self) -> World: """Returns the world this actor belongs to. Returns: - `World`\n + `World` """ - ... # endregion # region Setters @@ -299,9 +340,8 @@ class Actor(): Default is `True`. Args: - `enabled (bool)`\n + `enabled (bool)` """ - ... def set_location(self, location: Location): """Teleports the actor to a given location. @@ -309,17 +349,15 @@ class Actor(): + Getter: `carla.Actor.get_location` Args: - `location (Location)`: meters\n + `location (Location)`: meters """ - ... - def set_simulate_physics(self, enabled=True): + def set_simulate_physics(self, enabled: bool = True): """Enables or disables the simulation of physics on this actor. Args: - `enabled (bool, optional)`: Defaults to True.\n + `enabled (bool, optional)`: Defaults to True. """ - ... def set_target_angular_velocity(self, angular_velocity: Vector3D): """_summary_Sets the actor's angular velocity vector. @@ -327,9 +365,8 @@ class Actor(): This is applied before the physics step so the resulting angular velocity will be affected by external forces such as friction. Args: - `angular_velocity (Vector3D)`: deg/s\n + `angular_velocity (Vector3D)`: deg/s """ - ... def set_target_velocity(self, velocity: Vector3D): """Sets the actor's velocity vector. @@ -337,9 +374,8 @@ class Actor(): This is applied before the physics step so the resulting angular velocity will be affected by external forces such as friction. Args: - `velocity (Vector3D)`\n + `velocity (Vector3D)` """ - ... def set_transform(self, transform: Transform): """Teleports the actor to a given transform (location and rotation). @@ -347,25 +383,27 @@ class Actor(): + Getter: `carla.Actor.get_transform` Args: - `transform (Transform)`\n + `transform (Transform)` """ - ... # endregion # region Dunder Methods def __str__(self) -> str: ... # endregion +class ActorAttribute: + """ + CARLA provides a library of blueprints for actors that can be accessed as `carla.BlueprintLibrary`. + Each of these blueprints has a series of attributes defined internally. + Some of these are modifiable, others are not. -class ActorAttribute(): - """CARLA provides a library of blueprints for actors that can be accessed as `carla.BlueprintLibrary`. Each of these blueprints has a series of attributes defined internally. Some of these are modifiable, others are not. A list of recommended values is provided for those that can be set. + A list of recommended values is provided for those that can be set. """ # region Instance Variables @property def id(self) -> str: - """The attribute's name and identifier in the library. - """ + """The attribute's name and identifier in the library.""" @property def is_modifiable(self) -> bool: """It is True if the attribute's value can be modified.""" @@ -380,39 +418,33 @@ class ActorAttribute(): # region Methods def as_bool(self) -> bool: """Reads the attribute as boolean value.""" - ... def as_color(self) -> Color: """Reads the attribute as `carla.Color`.""" - ... def as_float(self) -> float: """Reads the attribute as float.""" - ... def as_int(self) -> int: """Reads the attribute as int.""" - ... def as_str(self) -> str: """Reads the attribute as string.""" - ... # endregion # region Dunder Methods def __bool__(self) -> bool: ... - def __eq__(self, __value: Union[bool, int, float, str, Color, ActorAttribute]) -> bool: ... + def __eq__(self, other: Union[bool, float, str, Color, ActorAttribute], /) -> bool: ... def __float__(self) -> float: ... def __int__(self) -> int: ... - def __ne__(self, __value: Union[bool, int, float, str, Color, ActorAttribute]) -> bool: ... + def __ne__(self, other: Union[bool, float, str, Color, ActorAttribute], /) -> bool: ... def __nonzero__(self) -> bool: ... def __str__(self) -> str: ... # endregion +class ActorAttributeType(int, _CarlaEnum): + """CARLA provides a library of blueprints for actors in `carla.BlueprintLibrary` with different attributes each. This class defines the types those at `carla.ActorAttribute` can be as a series of enum. All this information is managed internally and listed here for a better comprehension of how CARLA works.""" -class ActorAttributeType(int, __CarlaEnum): - """CARLA provides a library of blueprints for actors in `carla.BlueprintLibrary` with different attributes each. This class defines the types those at `carla.ActorAttribute` can be as a series of enum. All this information is managed internally and listed here for a better comprehension of how CARLA works. - """ # region Instance Variables Bool = 0 Int = 1 @@ -421,17 +453,16 @@ class ActorAttributeType(int, __CarlaEnum): RGBColor = 4 # endregion - -class ActorBlueprint(): - """CARLA provides a blueprint library for actors that can be consulted through `carla.BlueprintLibrary`. Each of these consists of an identifier for the blueprint and a series of attributes that may be modifiable or not. This class is the intermediate step between the library and the actor creation. Actors need an actor blueprint to be spawned. These store the information for said blueprint in an object with its attributes and some tags to categorize them. The user can then customize some attributes and eventually spawn the actors through `carla.World`. - """ +class ActorBlueprint: + """CARLA provides a blueprint library for actors that can be consulted through `carla.BlueprintLibrary`. Each of these consists of an identifier for the blueprint and a series of attributes that may be modifiable or not. This class is the intermediate step between the library and the actor creation. Actors need an actor blueprint to be spawned. These store the information for said blueprint in an object with its attributes and some tags to categorize them. The user can then customize some attributes and eventually spawn the actors through `carla.World`.""" # region Instance Variables @property def id(self) -> str: """The identifier of said blueprint inside the library. - E.g. `walker.pedestrian.0001`.""" + E.g. `walker.pedestrian.0001`. + """ @property def tags(self) -> list[str]: @@ -439,7 +470,6 @@ class ActorBlueprint(): E.g. `['0001', 'pedestrian', 'walker']`. """ - ... # endregion # region Methods @@ -450,9 +480,8 @@ class ActorBlueprint(): `id (str)`: e.g. `gender` would return True for pedestrians' blueprints.\n Returns: - `bool`\n + `bool` """ - ... def has_tag(self, tag: str) -> bool: """Returns `True` if the blueprint has the specified `tag` listed. @@ -461,9 +490,8 @@ class ActorBlueprint(): `tag (str)`: e.g. `'walker'`\n Returns: - `bool`\n + `bool` """ - ... def match_tags(self, wildcard_pattern: str) -> bool: """Returns `True` if any of the tags listed for this blueprint matches `wildcard_pattern`. @@ -474,7 +502,7 @@ class ActorBlueprint(): `wildcard_pattern (str)`\n Returns: - `bool`\n + `bool` """ # endregion @@ -488,9 +516,8 @@ class ActorBlueprint(): `id (str)`\n Returns: - `ActorAttribute`\n + `ActorAttribute` """ - ... # endregion # region Setters @@ -499,82 +526,89 @@ class ActorBlueprint(): Args: `id (str)`: The identifier for the attribute that is intended to be changed.\n - `value (str)`: The new value for said attribute.\n + `value (str)`: The new value for said attribute. """ # endregion # region Dunder Methods def __iter__(self) -> Iterator[ActorAttribute]: - """Iterate over the `carla.ActorAttribute` that this blueprint has. - """ - ... + """Iterate over the `carla.ActorAttribute` that this blueprint has.""" def __len__(self) -> int: """Returns the amount of attributes for this blueprint.""" - ... def __str__(self) -> str: ... # endregion - -class ActorList(): +class ActorList(Generic[__Actor]): """ A class that contains every actor present on the scene and provides access to them. The list is automatically created and updated by the server and it can be returned using `carla.World`. """ + # Heuristic to infer type without Generic + + @overload + def filter(self, wildcard_pattern: Literal['traffic_light.*']) -> ActorList[TrafficLight]: ... + + @overload + def filter(self, wildcard_pattern: Literal['vehicle.*']) -> ActorList[Vehicle]: ... + + @overload + def filter(self, wildcard_pattern: Literal['walker.pedestrian.*', 'walker.*']) -> ActorList[Walker]: ... + + @overload + def filter(self, wildcard_pattern: Literal['sensor.*']) -> ActorList[Sensor]: ... + + @overload + def filter(self, wildcard_pattern: str) -> ActorList[__Actor]: ... + # region Methods - def filter(self, wildcard_pattern: str) -> ActorList: + def filter(self, wildcard_pattern: str) -> ActorList[__Actor]: """Filters a list of Actors matching wildcard_pattern against their variable `type_id` (which identifies the blueprint used to spawn them). Matching follows fnmatch standard. Args: `wildcard_pattern (str)`\n Returns: - `ActorList`\n + `ActorList` """ - ... - def find(self, actor_id: int) -> Actor: + def find(self, actor_id: int) -> __Actor: """Finds an actor using its identifier and returns it or None if it is not present. Args: `actor_id (int)`\n Returns: - `Actor`\n + `Actor` """ - ... # endregion # region Dunder methods - def __getitem__(self, pos: int) -> Actor: + def __getitem__(self, pos: int) -> __Actor: """Returns the actor corresponding to pos position in the list.""" - ... - def __iter__(self) -> Iterator[Actor]: + def __iter__(self) -> Iterator[__Actor]: """Iterate over the `carla.Actor` contained in the list.""" - ... def __len__(self) -> int: """Returns the amount of actors listed.""" - ... def __str__(self) -> str: """Parses to the ID for every actor listed.""" - ... # endregion - -class ActorSnapshot(): - """A class that comprises all the information for an actor at a certain moment in time. These objects are contained in a `carla.WorldSnapshot` and sent to the client once every tick. +class ActorSnapshot: + """ + A class that comprises all the information for an actor at a certain moment in time. + These objects are contained in a `carla.WorldSnapshot` and sent to the client once every tick. """ # region Instance Variables @property def id(self) -> int: """An identifier for the snapshot itself.""" - ... # endregion # region Getters @@ -582,38 +616,34 @@ class ActorSnapshot(): """Returns the acceleration vector registered for an actor in that tick. Returns: - `Vector3D`: m/s^2\n + `Vector3D`: m/s^2 """ - ... def get_angular_velocity(self) -> Vector3D: """Returns the angular velocity vector registered for an actor in that tick. Returns: - `Vector3D`: rad/s\n + `Vector3D`: rad/s """ - ... def get_transform(self) -> Transform: """Returns the actor's transform (location and rotation) for an actor in that tick. Returns: - `Transform`\n + `Transform` """ - ... def get_velocity(self) -> Vector3D: """Returns the velocity vector registered for an actor in that tick. Returns: - `Vector3D`: m/s\n + `Vector3D`: m/s """ - ... # endregion - -class ActorState(int, __CarlaEnum): +class ActorState(int, _CarlaEnum): """Class that defines the state of an actor.""" + # region Instance Variables Invalid = 0 """An actor is Invalid if a problem has occurred.""" @@ -623,54 +653,53 @@ class ActorState(int, __CarlaEnum): """An actor is Dormant when it is not visualized and will not affect other actors through physics. For example, actors are dormant if they are on an unloaded tile in a large map.""" # endregion - -class AttachmentType(int, __CarlaEnum): +class AttachmentType(int, _CarlaEnum): """ - Class that defines attachment options between an actor and its parent. - When spawning actors, these can be attached to another actor so their - position changes accordingly. This is specially useful for sensors. - The snippet in `carla.World.spawn_actor` shows some sensors being + Class that defines attachment options between an actor and its parent. + When spawning actors, these can be attached to another actor so their + position changes accordingly. This is specially useful for sensors. + The snippet in `carla.World.spawn_actor` shows some sensors being attached to a car when spawned. - + Note that the attachment type is declared as an enum within the class.""" + + Note that the attachment type is declared as an enum within the class. + """ # region Instance Variables Rigid = 0 - """With this fixed attachment the object follow its parent position strictly. + """With this fixed attachment the object follow its parent position strictly. This is the recommended attachment to retrieve precise data from the simulation.""" - + SpringArm = 1 """ - An attachment that expands or retracts the position of the actor, - depending on its parent. This attachment is only recommended to record - videos from the simulation where a smooth movement is needed. SpringArms - are an Unreal Engine component so check the UE docs to learn more about + An attachment that expands or retracts the position of the actor, + depending on its parent. This attachment is only recommended to record + videos from the simulation where a smooth movement is needed. SpringArms + are an Unreal Engine component so check the UE docs to learn more about them. https://docs.unrealengine.com/5.3/en-US/using-spring-arm-components-in-unreal-engine/ - + Warning: The `SpringArm` attachment presents weird behaviors when an + + Warning: The `SpringArm` attachment presents weird behaviors when an actor is spawned with a relative translation in the Z-axis (e.g. `child_location = Location(0,0,2)`). """ SpringArmGhost = 2 """ - An attachment like the previous one but that does not make the collision test, - and that means that it does not expands or retracts the position of the actor. - The term ghost is because then the camera can cross walls and other geometries. - This attachment is only recommended to record videos from the simulation where - a smooth movement is needed. SpringArms are an Unreal Engine component so + An attachment like the previous one but that does not make the collision test, + and that means that it does not expands or retracts the position of the actor. + The term ghost is because then the camera can cross walls and other geometries. + This attachment is only recommended to record videos from the simulation where + a smooth movement is needed. SpringArms are an Unreal Engine component so check the UE docs to learn more about them. https://docs.unrealengine.com/5.3/en-US/using-spring-arm-components-in-unreal-engine/ - + Warning: The `SpringArm` attachment presents weird behaviors when an actor is + + Warning: The `SpringArm` attachment presents weird behaviors when an actor is spawned with a relative translation in the Z-axis (e.g. `child_location = Location(0,0,2)`). """ # endregion - -class BlueprintLibrary(): +class BlueprintLibrary: """A class that contains the blueprints provided for actor spawning. Its main application is to return `carla.ActorBlueprint` objects needed to spawn actors. Each blueprint has an identifier and attributes that may or may not be modifiable. The library is automatically created by the server and can be accessed through `carla.World`. Here is a reference containing every available blueprint and its specifics. @@ -684,7 +713,7 @@ class BlueprintLibrary(): `wildcard_pattern (str)`\n Returns: - `BlueprintLibrary`\n + `BlueprintLibrary` """ def filter_by_attribute(self, name: str, value: str) -> BlueprintLibrary: @@ -695,7 +724,7 @@ class BlueprintLibrary(): `value (str)`\n Returns: - `ActorBlueprint`\n + `ActorBlueprint` """ def find(self, id: str) -> ActorBlueprint: @@ -705,30 +734,26 @@ class BlueprintLibrary(): `id (str)`\n Returns: - `ActorBlueprint`\n + `ActorBlueprint` """ # endregion # region Dunder Methods def __getitem__(self, pos: int) -> ActorBlueprint: - """Returns the blueprint stored in `pos` position inside the data structure containing them. - """ + """Returns the blueprint stored in `pos` position inside the data structure containing them.""" def __iter__(self) -> Iterator[ActorBlueprint]: """Iterate over the `carla.ActorBlueprint` stored in the library.""" - def __len__(self): + def __len__(self) -> int: """Returns the amount of blueprints comprising the library.""" def __str__(self) -> str: """Parses the identifiers for every blueprint to string.""" - ... # endregion - -class BoundingBox(): - """Bounding boxes contain the geometry of an actor or an element in the scene. They can be used by `carla.DebugHelper` or a `carla.Client` to draw their shapes for debugging. Check out the snippet in `carla.DebugHelper.draw_box` where a snapshot of the world is used to draw bounding boxes for traffic lights. - """ +class BoundingBox: + """Bounding boxes contain the geometry of an actor or an element in the scene. They can be used by `carla.DebugHelper` or a `carla.Client` to draw their shapes for debugging. Check out the snippet in `carla.DebugHelper.draw_box` where a snapshot of the world is used to draw bounding boxes for traffic lights.""" # region Instance Variables @property @@ -736,14 +761,14 @@ class BoundingBox(): """Vector from the center of the box to one vertex. The value in each axis equals half the size of the box for that axis. `extent.x * 2` would return the size of the box in the X-axis. Returns: - `Vector3D`: meters\n + `Vector3D`: meters """ @property def location(self) -> Location: """The center of the bounding box. Returns: - `Location`: meters\n + `Location`: meters """ @property @@ -752,14 +777,13 @@ class BoundingBox(): # endregion # region Methods - def __init__(self, location: Location, extent: Vector3D): + def __init__(self, location: Location, extent: Vector3D) -> None: """Bounding boxes contain the geometry of an actor or an element in the scene. They can be used by `carla.DebugHelper` or a `carla.Client` to draw their shapes for debugging. Check out the snippet in `carla.DebugHelper.draw_box` where a snapshot of the world is used to draw bounding boxes for traffic lights. Args: `location (Location)`: Center of the box, relative to its parent.\n - `extent (Vector3D)`: Vector containing half the size of the box for every axis.\n + `extent (Vector3D)`: Vector containing half the size of the box for every axis. """ - ... def contains(self, world_point: Location, transform: Transform) -> bool: """Returns `True` if a point passed in world space is inside this bounding box. @@ -770,38 +794,41 @@ class BoundingBox(): `transform (Transform)`: Contains location and rotation needed to convert this object's local space to world space.\n Returns: - `bool`\n + `bool` """ # endregion # region Getters def get_local_vertices(self) -> list[Location]: """Returns a list containing the locations of this object's vertices in local space.""" - ... def get_world_vertices(self, transform: Transform) -> list[Location]: """Returns a list containing the locations of this object's vertices in world space. Args: - `transform (Transform)`: Contains location and rotation needed to convert this object's local space to world space.\n + `transform (Transform)`: Contains location and rotation needed to convert this + object's local space to world space. """ - ... # endregion # region Dunder Methods - def __eq__(self, __value: BoundingBox) -> bool: + def __eq__(self, other: BoundingBox, /) -> bool: """Returns true if both location and extent are equal for this and `other`.""" - def __ne__(self, __value: BoundingBox) -> bool: + def __ne__(self, other: BoundingBox, /) -> bool: """Returns true if either location or extent are different for this and `other`.""" def __str__(self) -> str: """Parses the location and extent of the bounding box to string.""" # endregion +class CityObjectLabel(int, _CarlaEnum): + """ + Enum declaration that contains the different tags available to filter the bounding boxes + returned by carla.World.get_level_bbs(). + These values correspond to the semantic tag that the elements in the scene have. + """ -class CityObjectLabel(int, __CarlaEnum): - """Enum declaration that contains the different tags available to filter the bounding boxes returned by carla.World.get_level_bbs(). These values correspond to the semantic tag that the elements in the scene have.""" NONE = 0 Buildings = 3 Fences = 5 @@ -833,26 +860,26 @@ class CityObjectLabel(int, __CarlaEnum): Train = 17 Any = 255 - -class Client(): +class Client: """The Client connects CARLA to the server which runs the simulation. Both server and client contain a CARLA library (libcarla) with some differences that allow communication between them. Many clients can be created and each of these will connect to the RPC server inside the simulation to send commands. The simulation runs server-side. Once the connection is established, the client will only receive data retrieved from the simulation. Walkers are the exception. The client is in charge of managing pedestrians so, if you are running a simulation with multiple clients, some issues may arise. For example, if you spawn walkers through different clients, collisions may happen, as each client is only aware of the ones it is in charge of. The client also has a recording feature that saves all the information of a simulation while running it. This allows the server to replay it at will to obtain information and experiment with it. Here is some information about how to use this recorder. https://carla.readthedocs.io/en/latest/adv_recorder/ """ + # region Methods - def __init__(self, host="127.0.0.1", port=2000, worker_threads=0): + def __init__(self, host: str = "127.0.0.1", port: int = 2000, worker_threads: int = 0) -> None: """Client constructor. Args: `host (str, optional)`: IP address where a CARLA Simulator instance is running. Defaults to "127.0.0.1".\n `port (int, optional)`: TCP port where the CARLA Simulator instance is running. Defaults to 2000 and the subsequent 2001.\n - `worker_threads (int, optional)`: Number of working threads used for background updates. If 0, use all available concurrency. Defaults to 0.\n + `worker_threads (int, optional)`: Number of working threads used for background updates. If 0, use all available concurrency. Defaults to 0. """ - def apply_batch(self, commands: list[command]): + def apply_batch(self, commands: Sequence[command._IsCommand], do_tick: bool = False) -> None: """Executes a list of commands on a single simulation step and retrieves no information. If you need information about the response of each command, use the `apply_batch_sync()` method. Here is an example on how to delete the actors that appear in `carla.ActorList` all at once. @@ -861,31 +888,36 @@ class Client(): Args: `commands (list)`: A list of commands to execute in batch. Each command is different and has its own parameters. \n + `do_tick (bool)`: A boolean parameter to specify whether or not to perform a `carla.World.tick` after applying the batch in synchronous mode. + Defaults to False. """ - def apply_batch_sync(self, commands: list[command], due_tick_cue=False) -> list[command.Response]: + def apply_batch_sync(self, commands: Sequence[command._IsCommand], do_tick: bool = False) -> list[command.Response]: """Executes a list of commands on a single simulation step, blocks until the commands are linked, and returns a list of command.Response that can be used to determine whether a single command succeeded or not. Here is an example of it being used to spawn actors. https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py Args: `commands (list[command])`: A list of commands to execute in batch. The commands available are listed right above, in the method `apply_batch()`.\n - `due_tick_cue (bool, optional)`: A boolean parameter to specify whether or not to perform a `carla.World.tick` after applying the batch in synchronous mode. Defaults to False.\n + `do_tick (bool, optional)`: A boolean parameter to specify whether or not to perform a `carla.World.tick` after applying the batch in synchronous mode. Defaults to False. Returns: - `list[command.Response]`\n + `list[command.Response]` """ - def generate_opendrive_world(self, opendrive: str, parameters: OpendriveGenerationParameters = OpendriveGenerationParameters(2.0, 50.0, 1.0, 0.6, True, True), reset_settings=True): + def generate_opendrive_world(self, + opendrive: str, + parameters: OpendriveGenerationParameters = OpendriveGenerationParameters(2.0, 50.0, 1.0, 0.6, True, True), + reset_settings: bool = True): """Loads a new world with a basic 3D topology generated from the content of an OpenDRIVE file. This content is passed as a `string` parameter. It is similar to `client.load_world(map_name)` but allows for custom OpenDRIVE maps in server side. Cars can drive around the map, but there are no graphics besides the road and sidewalks. Args: `opendrive (str)`: Content of an OpenDRIVE file as `string`, not the path to the `.xodr`.\n `parameters (OpendriveGenerationParameters, optional)`: Additional settings for the mesh generation. Defaults to (2.0, 50.0, 1.0, 0.6, True, True).\n - `reset_settings (bool, optional)`: Option to reset the episode setting to default values, set to false to keep the current settings. This is useful to keep sync mode when changing map and to keep deterministic scenarios. Defaults to True.\n + `reset_settings (bool, optional)`: Option to reset the episode setting to default values, set to false to keep the current settings. This is useful to keep sync mode when changing map and to keep deterministic scenarios. Defaults to True. """ - def load_world(self, map_name: str, reset_settings=True, map_layers=MapLayer.All) -> World: + def load_world(self, map_name: str, reset_settings: bool = True, map_layers: MapLayer = MapLayer.All) -> World: """Creates a new world with default settings using `map_name` map. All actors in the current world will be destroyed. + Warning: `map_layers` are only available for "Opt" maps @@ -894,12 +926,12 @@ class Client(): `map_name (str)`: Name of the map to be used in this world. Accepts both full paths and map names,e.g. `'/Game/Carla/Maps/Town01'` or `'Town01'`. Remember that these paths are dynamic.\n `reset_settings (bool, optional)`: Option to reset the episode setting to default values, set to false to keep the current settings. This is useful to keep sync mode when changing map and to keep deterministic scenarios. Defaults to True.\n `map_layers (MapLayer, optional)`: Layers of the map that will be loaded. This parameter works like a flag mask. Defaults to MapLayer.All.\n - + Returns: - `World`\n + `World` """ - def reload_world(self, reset_settings=True) -> World: + def reload_world(self, reset_settings: bool = True) -> World: """Reload the current world, note that a new world is created with default settings using the same map. All actors present in the world will be destroyed, but traffic manager instances will stay alive. Args: @@ -907,31 +939,31 @@ class Client(): Raises: `RuntimeError` when corresponding. - + Returns: - `World`\n + `World` """ - - def load_world_if_different(self, map_name: str, reset_settings=True, map_layers=MapLayer.All): + + def load_world_if_different(self, map_name: str, reset_settings: bool = True, map_layers: MapLayer = MapLayer.All): """" - Creates a new world with default settings using `map_name` map only if it is a different map + Creates a new world with default settings using `map_name` map only if it is a different map from the currently loaded map. Otherwise this function returns `None`. All actors in the current world will be destroyed. Args: - `map_name (str)`: Name of the map to be used in this world. Accepts both full paths and map names, + `map_name (str)`: Name of the map to be used in this world. Accepts both full paths and map names, e.g.'/Game/Carla/Maps/Town01' or 'Town01'. Remember that these paths are dynamic.\n `reset_settings (bool, optional)`: Option to reset the episode setting to default values, set to false to keep the current settings. - This is useful to keep sync mode when changing map and to keep deterministic scenarios. + This is useful to keep sync mode when changing map and to keep deterministic scenarios. Defaults to True.\n - `map_layers (MapLayer, optional)`: Layers of the map that will be loaded. This parameter works like a flag mask. + `map_layers (MapLayer, optional)`: Layers of the map that will be loaded. This parameter works like a flag mask. Defaults to MapLayer.All.\n Returns: None """ - def replay_file(self, name: str, start: float, duration: float, follow_id: int, replay_sensors: bool): + def replay_file(self, name: str, start: float, duration: float, follow_id: int, replay_sensors: bool = False) -> str: """Load a new world with default settings using `map_name` map. All actors present in the current world will be destroyed, but traffic manager instances will stay alive. Args: @@ -940,13 +972,16 @@ class Client(): `duration (float - seconds)`: Time that will be reenacted using the information `name` file. If the end is reached, the simulation will continue.\n `follow_id (int)`: ID of the actor to follow. If this is 0 then camera is disabled.\n `replay_sensors (bool)`: Flag to enable or disable the spawn of sensors during playback.\n + + Returns: + Logging information. """ def request_file(self, name: str): """Requests one of the required files returned by `carla.Client.get_required_files`. Args: - `name (str)`: Name of the file you are requesting.\n + `name (str)`: Name of the file you are requesting. """ def show_recorder_actors_blocked(self, filename: str, min_time: float, min_distance: float) -> str: @@ -958,7 +993,7 @@ class Client(): `min_distance (float - centimeters)`: Minimum distance the actor has to move to not be considered blocked. Default is 100 centimeters.\n Returns: - `str`\n + `str` """ def show_recorder_collisions(self, filename: str, category1: str, category2: str) -> str: @@ -970,7 +1005,7 @@ class Client(): `category2 (str)`: Character variable specifying the second type of actor involved in the collision.\n Returns: - `str`\n + `str` """ def show_recorder_file_info(self, filename: str, show_all: bool) -> str: @@ -983,15 +1018,15 @@ class Client(): `show_all (bool)`: If `True`, returns all the information stored for every frame (traffic light states, positions of all actors, orientation and animation data...). If `False`, returns a summary of key events and frames.\n Returns: - `str`\n + `str` """ - def start_recorder(self, filename: str, additional_data=False): + def start_recorder(self, filename: str, additional_data: bool = False): """Enables the recording feature, which will start saving every information possible needed by the server to replay the simulation. Args: `filename (str)`: Name of the file to write the recorded data. A simple name will save the recording in 'CarlaUE4/Saved/recording.log'. Otherwise, if some folder appears in the name, it will be considered an absolute path.\n - `additional_data (bool, optional)`: Enables or disable recording non-essential data for reproducing the simulation (bounding box location, physics control parameters, etc). Defaults to False.\n + `additional_data (bool, optional)`: Enables or disable recording non-essential data for reproducing the simulation (bounding box location, physics control parameters, etc). Defaults to False. """ def stop_recorder(self): @@ -1001,43 +1036,40 @@ class Client(): """Stop current replayer. Args: - `keep_actors (bool)`: `True` if you want autoremove all actors from the replayer, or `False` to keep them.\n + `keep_actors (bool)`: `True` if you want autoremove all actors from the replayer, or `False` to keep them. """ # endregion # region Getters def get_available_maps(self) -> list[str]: - """Returns a list of strings containing the paths of the maps available on server. These paths are dynamic, they will be created during the simulation and so you will not find them when looking up in your files. One of the possible returns for this method would be: + """Returns a list of strings containing the paths of the maps available on server. These paths are dynamic, they will be created during the simulation and so you will not find them when looking up in your files. One of the possible returns for this method would be: >>> ['/Game/Carla/Maps/Town01', '/Game/Carla/Maps/Town02', '/Game/Carla/Maps/Town03', '/Game/Carla/Maps/Town04', '/Game/Carla/Maps/Town05', '/Game/Carla/Maps/Town06', '/Game/Carla/Maps/Town07'] """ def get_client_version(self) -> str: - """Returns the client libcarla version by consulting it in the "Version.h" file. Both client and server can use different libcarla versions but some issues may arise regarding unexpected incompatibilities. - """ + """Returns the client libcarla version by consulting it in the "Version.h" file. Both client and server can use different libcarla versions but some issues may arise regarding unexpected incompatibilities.""" - def get_required_files(self, folder: str, download=True): + def get_required_files(self, folder: str, download: bool = True): """Asks the server which files are required by the client to use the current map. Option to download files automatically if they are not already in the cache. Args: `folder (str)`: Folder where files required by the client will be downloaded to.\n - `download (bool, optional)`: If `True`, downloads files that are not already in cache.. Defaults to True.\n + `download (bool, optional)`: If `True`, downloads files that are not already in cache.. Defaults to True. """ def get_server_version(self) -> str: - """Returns the server libcarla version by consulting it in the "Version.h" file. Both client and server should use the same libcarla version. - """ + """Returns the server libcarla version by consulting it in the "Version.h" file. Both client and server should use the same libcarla version.""" - def get_trafficmanager(self, client_connection=8000) -> TrafficManager: + def get_trafficmanager(self, client_connection: int = 8000) -> TrafficManager: """Returns an instance of the traffic manager related to the specified port. If it does not exist, this will be created. Args: - `client_connection (int, optional)`: Port that will be used by the traffic manager.. Defaults to 8000.\n + `client_connection (int, optional)`: Port that will be used by the traffic manager.. Defaults to 8000. """ def get_world(self) -> World: - """Returns the world object currently active in the simulation. This world will be later used for example to load maps. - """ + """Returns the world object currently active in the simulation. This world will be later used for example to load maps.""" # endregion # region Setters @@ -1045,45 +1077,45 @@ class Client(): """Specifies the base folder where the local cache for required files will be placed. Args: - `path (str)`: Specifies the base folder where the local cache for required files will be placed.\n + `path (str)`: Specifies the base folder where the local cache for required files will be placed. """ def set_replayer_ignore_hero(self, ignore_hero: bool): """Enables or disables playback of the hero vehicle during a playback of a recorded simulation. Args: - `ignore_hero (bool)`: Enables or disables playback of the hero vehicle during a playback of a recorded simulation.\n + `ignore_hero (bool)`: Enables or disables playback of the hero vehicle during a playback of a recorded simulation. """ def set_replayer_ignore_spectator(self, ignore_spectator: bool): """Determines whether the recorded spectator movements will be replicated by the replayer. Args: - `ignore_spectator (bool)`: Determines whether the recorded spectator movements will be replicated by the replayer.\n + `ignore_spectator (bool)`: Determines whether the recorded spectator movements will be replicated by the replayer. """ - def set_replayer_time_factor(self, time_factor=1.0): + def set_replayer_time_factor(self, time_factor: float = 1.0): """When used, the time speed of the reenacted simulation is modified at will. It can be used several times while a playback is in curse. Args: - `time_factor (float, optional)`: 1.0 means normal time speed. Greater than 1.0 means fast motion (2.0 would be double speed) and lesser means slow motion (0.5 would be half speed). Defaults to 1.0.\n + `time_factor (float, optional)`: 1.0 means normal time speed. Greater than 1.0 means fast motion (2.0 would be double speed) and lesser means slow motion (0.5 would be half speed). Defaults to 1.0. """ def set_timeout(self, second: float): """Sets the maximum time a network call is allowed before blocking it and raising a timeout exceeded error. Args: - `second (float - seconds)`: New timeout value. Default is 5 seconds.\n + `second (float - seconds)`: New timeout value. Default is 5 seconds. """ # endregion - class CollisionEvent(SensorData): """Class that defines a collision data for sensor.other.collision. The sensor creates one of these for every collision detected. Each collision sensor produces one collision event per collision per frame. Multiple collision events may be produced in a single frame by collisions with multiple other actors. Learn more about this here. https://carla.readthedocs.io/en/latest/ref_sensors/#collision-detector """ + # region Instance Variables @property def actor(self) -> Actor: @@ -1096,50 +1128,59 @@ class CollisionEvent(SensorData): """Normal impulse resulting of the collision.(N*s)""" # endregion - -class Color(): +class Color: """Class that defines a 32-bit RGBA color.""" # region Instance Variables @property def r(self) -> int: """Red color (0-255).""" + @r.setter + def r(self, value: int) -> None: ... + @property def g(self) -> int: """Green color (0-255).""" + @g.setter + def g(self, value: int) -> None: ... + @property def b(self) -> int: """Blue color (0-255).""" + @b.setter + def b(self, value: int) -> None: ... + @property def a(self) -> int: """Alpha channel (0-255).""" + @a.setter + def a(self, value: int) -> None: ... # endregion # region Methods - def __init__(self, r=0, g=0, b=0, a=255): + def __init__(self, r: int = 0, g: int = 0, b: int = 0, a: int = 255) -> None: """Initializes a color, black by default. Args: `r (int, optional)`: Red color (0-255). Defaults to 0.\n `g (int, optional)`: Green color (0-255). Defaults to 0.\n `b (int, optional)`: Blue color (0-255). Defaults to 0.\n - `a (int, optional)`: Alpha channel (0-255). Defaults to 255.\n + `a (int, optional)`: Alpha channel (0-255). Defaults to 255. """ # endregion # region Dunder Methods - def __eq__(self, __value: Color) -> bool: ... - def __ne__(self, __value: Color) -> bool: ... + def __eq__(self, other: Color, /) -> bool: ... + def __ne__(self, other: Color, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class ColorConverter(int, __CarlaEnum): +class ColorConverter(int, _CarlaEnum): """ - Class that defines conversion patterns that can be applied to a `carla.Image` in order to show - information provided by `carla.Sensor`. Depth conversions cause a loss of accuracy, as sensors + Class that defines conversion patterns that can be applied to a `carla.Image` in order to show + information provided by `carla.Sensor`. Depth conversions cause a loss of accuracy, as sensors detect depth as float that is then converted to a grayscale value between 0 and 255. Take a look - at the snippet in `carla.Sensor.listen` to see an example of how to create and save image data + at the snippet in `carla.Sensor.listen` to see an example of how to create and save image data for `sensor.camera.semantic_segmentation`. """ @@ -1154,8 +1195,7 @@ class ColorConverter(int, __CarlaEnum): """Converts the image to a segmented map using tags provided by the blueprint library. Used by the `semantic segmentation camera`.""" # endregion - -class DVSEvent(): +class DVSEvent: """Class that defines a DVS event. An event is a quadruple, so a tuple of 4 elements, with `x`, `y` pixel coordinate location, timestamp `t` and polarity `pol` of the event. Learn more about them here. https://carla.readthedocs.io/en/latest/ref_sensors/ @@ -1180,8 +1220,7 @@ class DVSEvent(): def __str__(self) -> str: ... # endregion - -class DVSEventArray(): +class DVSEventArray(SensorData): """ Class that defines a stream of events in `carla.DVSEvent`. Such stream is an array of arbitrary size depending on the number of events. This class also stores the field of view, the height and @@ -1201,23 +1240,25 @@ class DVSEventArray(): def width(self) -> int: """Image width in pixels.""" @property - def raw_data(self) -> bytes: ... + def raw_data(self) -> bytes: ... # pylint: disable=missing-function-docstring # endregion # region Methods - def to_array(self) -> Iterable: + # TODO: Decide between vague correct list, or wrong tuple but exact return type. + # def to_array(self) -> list[tuple[int, int, float, bool]]: + def to_array(self) -> list[list[float | int | bool]]: """Converts the stream of events to an array of int values in the following order `[x, y, t, pol]`.""" - def to_array_pol(self) -> Iterable: + def to_array_pol(self) -> list[bool]: """Returns an array with the polarity of all the events in the stream.""" - def to_array_t(self) -> Iterable: + def to_array_t(self) -> list[float]: """Returns an array with the timestamp of all the events in the stream.""" - def to_array_x(self) -> Iterable: + def to_array_x(self) -> list[int]: """Returns an array with X pixel coordinate of all the events in the stream.""" - def to_array_y(self) -> Iterable: + def to_array_y(self) -> list[int]: """Returns an array with Y pixel coordinate of all the events in the stream.""" def to_image(self) -> Image: @@ -1225,26 +1266,25 @@ class DVSEventArray(): # endregion # region Dunder Methods - def __getitem__(self, pos: int): ... + def __getitem__(self, pos: int, /) -> DVSEvent: ... def __iter__(self) -> Iterator[DVSEvent]: """Iterate over the `carla.DVSEvent` retrieved as data.""" - def __len__(self): ... - def __setitem(self, pos: int, color: Color): ... + def __len__(self) -> int: ... + def __setitem__(self, pos: int, color: Color, /) -> None: ... def __str__(self) -> str: ... # endregion - -class DebugHelper(): +class DebugHelper: """ - Helper class part of `carla.World` that defines methods for creating debug shapes. By default, - shapes last one second. They can be permanent, but take into account the resources needed to do + Helper class part of `carla.World` that defines methods for creating debug shapes. By default, + shapes last one second. They can be permanent, but take into account the resources needed to do so. Take a look at the snippets available for this class to learn how to debug easily in CARLA. """ # region Methods - def draw_arrow(self, begin: Location, end: Location, thickness=0.1, arrow_size=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + def draw_arrow(self, begin: Vector3D, end: Vector3D, thickness: float = 0.1, arrow_size: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws an arrow from `begin` to `end` pointing in that direction. @@ -1256,12 +1296,11 @@ class DebugHelper(): color (Color, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes (seconds). Defaults to -1.0. """ - ... - - def draw_hud_arrow(self, begin: Location, end: Location, thickness=0.1, arrow_size=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + + def draw_hud_arrow(self, begin: Vector3D, end: Vector3D, thickness: float = 0.1, arrow_size: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws an arrow on the HUD from `begin` to `end` which can only be seen server-side. - + Args: begin (Location): Point in the coordinate system where the arrow starts (meters). end (Location): Point in the coordinate system where the arrow ends and points towards to (meters). @@ -1271,7 +1310,7 @@ class DebugHelper(): life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes (seconds). Defaults to -1.0. """ - def draw_box(self, box: BoundingBox, rotation: Rotation, thickness=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + def draw_box(self, box: BoundingBox, rotation: Rotation, thickness: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """Draws a box, usually to act for object colliders. Args: @@ -1281,9 +1320,8 @@ class DebugHelper(): color (Color, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes. Defaults to -1.0. """ - ... - - def draw_hud_box(self, box: BoundingBox, rotation: Rotation, thickness=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + + def draw_hud_box(self, box: BoundingBox, rotation: Rotation, thickness: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws a box on the HUD, usually to act for object colliders. The box can only be seen server-side. @@ -1294,10 +1332,8 @@ class DebugHelper(): color (Color, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes. Defaults to -1.0. """ - ... - - def draw_line(self, begin: Location, end: Location, thickness=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + def draw_line(self, begin: Vector3D, end: Vector3D, thickness: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws a line in between `begin` and `end`. @@ -1308,9 +1344,8 @@ class DebugHelper(): color (Color, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes. Defaults to -1.0. """ - ... - - def draw_hud_line(self, begin: Location, end: Location, thickness=0.1, color: Color =Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + + def draw_hud_line(self, begin: Vector3D, end: Vector3D, thickness: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws a line on the HUD in between `begin` and `end`. The line can only be seen server-side. @@ -1321,9 +1356,8 @@ class DebugHelper(): color (Color, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes. Defaults to -1.0. """ - ... - def draw_point(self, location: Location, size=0.1, color: Color=Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + def draw_point(self, location: Vector3D, size: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws a point location. @@ -1333,9 +1367,8 @@ class DebugHelper(): color (tuple, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes (seconds). Defaults to -1.0. """ - ... - - def draw_hud_point(self, location: Location, size=0.1, color: Color=Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + + def draw_hud_point(self, location: Vector3D, size: float = 0.1, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """ Draws a point on the HUD at `location`. The point can only be seen server-side. @@ -1345,9 +1378,8 @@ class DebugHelper(): color (tuple, optional): RGB code to color the object. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to 0 for permanent shapes (seconds). Defaults to -1.0. """ - ... - def draw_string(self, location: Location, text: str, draw_shadow=False, color: Color = Color(255, 0, 0), life_time=-1.0, persistent_lines=True) -> None: + def draw_string(self, location: Vector3D, text: str, draw_shadow: bool = False, color: Color = Color(255, 0, 0), life_time: float = -1, persistent_lines: bool = True) -> None: """Draws a string in a given location of the simulation which can only be seen server-side. Args: @@ -1357,92 +1389,77 @@ class DebugHelper(): color (Color, optional): RGB code to color the string. Defaults to (255,0,0). life_time (float, optional): Shape's lifespan. By default it only lasts one frame. Set this to `0` for permanent shapes (seconds). Defaults to -1.0. """ - ... # endregion - -class EnvironmentObject(): +class EnvironmentObject: """Class that represents a geometry in the level, this geometry could be part of an actor formed with other EnvironmentObjects (i.e.: buildings).""" # region Instance Variables @property def transform(self) -> Transform: """Contains the location and orientation of the EnvironmentObject in world space.""" - ... @property def bounding_box(self) -> BoundingBox: """Object containing a location, rotation and the length of a box for every axis in world space.""" - ... @property def id(self) -> int: """Unique ID to identify the object in the level.""" - ... @property def name(self) -> str: """Name of the EnvironmentObject.""" - ... @property def type(self) -> CityObjectLabel: """Semantic tag.""" - ... # endregion # region Dunder Methods def __str__(self) -> str: """Parses the EnvironmentObject to a string and shows them in command line.""" - ... # endregion - -class FloatColor(): +class FloatColor: """Class that defines a float RGBA color.""" # region Instance Variables @property def r(self) -> float: """Red color.""" - ... @property def g(self) -> float: """Green color.""" - ... @property def b(self) -> float: """Blue color.""" - ... @property def a(self) -> float: """Alpha channel.""" - ... # endregion # region Methods - def __init__(self, r=.0, g=.0, b=.0, a=1.0): + def __init__(self, r: float = .0, g: float = .0, b: float = .0, a: float = 1.0) -> None: """Initializes a color, black by default. Args: - r (float, optional): Red color. Defaults to .0. - g (float, optional): Green color. Defaults to .0. - b (float, optional): Blue color. Defaults to .0. + r (float, optional): Red color. Defaults to 0.0. + g (float, optional): Green color. Defaults to 0.0. + b (float, optional): Blue color. Defaults to 0.0. a (float, optional): Alpha channel. Defaults to 1.0. """ - ... # endregion # region Dunder Methods - def __eq__(self, __value: FloatColor) -> bool: ... - def __ne__(self, __value: FloatColor) -> bool: ... + def __eq__(self, other: FloatColor, /) -> bool: ... + def __ne__(self, other: FloatColor, /) -> bool: ... # endregion - -class GBufferTextureID(int, __CarlaEnum): +class GBufferTextureID(int, _CarlaEnum): """Defines the identifiers of each GBuffer texture (See the method `carla.Sensor.listen_to_gbuffer`).""" # region Instance Variables @@ -1458,7 +1475,7 @@ class GBufferTextureID(int, __CarlaEnum): """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 = 5 """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 = 6 """ @@ -1496,84 +1513,74 @@ class GBufferTextureID(int, __CarlaEnum): """The texture "CustomStencil" contains the Unreal Engine custom stencil data.""" # endregion - -class 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` to help simulate physics. - """ +class 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` to help simulate physics.""" # region Instance Variables @property def ratio(self) -> float: """The transmission ratio of the gear.""" - ... @property def down_ratio(self) -> float: """Quotient between current RPM and MaxRPM where the autonomous gear box should shift down.""" - + @property def up_ratio(self) -> float: """Quotient between current RPM and MaxRPM where the autonomous gear box should shift up.""" # endregion # region Methods - def __init__(self, ratio=1.0, down_ratio=0.5, up_ratio=0.65): + def __init__(self, ratio: float = 1.0, down_ratio: float = 0.5, up_ratio: float = 0.65) -> None: """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` to help simulate physics. Args: `ratio (float, optional)`: The transmission ratio of the gear. Defaults to 1.0.\n `down_ratio (float, optional)`: Quotient between current RPM and MaxRPM where the autonomous gear box should shift down. Defaults to 0.5.\n - `up_ratio (float, optional)`: Quotient between current RPM and MaxRPM where the autonomous gear box should shift up. Defaults to 0.65.\n + `up_ratio (float, optional)`: Quotient between current RPM and MaxRPM where the autonomous gear box should shift up. Defaults to 0.65. """ - ... # endregion # region Dunder Methods - def __eq__(self, __value: GearPhysicsControl) -> bool: ... - def __ne__(self, __value: GearPhysicsControl) -> bool: ... + def __eq__(self, other: GearPhysicsControl, /) -> bool: ... + def __ne__(self, other: GearPhysicsControl, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class GeoLocation(): +class GeoLocation: """Class that contains geographical coordinates simulated data. The `carla.Map` can convert simulation locations by using the tag in the OpenDRIVE file.""" # region Instance Variables @property def latitude(self) -> float: """North/South value of a point on the map (degrees).""" - ... @property def longitude(self) -> float: """West/East value of a point on the map (degrees).""" - ... @property def altitude(self) -> float: """Height regarding ground level (meters).""" - ... # endregion # region Methods - def __init__(self, latitude=0.0, longitude=0.0, altitude=0.0): + def __init__(self, latitude: float = 0.0, longitude: float = 0.0, altitude: float = 0.0) -> None: """Class that contains geographical coordinates simulated data. The `carla.Map` can convert simulation locations by using the tag in the OpenDRIVE file. Args: `latitude (float, optional)`: North/South value of a point on the map (degrees). Defaults to 0.0.\n `longitude (float, optional)`: West/East value of a point on the map (degrees). Defaults to 0.0.\n - `altitude (float, optional)`: Height regarding ground level (meters). Defaults to 0.0.\n + `altitude (float, optional)`: Height regarding ground level (meters). Defaults to 0.0. """ - ... # endregion # region Dunder Methods - def __eq__(self, __value: GeoLocation) -> bool: ... - def __ne__(self, __value: GeoLocation) -> bool: ... + def __eq__(self, other: GeoLocation, /) -> bool: ... + def __ne__(self, other: GeoLocation, /) -> bool: ... def __str__(self) -> str: ... # endregion - class GnssMeasurement(SensorData): """Class that defines the Gnss data registered by a `sensor.other.gnss`. It essentially reports its position with the position of the sensor and an OpenDRIVE geo-reference.""" @@ -1581,24 +1588,20 @@ class GnssMeasurement(SensorData): @property def altitude(self) -> float: """Height regarding ground level (meters).""" - ... @property def latitude(self) -> float: """North/South value of a point on the map (degrees).""" - ... @property def longitude(self) -> float: """West/East value of a point on the map (degrees).""" - ... # endregion # region Dunder Methods def __str__(self) -> str: ... # endregion - class IMUMeasurement(SensorData): """Class that defines the data registered by a `sensor.other.imu`, regarding the sensor's transformation according to the current `carla.World`. It essentially acts as accelerometer, gyroscope and compass.""" @@ -1606,49 +1609,42 @@ class IMUMeasurement(SensorData): @property def accelerometer(self) -> Vector3D: """Linear acceleration (m/s2).""" - ... @property def compass(self) -> float: """Orientation with regard to the North ([0.0, -1.0, 0.0] in Unreal Engine) (radians).""" - ... @property def gyroscope(self) -> Vector3D: """Angular velocity. (rad/s)""" - ... # endregion # region Dunder Methods def __str__(self) -> str: ... # endregion - class Image(SensorData): """Class that defines an image of 32-bit BGRA colors that will be used as initial data retrieved by camera sensors. There are different camera sensors (currently three, RGB, depth and semantic segmentation) and each of these makes different use for the images. Learn more about them here. - https://carla.readthedocs.io/en/latest/ref_sensors/""" + https://carla.readthedocs.io/en/latest/ref_sensors/ + """ # region Instance Variables @property def fov(self) -> float: """Horizontal field of view of the image (degrees).""" - ... @property def height(self) -> int: """Image height in pixels.""" - ... @property def width(self) -> int: """Image width in pixels.""" - ... @property def raw_data(self) -> bytes: """Flattened array of pixel data, use reshape to create an image array.""" - ... # endregion # region Methods @@ -1656,44 +1652,40 @@ class Image(SensorData): """Converts the image following the `color_converter` pattern. Args: - `color_converter (ColorConverter)`\n + `color_converter (ColorConverter)` """ - def save_to_disk(self, path: str, color_converter=ColorConverter.Raw): + def save_to_disk(self, path: str, color_converter: ColorConverter = ColorConverter.Raw): """Saves the image to disk using a converter pattern stated as `color_converter`. The default conversion pattern is `Raw` that will make no changes to the image. Args: `path (str)`:Path that will contain the image.\n - `color_converter (ColorConverter, optional)`: Default Raw will make no changes. Defaults to ColorConverter.Raw.\n + `color_converter (ColorConverter, optional)`: Default Raw will make no changes. Defaults to ColorConverter.Raw. """ # endregion # region Dunder Methods - def __getitem__(self, pos=int) -> Color: ... + def __getitem__(self, pos: int) -> Color: ... def __iter__(self) -> Iterator[Color]: """Iterate over the `carla.Color` that form the image.""" - ... def __len__(self) -> int: ... - def __setitem__(self, pos: int, color: Color): ... + def __setitem__(self, pos: int, color: Color) -> None: ... def __str__(self) -> str: ... # endregion - -class Junction(): +class Junction: """Class that embodies the intersections on the road described in the OpenDRIVE file according to OpenDRIVE 1.4 standards.""" # region Instance Variables @property def id(self) -> int: """Identifier found in the OpenDRIVE file.""" - ... @property def bounding_box(self) -> BoundingBox: """Bounding box encapsulating the junction lanes.""" - ... # endregion # region Getters @@ -1708,24 +1700,20 @@ class Junction(): """ # endregion - -class LabelledPoint(): +class LabelledPoint: """Class that represent a position in space with a semantic label.""" # region Instance Variables @property def location(self) -> Location: """Position in 3D space.""" - ... @property def label(self) -> CityObjectLabel: """Semantic tag of the point.""" - ... # endregion - -class Landmark(): +class Landmark: """Class that defines any type of traffic landmark or sign affecting a road. These class mediates between the OpenDRIVE 1.4 standard definition of the landmarks and their representation in the simulation. This class retrieves all the information defining a landmark in OpenDRIVE and facilitates information about which lanes does it affect and when. Landmarks will be accessed by `carla.Waypoint objects` trying to retrieve the regulation of their lane. Therefore some attributes depend on the waypoint that is consulting the landmark and so, creating the object.""" # region Instance Variables @@ -1733,58 +1721,48 @@ class Landmark(): def road_id(self) -> int: """The OpenDRIVE ID of the road where this landmark is defined. Due to OpenDRIVE road definitions, this road may be different from the road the landmark is currently affecting. It is mostly the case in junctions where the road diverges in different routes. - Example: a traffic light is defined in one of the divergent roads in a junction, but it affects all the possible routes.""" - ... + Example: a traffic light is defined in one of the divergent roads in a junction, but it affects all the possible routes. + """ @property def distance(self) -> float: """Distance between the landmark and the waypoint creating the object (querying `get_landmarks` or `get_landmarks_of_type`) (meters).""" - ... @property def s(self) -> float: """Distance where the landmark is positioned along the geometry of the road `road_id` (meters).""" - ... @property def t(self) -> float: """Lateral distance where the landmark is positioned from the edge of the road `road_id` (meters).""" - ... @property def id(self) -> str: """Unique ID of the landmark in the OpenDRIVE file.""" - ... @property def name(self) -> str: """Name of the landmark in the in the OpenDRIVE file.""" - ... @property def is_dynamic(self) -> bool: """Indicates if the landmark has state changes over time such as traffic lights.""" - ... @property def orientation(self) -> LandmarkOrientation: """Indicates which lanes the landmark is facing towards to (degrees).""" - ... @property def z_offset(self) -> float: """Height where the landmark is placed (meters).""" - ... @property def country(self) -> str: """Country code where the landmark is defined (default to OpenDRIVE is Germany 2017).""" - ... @property def type(self) -> str: """Type identifier of the landmark according to the country code.""" - ... @property def sub_type(self) -> str: @@ -1797,7 +1775,6 @@ class Landmark(): @property def unit(self) -> str: """Units of measurement for the attribute `value`.""" - ... @property def height(self) -> float: @@ -1814,7 +1791,6 @@ class Landmark(): @property def h_offset(self) -> float: """Orientation offset of the signal relative to the the definition of `road_id` at `s` in OpenDRIVE (meters).""" - ... @property def pitch(self) -> float: @@ -1835,13 +1811,13 @@ class Landmark(): # region Getters def get_lane_validities(self) -> list[tuple[int, int]]: - """Returns which lanes the landmark is affecting to. As there may be specific lanes where the landmark is not effective, the return is a list of pairs containing ranges of the `lane_id` affected: + """Returns which lanes the landmark is affecting to. As there may be specific lanes where the landmark is not effective, the return is a list of pairs containing ranges of the `lane_id` affected: - Example: In a road with 5 lanes, being 3 not affected: [(from_lane1,to_lane2),(from_lane4,to_lane5)].""" + Example: In a road with 5 lanes, being 3 not affected: [(from_lane1,to_lane2),(from_lane4,to_lane5)]. + """ # endregion - -class LandmarkOrientation(int, __CarlaEnum): +class LandmarkOrientation(int, _CarlaEnum): """Helper class to define the orientation of a landmark in the road. The definition is not directly translated from OpenDRIVE but converted for the sake of understanding.""" # region Instance Variables @@ -1853,52 +1829,50 @@ class LandmarkOrientation(int, __CarlaEnum): """Affects vehicles going in both directions of the road.""" # endregion - class LandmarkType(Enum): """Helper class containing a set of commonly used landmark types as defined by the default country code in the OpenDRIVE standard (Germany 2017). `carla.Landmark` does not reference this class. The landmark type is a string that varies greatly depending on the country code being used. This class only makes it easier to manage some of the most commonly used in the default set by describing them as an enum.""" - + # NOTE: Has no attributes for `values` and `names` - + # region Instance Variables - Danger = "101", - LanesMerging = "121", - CautionPedestrian = "133", + Danger = "101" + LanesMerging = "121" + CautionPedestrian = "133" CautionBicycle = "138" - LevelCrossing = "150", - StopSign = "206", - YieldSign = "205", - MandatoryTurnDirection = "209", - MandatoryLeftRightDirection = "211", - TwoChoiceTurnDirection = "214", - Roundabout = "215", - PassRightLeft = "222", - AccessForbidden = "250", - AccessForbiddenMotorvehicles = "251", - AccessForbiddenTrucks = "253", - AccessForbiddenBicycle = "254", - AccessForbiddenWeight = "263", - AccessForbiddenWidth = "264", - AccessForbiddenHeight = "265", - AccessForbiddenWrongDirection = "267", - ForbiddenUTurn = "272", - MaximumSpeed = "274", - ForbiddenOvertakingMotorvehicles = "276", - ForbiddenOvertakingTrucks = "277", - AbsoluteNoStop = "283", - RestrictedStop = "286", - HasWayNextIntersection = "301", - PriorityWay = "306", - PriorityWayEnd = "307", - CityBegin = "310", - CityEnd = "311", - Highway = "330", - DeadEnd = "357", - RecomendedSpeed = "380", # NOTE: Wrong Spelling, but is named like this internally! - RecomendedSpeedEnd = "381", # NOTE: Wrong Spelling, but is named like this internally! - # endregion - - -class LaneChange(IntFlag, __CarlaEnum): + LevelCrossing = "150" + StopSign = "206" + YieldSign = "205" + MandatoryTurnDirection = "209" + MandatoryLeftRightDirection = "211" + TwoChoiceTurnDirection = "214" + Roundabout = "215" + PassRightLeft = "222" + AccessForbidden = "250" + AccessForbiddenMotorvehicles = "251" + AccessForbiddenTrucks = "253" + AccessForbiddenBicycle = "254" + AccessForbiddenWeight = "263" + AccessForbiddenWidth = "264" + AccessForbiddenHeight = "265" + AccessForbiddenWrongDirection = "267" + ForbiddenUTurn = "272" + MaximumSpeed = "274" + ForbiddenOvertakingMotorvehicles = "276" + ForbiddenOvertakingTrucks = "277" + AbsoluteNoStop = "283" + RestrictedStop = "286" + HasWayNextIntersection = "301" + PriorityWay = "306" + PriorityWayEnd = "307" + CityBegin = "310" + CityEnd = "311" + Highway = "330" + DeadEnd = "357" + RecomendedSpeed = "380" # NOTE: Wrong Spelling, but is named like this internally! + RecomendedSpeedEnd = "381" # NOTE: Wrong Spelling, but is named like this internally! + # endregion + +class LaneChange(IntFlag, _CarlaEnum): """Class that defines the permission to turn either left, right, both or none (meaning only going straight is allowed). This information is stored for every `carla.Waypoint` according to the OpenDRIVE file. The snippet in `carla.Map.get_waypoint` shows how a waypoint can be used to learn which turns are permitted.""" # region Instance Variables @@ -1912,7 +1886,6 @@ class LaneChange(IntFlag, __CarlaEnum): """Traffic rules allow turning either right or left.""" # endregion - class LaneInvasionEvent(SensorData): """Class that defines lanes invasion for `sensor.other.lane_invasion`. It works only client-side and is dependant on OpenDRIVE to provide reliable information. The sensor creates one of this every time there is a lane invasion, which may be more than once per simulation step. Learn more about this here. @@ -1933,8 +1906,7 @@ class LaneInvasionEvent(SensorData): def __str__(self) -> str: ... # endregion - -class LaneMarking(): +class LaneMarking: """Class that gathers all the information regarding a lane marking according to OpenDRIVE 1.4 standard standard.""" # region Instance Variables @@ -1955,8 +1927,7 @@ class LaneMarking(): """Horizontal lane marking thickness.""" # endregion - -class LaneMarkingColor(int, __CarlaEnum): +class LaneMarkingColor(int, _CarlaEnum): """Class that defines the lane marking colors according to OpenDRIVE 1.4.""" # region Instance Variables @@ -1970,8 +1941,7 @@ class LaneMarkingColor(int, __CarlaEnum): Other = 5 # endregion - -class LaneMarkingType(int, __CarlaEnum): +class LaneMarkingType(int, _CarlaEnum): """Class that defines the lane marking types accepted by OpenDRIVE 1.4. The snippet in `carla.Map.get_waypoint` shows how a waypoint can be used to retrieve the information about adjacent lane markings. + Note on double types: Lane markings are defined under the OpenDRIVE standard that determines whereas a line will be considered "BrokenSolid" or "SolidBroken". For each road there is a center lane marking, defined from left to right regarding the lane's directions. The rest of the lane markings are defined in order from the center lane to the closest outside of the road. @@ -1991,11 +1961,10 @@ class LaneMarkingType(int, __CarlaEnum): NONE = 0 # endregion - -class LaneType(IntFlag, __CarlaEnum): +class LaneType(IntFlag, _CarlaEnum): """ - Class that defines the possible lane types accepted by OpenDRIVE 1.4. - This standards define the road information. The snippet in `carla.Map.get_waypoint` + Class that defines the possible lane types accepted by OpenDRIVE 1.4. + This standards define the road information. The snippet in `carla.Map.get_waypoint` makes use of a waypoint to get the current and adjacent lane types. """ @@ -2025,9 +1994,9 @@ class LaneType(IntFlag, __CarlaEnum): OnRamp = 1048576 # endregion - -class LidarDetection(): +class LidarDetection: """Data contained inside a `carla.LidarMeasurement`. Each of these represents one of the points in the cloud with its location and its associated intensity.""" + # region Instance Variables @property def point(self) -> Location: @@ -2041,12 +2010,12 @@ class LidarDetection(): def __str__(self) -> str: ... # endregion - class LidarMeasurement(SensorData): """Class that defines the LIDAR data retrieved by a `sensor.lidar.ray_cast`. This essentially simulates a rotating LIDAR using ray-casting. Learn more about this here. https://carla.readthedocs.io/en/latest/ref_sensors/#lidar-raycast-sensor """ + # region Instance Variables @property def channels(self) -> int: @@ -2084,27 +2053,23 @@ class LidarMeasurement(SensorData): def __iter__(self) -> Iterator[LidarDetection]: """Iterate over the carla.LidarDetection retrieved as data.""" - ... - def __len__(self): ... - def __setitem__(self, pos: int, detection: LidarDetection): ... + def __len__(self) -> int: ... + def __setitem__(self, pos: int, detection: LidarDetection) -> None: ... def __str__(self) -> str: ... # endregion - -class Light(): +class Light: """This class exposes the lights that exist in the scene, except for vehicle lights. The properties of a light can be queried and changed at will. Lights are automatically turned on when the simulator enters night mode (sun altitude is below zero).""" # region Instance Variables @property def color(self) -> Color: """Color of the light.""" - ... @property def id(self) -> int: """Identifier of the light.""" - ... @property def intensity(self) -> float: @@ -2113,12 +2078,10 @@ class Light(): @property def is_on(self) -> bool: """Switch of the light. It is `True` when the light is on. When the night mode starts, this is set to `True`.""" - ... @property def location(self) -> Location: """Position of the light (meters).""" - ... @property def light_group(self) -> LightGroup: @@ -2132,11 +2095,9 @@ class Light(): # region Methods def turn_off(self): """Switches off the light.""" - ... def turn_on(self): """Switches on the light.""" - ... # endregion # region Setters @@ -2146,7 +2107,6 @@ class Light(): Args: color (Color) """ - ... def set_intensity(self, intensity: float): """Changes the intensity of the light to `intensity`. @@ -2171,11 +2131,11 @@ class Light(): """ # endregion - -class LightGroup(int, __CarlaEnum): +class LightGroup(int, _CarlaEnum): """This class categorizes the lights on scene into different groups. These groups available are provided as a enum values that can be used as flags. - + Note. So far, though there is a `vehicle` group, vehicle lights are not available as `carla.Light` objects. These have to be managed using `carla.Vehicle` and `carla.VehicleLightState`.""" + + Note. So far, though there is a `vehicle` group, vehicle lights are not available as `carla.Light` objects. These have to be managed using `carla.Vehicle` and `carla.VehicleLightState`. + """ NONE = 0 """All lights.""" @@ -2184,8 +2144,7 @@ class LightGroup(int, __CarlaEnum): Building = 3 Other = 4 - -class LightManager(): +class LightManager: """This class handles the lights in the scene. Its main use is to get and set the state of groups or lists of lights in one call. An instance of this class can be retrieved by the `carla.World.get_lightmanager()`. + Note. So far, though there is a `vehicle` group, vehicle lights are not available as `carla.Light` objects. These have to be managed using `carla.Vehicle` and `carla.VehicleLightState`. @@ -2199,7 +2158,7 @@ class LightManager(): `lights (list[Light])`: List of lights to be queried.\n Returns: - `list[bool]`\n + `list[bool]` """ def turn_off(self, lights: list[Light]): @@ -2207,7 +2166,7 @@ class LightManager(): Args: - `lights (list[Light])`: List of lights to be switched off.\n + `lights (list[Light])`: List of lights to be switched off. """ def turn_on(self, lights: list[Light]): @@ -2215,7 +2174,7 @@ class LightManager(): Args: - `lights (list[Light])`: List of lights to be switched on.\n + `lights (list[Light])`: List of lights to be switched on. """ # endregion @@ -2224,7 +2183,7 @@ class LightManager(): """Returns a list containing the lights in a certain group. By default, the group is None. Args: - `light_group (LightGroup, optional)`: Group to filter the lights returned. Defaults to LightGroup.NONE.\n + `light_group (LightGroup, optional)`: Group to filter the lights returned. Defaults to LightGroup.NONE. """ def get_color(self, lights: list[Light]) -> list[Color]: @@ -2236,7 +2195,7 @@ class LightManager(): `lights (list[Light])`: List of lights to be queried.\n Returns: - `list[Color]`: _description_\n + `list[Color]`: _description_ """ def get_intensity(self, lights: list[Light]) -> list[float]: @@ -2246,7 +2205,7 @@ class LightManager(): `lights (list[Light])`: List of lights to be queried.\n Returns: - `list[float]`: (lumens)\n + `list[float]`: (lumens) """ def get_light_group(self, lights: list[Light]) -> list[LightGroup]: @@ -2255,7 +2214,7 @@ class LightManager(): + Setter: `carla.LightManager.set_light_group` Args: - `lights (list[Light])`: List of lights to be queried.\n + `lights (list[Light])`: List of lights to be queried. """ def get_light_state(self, lights: list[Light]) -> list[LightState]: @@ -2264,21 +2223,21 @@ class LightManager(): + Setter: `carla.LightManager.set_light_state` Args: - `lights (list[Light])`: List of lights to be queried.\n + `lights (list[Light])`: List of lights to be queried. """ def get_turned_off_lights(self, light_group: LightGroup) -> list[Light]: """Returns a list containing lights switched off in the scene, filtered by group. Args: - `light_group (LightGroup)`: List of lights to be queried.\n + `light_group (LightGroup)`: List of lights to be queried. """ def get_turned_on_lights(self, light_group: LightGroup) -> list[Light]: """Returns a list containing lights switched on in the scene, filtered by group. Args: - `light_group (LightGroup)`: List of lights to be queried.\n + `light_group (LightGroup)`: List of lights to be queried. """ # endregion @@ -2288,7 +2247,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be switched on/off.\n - `active (list[bool])`: List of booleans to be applied.\n + `active (list[bool])`: List of booleans to be applied. """ def set_color(self, lights: list[Light], color: Color): @@ -2296,7 +2255,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `color (Color)`: Color to be applied.\n + `color (Color)`: Color to be applied. """ def set_colors(self, lights: list[Light], colors: list[Color]): @@ -2304,7 +2263,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `colors (list[Color])`: List of colors to be applied.\n + `colors (list[Color])`: List of colors to be applied. """ def set_day_night_cycle(self, active: bool): @@ -2312,7 +2271,7 @@ class LightManager(): Args: - `active (bool)`: (De)activation of the day-night cycle.\n + `active (bool)`: (De)activation of the day-night cycle. """ def set_intensities(self, lights: list[Light], intensities: list[float]): @@ -2320,7 +2279,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `intensities (list[float])`: Intensity to be applied (lumens).\n + `intensities (list[float])`: Intensity to be applied (lumens). """ def set_intensity(self, lights: list[Light], intensity: float): @@ -2330,7 +2289,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `intensity (float)`: Intensity to be applied.\n + `intensity (float)`: Intensity to be applied. """ def set_light_group(self, lights: list[Light], light_group: LightGroup): @@ -2340,7 +2299,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `light_group (LightGroup)`: Group to be applied.\n + `light_group (LightGroup)`: Group to be applied. """ def set_light_groups(self, lights: list[Light], light_groups: list[LightGroup]): @@ -2348,7 +2307,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `light_groups (list[LightGroup])`: List of groups to be applied.\n + `light_groups (list[LightGroup])`: List of groups to be applied. """ def set_light_state(self, lights: list[Light], light_state: LightState): @@ -2358,7 +2317,7 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `light_state (LightState)`: State of the attributes to be applied.\n + `light_state (LightState)`: State of the attributes to be applied. """ def set_light_states(self, lights: list[Light], light_states: list[LightState]): @@ -2366,14 +2325,12 @@ class LightManager(): Args: `lights (list[Light])`: List of lights to be changed.\n - `light_states (list[LightState])`: List of state of the attributes to be applied.\n + `light_states (list[LightState])`: List of state of the attributes to be applied. """ # endregion - -class LightState(): - """This class represents all the light variables except the identifier and the location, which are should to be static. Using this class allows to manage all the parametrization of the light in one call. - """ +class LightState: + """This class represents all the light variables except the identifier and the location, which are should to be static. Using this class allows to manage all the parametrization of the light in one call.""" # region Instance Variables @property @@ -2394,48 +2351,55 @@ class LightState(): # endregion # region Methods - def __init__(self, intensity=0.0, color=Color, group=LightGroup.NONE, active=False): + def __init__(self, intensity: float = 0.0, color: Color = Color(0, 0, 0, 0), group: LightGroup = LightGroup.NONE, active: bool = False) -> None: """This class represents all the light variables except the identifier and the location, which are should to be static. Using this class allows to manage all the parametrization of the light in one call. Args: `intensity (float, optional)`: Intensity of a light (lumens). Defaults to 0.0.\n - `color (_type_, optional)`: Color of a light. Defaults to Color.\n - `group (_type_, optional)`: Group a light belongs to. Defaults to LightGroup.NONE.\n - `active (bool, optional)`: Switch of a light. It is True when the light is on. Defaults to False.\n + `color (Color, optional)`: Color of a light. Defaults to Color.\n + `group (LightGroup, optional)`: Group a light belongs to. Defaults to LightGroup.NONE.\n + `active (bool, optional)`: Switch of a light. It is True when the light is on. Defaults to False. """ # endregion - class Location(Vector3D): """Represents a spot in the world.""" + # region Instance Variables @property def x(self) -> float: """Distance from origin to spot on X axis (meter).""" + @x.setter + def x(self, value: float) -> None: ... + @property def y(self) -> float: """Distance from origin to spot on Y axis (meter).""" + @y.setter + def y(self, value: float) -> None: ... + @property def z(self) -> float: """Distance from origin to spot on Z axis. (meter)""" + @z.setter + def z(self, value: float) -> None: ... # endregion # region Methods @overload - def __init__(self, rhs: Vector3D): ... + def __init__(self, rhs: Vector3D) -> None: ... @overload - def __init__(self, x: float=0.0, y: float=0.0, z: float=0.0): ... + def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0) -> None: ... - def __init__(self, x: float=0.0, y: float=0.0, z: float=0.0): + def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0): """Represents a spot in the world. Args: `x (float, optional)`: Distance from origin to spot on X axis (meter). Defaults to 0.0.\n `y (float, optional)`: Distance from origin to spot on Y axis (meter). Defaults to 0.0.\n - `z (float, optional)`: Distance from origin to spot on Z axis (meter). Defaults to 0.0.\n + `z (float, optional)`: Distance from origin to spot on Z axis (meter). Defaults to 0.0. """ - ... def distance(self, location: Location) -> float: """Returns Euclidean distance from this location to another one. @@ -2444,7 +2408,7 @@ class Location(Vector3D): `location (Location)`: The other point to compute the distance with.\n Returns: - `float`: (meters)\n + `float`: (meters) """ # endregion @@ -2452,22 +2416,21 @@ class Location(Vector3D): def __abs__(self) -> Location: """Returns a Location with the absolute value of the components x, y and z.""" - def __eq__(self, __value: Location) -> bool: + def __eq__(self, other: Location, /) -> bool: """Returns `True` if both locations are the same point in space.""" - ... - def __ne__(self, __value: object) -> bool: + def __ne__(self, other: object, /) -> bool: """Returns `True` if both locations are different points in space.""" - ... def __str__(self) -> str: """Parses the axis' values to string.""" - ... - # endregion - pass + def __isub__(self, rhs: Vector3D) -> Self: ... + def __iadd__(self, rhs: Vector3D) -> Self: ... + + # endregion -class Map(): +class Map: """Class containing the road information and waypoint managing. Data is retrieved from an OpenDRIVE file that describes the road. A query system is defined which works hand in hand with `carla.Waypoint` to translate geometrical information from the .xodr to natural world points. CARLA is currently working with OpenDRIVE 1.4 standard.""" # region Instance Variables @@ -2477,20 +2440,19 @@ class Map(): # endregion # region Methods - def __init__(self, name: str, xodr_content: str): + def __init__(self, name: str, xodr_content: str) -> None: """Constructor for this class. Though a map is automatically generated when initializing the world, using this method in no-rendering mode facilitates working with an .xodr without any CARLA server running. Args: `name (str)`: Name of the current map.\n - `xodr_content (str)`: xodr content in string format.\n + `xodr_content (str)`: xodr content in string format. """ - ... def cook_in_memory_map(self, path: str): """Generates a binary file from the CARLA map containing information used by the Traffic Manager. This method is only used during the import process for maps. Args: - `path (str)`: Path to the intended location of the stored binary map file.\n + `path (str)`: Path to the intended location of the stored binary map file. """ def generate_waypoints(self, distance: float) -> list[Waypoint]: @@ -2500,22 +2462,21 @@ class Map(): `distance (float)`: Approximate distance between waypoints (meters).\n Returns: - `list[Waypoint]`\n + `list[Waypoint]` """ def save_to_disk(self, path: str): """Saves the .xodr OpenDRIVE file of the current map to disk. Args: - `path (str)`: Path where the file will be saved.\n + `path (str)`: Path where the file will be saved. """ - ... def to_opendrive(self) -> str: """Returns the .xodr OpenDRIVe file of the current map as string. Returns: - `str`\n + `str` """ def transform_to_geolocation(self, location: Location) -> GeoLocation: @@ -2526,66 +2487,58 @@ class Map(): `location (Location)`\n Returns: - `GeoLocation`\n + `GeoLocation` """ - ... # endregion # region Getters def get_all_landmarks(self) -> list[Landmark]: """Returns all the landmarks in the map. Landmarks retrieved using this method have a `null` waypoint.""" - ... def get_all_landmarks_from_id(self, opendrive_id: str) -> list[Landmark]: """Returns the landmarks with a certain OpenDRIVE ID. Landmarks retrieved using this method have a `null` waypoint. Args: - `opendrive_id (str)`: The OpenDRIVE ID of the landmarks.\n + `opendrive_id (str)`: The OpenDRIVE ID of the landmarks. """ - ... - def get_all_landmarks_of_type(self, type: Union[str, LandmarkType]) -> list[Landmark]: + def get_all_landmarks_of_type(self, type: str | LandmarkType) -> list[Landmark]: """Returns the landmarks of a specific type. Landmarks retrieved using this method have a null waypoint. Args: - `type (str)`: The type of the landmarks.\n + `type (str)`: The type of the landmarks. """ - ... def get_crosswalks(self) -> list[Location]: - """Returns a list of locations with all crosswalk zones in the form of closed polygons. The first point is repeated, symbolizing where the polygon begins and ends. - """ - ... + """Returns a list of locations with all crosswalk zones in the form of closed polygons. The first point is repeated, symbolizing where the polygon begins and ends.""" def get_landmark_group(self, landmark: Landmark) -> list[Landmark]: """Returns the landmarks in the same group as the specified landmark (including itself). Returns an empty list if the landmark does not belong to any group. Args: - `landmark (Landmark)`: A landmark that belongs to the group.\n + `landmark (Landmark)`: A landmark that belongs to the group. """ - ... def get_spawn_points(self) -> list[Transform]: - """Returns a list of recommendations made by the creators of the map to be used as spawning points for the vehicles. The list includes carla.Transform objects with certain location and orientation. Said locations are slightly on-air in order to avoid Z-collisions, so vehicles fall for a bit before starting their way. - """ - ... + """Returns a list of recommendations made by the creators of the map to be used as spawning points for the vehicles. The list includes carla.Transform objects with certain location and orientation. Said locations are slightly on-air in order to avoid Z-collisions, so vehicles fall for a bit before starting their way.""" def get_topology(self) -> list[tuple[Waypoint, Waypoint]]: - """Returns a list of tuples describing a minimal graph of the topology of the OpenDRIVE file. The tuples contain pairs of waypoints located either at the point a road begins or ends. The first one is the origin and the second one represents another road end that can be reached. This graph can be loaded into NetworkX to work with. + """Returns a list of tuples describing a minimal graph of the topology of the OpenDRIVE file. The tuples contain pairs of waypoints located either at the point a road begins or ends. The first one is the origin and the second one represents another road end that can be reached. This graph can be loaded into NetworkX to work with. Output could look like this: `[(w0, w1), (w0, w2), (w1, w3), (w2, w3), (w0, w4)]`. """ - ... + + # TODO: Correct overloads, decide if -> None should be disregarded @overload - def get_waypoint(self, location: Location, project_to_road: Literal[True]=True, lane_type: Literal[LaneType.Driving, LaneType.Any]=LaneType.Driving) -> Waypoint: + def get_waypoint(self, location: Location, project_to_road: Literal[True] = True, lane_type: Literal[LaneType.Driving, LaneType.Any] = LaneType.Driving) -> Waypoint: ... @overload - def get_waypoint(self, location: Location, project_to_road :bool | None=True, lane_type: LaneType=LaneType.Driving) -> Waypoint | None: + def get_waypoint(self, location: Location, project_to_road: bool | None = True, lane_type: LaneType = LaneType.Driving) -> Waypoint | None: ... - - def get_waypoint(self, location: Location, project_to_road: bool | None=True, lane_type: LaneType=LaneType.Driving) -> Waypoint | None: + + def get_waypoint(self, location: Location, project_to_road: bool | None = True, lane_type: LaneType = LaneType.Driving) -> Waypoint | None: """Returns a waypoint that can be located in an exact location or translated to the center of the nearest lane. Said lane type can be defined using flags such as `LaneType.Driving & LaneType.Shoulder`. The method will return `None` if the waypoint is not found, which may happen only when trying to retrieve a waypoint for an exact location. That eases checking if a point is inside a certain road, as otherwise, it will return the corresponding waypoint. @@ -2593,9 +2546,8 @@ class Map(): Args: `location (Location)`: Location used as reference for the carla.Waypoint (meters).\n `project_to_road (bool, optional)`: If `True`, the waypoint will be at the center of the closest lane. If `False`, the waypoint will be exactly in location. `None` means said location does not belong to a road. Defaults to True.\n - `lane_type (_type_, optional)`: Limits the search for nearest lane to one or various lane types that can be flagged. Defaults to LaneType.Driving.\n + `lane_type (_type_, optional)`: Limits the search for nearest lane to one or various lane types that can be flagged. Defaults to LaneType.Driving. """ - ... def get_waypoint_xodr(self, road_id: int, lane_id: int, s: float) -> Waypoint | None: """Returns a waypoint if all the parameters passed are correct. Otherwise, returns `None`. @@ -2603,16 +2555,16 @@ class Map(): Args: `road_id (int)`: ID of the road to get the waypoint.\n `lane_id (int)`: ID of the lane to get the waypoint.\n - `s (float)`: Specify the length from the road start (meters).\n + `s (float)`: Specify the length from the road start (meters). """ - ... # endregion - -class MapLayer(Flag, __CarlaEnum): +class MapLayer(Flag, _CarlaEnum): """Class that represents each manageable layer of the map. Can be used as flags. - + WARNING: Only "Opt" maps are able to work with map layers.""" + + WARNING: Only "Opt" maps are able to work with map layers. + """ + NONE = 0 Buildings = 1 Decals = 2 @@ -2626,8 +2578,7 @@ class MapLayer(Flag, __CarlaEnum): All = 65535 """All layers selected.""" - -class MaterialParameter(int, __CarlaEnum): +class MaterialParameter(int, _CarlaEnum): """Class that represents material parameters. Not all objects in the scene contain all parameters.""" # region Instance Variables @@ -2641,102 +2592,88 @@ class MaterialParameter(int, __CarlaEnum): """Emissive texture. Present in a few objects.""" # endregion - class ObstacleDetectionEvent(SensorData): """Class that defines the obstacle data for `sensor.other.obstacle`. Learn more about this here. https://carla.readthedocs.io/en/latest/ref_sensors/#obstacle-detector """ + # region Instance Variables @property def actor(self) -> Actor: """The actor the sensor is attached to.""" - ... @property def other_actor(self) -> Actor: """The actor or object considered to be an obstacle.""" - ... @property def distance(self) -> float: """Distance between actor and other (meters).""" - ... # endregion # region Dunder methods def __str__(self) -> str: ... # endregion - -class OpendriveGenerationParameters(): +class OpendriveGenerationParameters: """This class defines the parameters used when generating a world using an OpenDRIVE file.""" + # region Instance Variables @property def vertex_distance(self) -> float: """Distance between vertices of the mesh generated. Default is 2.0.""" - ... @property def max_road_length(self) -> float: """Max road length for a single mesh portion. The mesh of the map is divided into portions, in order to avoid propagating issues. Default is 50.0.""" - ... @property def wall_height(self) -> float: """Height of walls created on the boundaries of the road. These prevent vehicles from falling off the road. Default is 1.0.""" - ... @property def additional_width(self) -> float: """Additional with applied junction lanes. Complex situations tend to occur at junctions, and a little increase can prevent vehicles from falling off the road. Default is 0.6.""" - ... @property def smooth_junctions(self) -> bool: """If `True`, the mesh at junctions will be smoothed to prevent issues where roads blocked other roads. Default is `True`.""" - ... @property def enable_mesh_visibility(self) -> bool: """If `True`, the road mesh will be rendered. Setting this to False should reduce the rendering overhead. Default is True.""" - ... @property def enable_pedestrian_navigation(self) -> bool: """If `True`, Pedestrian navigation will be enabled using Recast tool. For very large maps it is recommended to disable this option. Default is `True`.""" - ... # endregion - - # region Methods - def __init__(self, vertex_distance: float =2.0, - max_road_length:float = 50.0, - wall_height:float = 1.0, - additional_width: float=0.6, - smooth_junctions: bool =True, - enable_mesh_visibility: bool=True, - enable_pedestrian_navigation: bool=True): - """Constructor method""" - ... + # region Methods + def __init__(self, vertex_distance: float = 2.0, + max_road_length: float = 50.0, + wall_height: float = 1.0, + additional_width: float = 0.6, + smooth_junctions: bool = True, + enable_mesh_visibility: bool = True, + enable_pedestrian_navigation: bool = True) -> None: + """Constructor method""" class OpticalFlowImage(SensorData): """Class that defines an optical flow image of 2-Dimension float (32-bit) vectors representing the optical flow detected in the field of view. The components of the vector represents the displacement of an object in the image plane. Each component outputs values in the normalized range [-2,2] which scales to [-2 size, 2 size] with size being the total resolution in the corresponding component.""" + # region Instance Variables @property def fov(self) -> float: """Horizontal field of view of the image. (degrees)""" - ... @property def height(self) -> int: """Image height in pixels.""" - ... @property def width(self) -> int: """Image width in pixels.""" - ... @property def raw_data(self) -> bytes: @@ -2746,7 +2683,6 @@ class OpticalFlowImage(SensorData): # region Getters def get_color_coded_flow(self) -> Image: """Visualization helper. Converts the optical flow image to an RGB image.""" - ... # endregion # region Dunder Methods @@ -2756,19 +2692,17 @@ class OpticalFlowImage(SensorData): """Iterate over the `carla.OpticalFlowPixel `that form the image.""" def __len__(self) -> int: ... - def __setitem__(self, pos: int, color: Color): ... + def __setitem__(self, pos: int, color: Color) -> None: ... def __str__(self) -> str: ... # endregion - -class OpticalFlowPixel(): +class OpticalFlowPixel: """Class that defines a 2 dimensional vector representing an optical flow pixel.""" # region Instance Variables @property def x(self) -> float: """Optical flow in the x component.""" - ... @property def y(self) -> float: @@ -2776,28 +2710,27 @@ class OpticalFlowPixel(): # endregion # region Methods - def __init__(self, x=.0, y=.0): + def __init__(self, x: float = .0, y: float = .0) -> None: """Initializes the Optical Flow Pixel. Zero by default. Args: `x (float, optional)`: Optical flow in the x component. Defaults to .0.\n - `y (float, optional)`: Optical flow in the y component. Defaults to .0.\n + `y (float, optional)`: Optical flow in the y component. Defaults to .0. """ - ... # endregion # region Dunder Methods - def __eq__(self, __value: OpticalFlowPixel) -> bool: ... - def __ne__(self, __value: OpticalFlowPixel) -> bool: ... + def __eq__(self, other: OpticalFlowPixel, /) -> bool: ... + def __ne__(self, other: OpticalFlowPixel, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class Osm2Odr(): +class Osm2Odr: """Class that converts an OpenStreetMap map to OpenDRIVE format, so that it can be loaded in CARLA. Find out more about this feature in the docs. https://carla.readthedocs.io/en/latest/tuto_G_openstreetmap/ """ + # region Methods @staticmethod def convert(osm_file: str, settings: Osm2OdrSettings) -> str: @@ -2808,12 +2741,11 @@ class Osm2Odr(): `settings (Osm2OdrSettings)`: Parameterization for the conversion.\n Returns: - `str`\n + `str` """ # endregion - -class Osm2OdrSettings(): +class Osm2OdrSettings: """Helper class that contains the parameterization that will be used by carla.Osm2Odr to convert an OpenStreetMap map to OpenDRIVE format. Find out more about this feature in the docs. https://carla.readthedocs.io/en/latest/tuto_G_openstreetmap/ @@ -2822,44 +2754,35 @@ class Osm2OdrSettings(): # region Instance Variables @property def use_offsets(self) -> bool: - """Enables the use of offset for the conversion. The offset will move the origin position of the map. Default value is False. - """ - ... + """Enables the use of offset for the conversion. The offset will move the origin position of the map. Default value is False.""" @property def offset_x(self) -> float: """Offset in the X axis. Default value is 0.0 (meters).""" - ... @property def offset_y(self) -> float: """Offset in the Y axis. Default value is 0.0 (meters).""" - ... @property def default_lane_width(self) -> float: """Width of the lanes described in the resulting XODR map. Default value is 4.0 (meter).""" - ... @property def elevation_layer_height(self) -> float: """Defines the height separating two different OpenStreetMap layers. Default value is 0.0.""" - ... @property def center_map(self) -> bool: """When this option is enabled, the geometry of the map will be displaced so that the origin of coordinates matches the center of the bounding box of the entire road map.""" - ... @property def proj_string(self) -> str: """Defines the `proj4` string that will be used to compute the projection from geocoordinates to cartesian coordinates. This string will be written in the resulting OpenDRIVE unless the options `use_offsets` or `center_map` are enabled as these options override some of the definitions in the string.""" - ... @property def generate_traffic_lights(self) -> bool: """Indicates wether to generate traffic light data in the OpenDRIVE. Road types defined by `set_traffic_light_excluded_way_types(way_types)` will not generate traffic lights.""" - ... @property def all_junctions_with_traffic_lights(self) -> bool: @@ -2875,7 +2798,7 @@ class Osm2OdrSettings(): https://wiki.openstreetmap.org/wiki/Main_Page Args: - `way_types (list[str])`: The list of road types.\n + `way_types (list[str])`: The list of road types. """ def set_traffic_light_excluded_way_types(self, way_types: list[str]): @@ -2883,41 +2806,35 @@ class Osm2OdrSettings(): `motorway_link`, `primary_link`, `secondary_link`, `tertiary_link` Args: - `way_types (list[str])`: The list of road types.\n + `way_types (list[str])`: The list of road types. """ # endregion - -class RadarDetection(): +class RadarDetection: """Data contained inside a `carla.RadarMeasurement`. Each of these represents one of the points in the cloud that a `sensor.other.radar` registers and contains the distance, angle and velocity in relation to the radar.""" # region Instance Variables @property def altitude(self) -> float: """Altitude angle of the detection (radians).""" - ... @property def azimuth(self) -> float: """Azimuth angle of the detection (radians).""" - ... @property def depth(self) -> float: """Distance from the sensor to the detection position (meters).""" - ... @property def velocity(self) -> float: """The velocity of the detected object towards the sensor (m/s).""" - ... # endregion # region Dunder Methods def __str__(self) -> str: ... # endregion - class RadarMeasurement(SensorData): """Class that defines and gathers the measures registered by a `sensor.other.radar`, representing a wall of points in front of the sensor with a distance, angle and velocity in relation to it. The data consists of a `carla.RadarDetection` array. Learn more about this here. @@ -2927,8 +2844,7 @@ class RadarMeasurement(SensorData): # region Instance Variables @property def raw_data(self) -> bytes: - """The complete information of the `carla.RadarDetection` the radar has registered. - """ + """The complete information of the `carla.RadarDetection` the radar has registered.""" # endregion # region Getters @@ -2943,12 +2859,11 @@ class RadarMeasurement(SensorData): """Iterate over the `carla.RadarDetection` retrieved as data.""" def __len__(self) -> int: ... - def __setitem__(self, pos: int, detection: RadarDetection): ... + def __setitem__(self, pos: int, detection: RadarDetection) -> None: ... def __str__(self) -> str: ... # endregion - -class Rotation(): +class Rotation: """Class that represents a 3D rotation and therefore, an orientation in space. CARLA uses the Unreal Engine coordinates system. This is a Z-up left-handed system. The constructor method follows a specific order of declaration: `(pitch, yaw, roll)`, which corresponds to `(Y-rotation,Z-rotation,X-rotation)`. @@ -2958,58 +2873,58 @@ class Rotation(): @property def pitch(self) -> float: """Y-axis rotation angle (degrees).""" - ... + @pitch.setter + def pitch(self, value: float) -> None: + """Set the Y-axis rotation angle (degrees).""" @property def yaw(self) -> float: """Z-axis rotation angle (degrees).""" - ... + @yaw.setter + def yaw(self, value: float) -> None: + """Set the Z-axis rotation angle (degrees).""" @property def roll(self) -> float: """X-axis rotation angle (degrees).""" - ... + @roll.setter + def roll(self, value: float) -> None: + """Set the X-axis rotation angle (degrees).""" # endregion # region Methods - def __init__(self, pitch=.0, yaw=.0, roll=.0): + def __init__(self, pitch: float = .0, yaw: float = .0, roll: float = .0) -> None: """+ Warning: The declaration order is different in CARLA (pitch,yaw,roll), and in the Unreal Engine Editor (roll,pitch,yaw). When working in a build from source, don't mix up the axes' rotations. Args: `pitch (float, optional)`: Y-axis rotation angle (degrees). Defaults to .0.\n `yaw (float, optional)`: Z-axis rotation angle (degrees). Defaults to .0.\n - `roll (float, optional)`: X-axis rotation angle (degrees). Defaults to .0.\n + `roll (float, optional)`: X-axis rotation angle (degrees). Defaults to .0. """ - ... # endregion # region Getters def get_forward_vector(self) -> Vector3D: """Computes the vector pointing forward according to the rotation of the object.""" - ... def get_right_vector(self) -> Vector3D: """Computes the vector pointing to the right according to the rotation of the object.""" - ... def get_up_vector(self) -> Vector3D: """Computes the vector pointing upwards according to the rotation of the object.""" - ... # endregion # region Dunder Methods - def __eq__(self, __value: Rotation) -> bool: + def __eq__(self, other: Rotation, /) -> bool: """Returns `True` if both rotations represent the same orientation for every axis.""" - ... - def __ne__(self, __value: Rotation) -> bool: + def __ne__(self, other: Rotation, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class SemanticLidarDetection(): +class SemanticLidarDetection: """Data contained inside a `carla.SemanticLidarMeasurement`. Each of these represents one of the points in the cloud with its location, the cosine of the incident angle, index of the object hit, and its semantic tag.""" # region Instance Variables @@ -3031,7 +2946,6 @@ class SemanticLidarDetection(): def __str__(self) -> str: ... # endregion - class SemanticLidarMeasurement(SensorData): """Class that defines the semantic LIDAR data retrieved by a `sensor.lidar.ray_cast_semantic`. This essentially simulates a rotating LIDAR using ray-casting. Learn more about this here. @@ -3055,7 +2969,7 @@ class SemanticLidarMeasurement(SensorData): """Saves the point cloud to disk as a `.ply` file describing data from 3D scanners. The files generated are ready to be used within `MeshLab`, an open-source system for processing said files. Just take into account that axis may differ from Unreal Engine and so, need to be reallocated. Args: - `path (str)`\n + `path (str)` """ # endregion @@ -3064,7 +2978,7 @@ class SemanticLidarMeasurement(SensorData): """Retrieves the number of points sorted by channel that are generated by this measure. Sorting by channel allows to identify the original channel for every point. Args: - `channel (int)`\n + `channel (int)` """ # endregion @@ -3073,14 +2987,12 @@ class SemanticLidarMeasurement(SensorData): def __iter__(self) -> Iterator[SemanticLidarDetection]: """Iterate over the `carla.SemanticLidarDetection` retrieved as data.""" - ... - def __len__(self): ... - def __setitem__(self, pos: int, detection: SemanticLidarDetection): ... + def __len__(self) -> int: ... + def __setitem__(self, pos: int, detection: SemanticLidarDetection) -> None: ... def __str__(self) -> str: ... # endregion - class Sensor(Actor): """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). @@ -3088,48 +3000,48 @@ class Sensor(Actor): https://carla.readthedocs.io/en/latest/ref_sensors/ - Receive data on every tick. - - Depth camera. - - Gnss sensor. - - IMU sensor. - - Lidar raycast. - - SemanticLidar raycast. - - Radar. - - RGB camera. - - RSS sensor. + Receive data on every tick. + - Depth camera. + - Gnss sensor. + - IMU sensor. + - Lidar raycast. + - SemanticLidar raycast. + - Radar. + - RGB camera. + - RSS sensor. - Semantic Segmentation camera. Only receive data when triggered. - - Collision detector. + - Collision detector. - Lane invasion detector. - - Obstacle detector. + - Obstacle detector. """ # region Instance Variables - #@property - #def is_listening() -> bool: + # @property + # def is_listening() -> bool: # """When `True` the sensor will be waiting for data.""" # endregion # region Methods - + def is_listening(self) -> bool: """Returns whether the sensor is in a listening state.""" - + def is_listening_gbuffer(self, gbuffer_id: GBufferTextureID) -> bool: """Returns whether the sensor is in a listening state for a specific GBuffer texture. Args: - `gbuffer_id (GBufferTextureID)`: The ID of the target Unreal Engine GBuffer texture.\n + `gbuffer_id (GBufferTextureID)`: The ID of the target Unreal Engine GBuffer texture. """ def listen(self, callback: Callable[[__SensorData], Any]) -> None: """ - The function the sensor will be calling to every time a new measurement is received. + 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. Args: - `callback (Callable[[SensorData], Any])`: The called function with one argument containing the sensor data.\n + `callback (Callable[[SensorData], Any])`: The called function with one argument containing the sensor data. """ def listen_to_gbuffer(self, gbuffer_id: GBufferTextureID, callback: Callable[[__SensorData], Any]) -> None: @@ -3139,7 +3051,7 @@ class Sensor(Actor): Args: `gbuffer_id (GBufferTextureID)`: The ID of the target Unreal Engine GBuffer texture.\n - `callback (Callable[[SensorData], Any])`: The called function with one argument containing the received GBuffer texture.\n + `callback (Callable[[SensorData], Any])`: The called function with one argument containing the received GBuffer texture. """ def stop(self): @@ -3149,7 +3061,7 @@ class Sensor(Actor): """Commands the sensor to stop listening for the specified GBuffer texture. Args: - `gbuffer_id (GBufferTextureID)`: The ID of the Unreal Engine GBuffer texture.\n + `gbuffer_id (GBufferTextureID)`: The ID of the Unreal Engine GBuffer texture. """ # endregion @@ -3157,14 +3069,13 @@ class Sensor(Actor): def __str__(self) -> str: ... # endregion - -class SensorData(): +class SensorData: """ - Base class for all the objects containing data generated by a `carla.Sensor`. + Base class for all the objects containing data generated by a `carla.Sensor`. This objects should be the argument of the function said sensor is listening to, - in order to work with them. Each of these sensors needs for a specific type of + in order to work with them. Each of these sensors needs for a specific type of sensor data. Hereunder is a list of the sensors and their corresponding data. - + - Cameras (RGB, depth and semantic segmentation): `carla.Image`. - Collision detector: `carla.CollisionEvent`. - GNSS sensor: `carla.GnssMeasurement`. @@ -3176,28 +3087,27 @@ class SensorData(): - RSS sensor: `carla.RssResponse`. - Semantic LIDAR sensor: `carla.SemanticLidarMeasurement`. """ + # region Instance Variables @property def frame(self) -> int: """Frame count when the data was generated.""" - ... @property def timestamp(self) -> float: """Simulation-time(seconds) when the data was generated.""" - ... @property def transform(self) -> Transform: """Sensor's transform when the data was generated.""" # endregion - -class TextureColor(): +class TextureColor: """ - Class representing a texture object to be uploaded to the server. + Class representing a texture object to be uploaded to the server. Pixel format is RGBA, uint8 per channel. """ + # region Instance Variables @property def width(self) -> int: @@ -3208,14 +3118,13 @@ class TextureColor(): # endregion # region Methods - def __init__(self, width: int, height: int): + def __init__(self, width: int, height: int) -> None: """Initializes a the texture with a `(width, height)` size. Args: `width (int)`: X-coordinate size of the texture.\n - `height (int)`: Y-coordinate size of the texture.\n + `height (int)`: Y-coordinate size of the texture. """ - ... # endregion # region Getters @@ -3232,8 +3141,7 @@ class TextureColor(): """Resizes the texture to te specified dimensions.""" # endregion - -class TextureFloatColor(): +class TextureFloatColor: """ Class representing a texture object to be uploaded to the server. Pixel format is RGBA, float per channel. @@ -3262,8 +3170,7 @@ class TextureFloatColor(): """Resizes the texture to te specified dimensions.""" # endregion - -class Timestamp(): +class Timestamp: """ Class that contains time information for simulated data. This information is automatically retrieved as part of the `carla.WorldSnapshot` the client gets on every frame, but might also @@ -3280,27 +3187,27 @@ class Timestamp(): @property def delta_seconds(self) -> float: """Simulated seconds elapsed since the previous frame (seconds).""" - + @property def platform_timestamp(self) -> float: """Time register of the frame at which this measurement was taken given by the OS in seconds (seconds).""" # endregion # region Methods - def __init__(self, frame: int, elapsed_seconds: float, delta_seconds: float, platform_timestamp: float): ... + def __init__(self, frame: int, elapsed_seconds: float, delta_seconds: float, platform_timestamp: float) -> None: ... # endregion # region Dunder Methods - def __eq__(self, __value: Timestamp) -> bool: ... - def __ne__(self, __value: Timestamp) -> bool: ... + def __eq__(self, other: Timestamp, /) -> bool: ... + def __ne__(self, other: Timestamp, /) -> bool: ... def __str__(self) -> str: ... # endregion - class TrafficLight(TrafficSign): - """ traffic light actor, considered a specific type of traffic sign. As traffic lights will mostly appear at junctions, they belong to a group which contains the different traffic lights in it. Inside the group, traffic lights are differenciated by their pole index. + """traffic light actor, considered a specific type of traffic sign. As traffic lights will mostly appear at junctions, they belong to a group which contains the different traffic lights in it. Inside the group, traffic lights are differenciated by their pole index. - Within a group the state of traffic lights is changed in a cyclic pattern: one index is chosen and it spends a few seconds in green, yellow and eventually red. The rest of the traffic lights remain frozen in red this whole time, meaning that there is a gap in the last seconds of the cycle where all the traffic lights are red. However, the state of a traffic light can be changed manually.""" + Within a group the state of traffic lights is changed in a cyclic pattern: one index is chosen and it spends a few seconds in green, yellow and eventually red. The rest of the traffic lights remain frozen in red this whole time, meaning that there is a gap in the last seconds of the cycle where all the traffic lights are red. However, the state of a traffic light can be changed manually. + """ # region Instance Variables @property @@ -3414,17 +3321,16 @@ class TrafficLight(TrafficSign): def __str__(self) -> str: ... # endregion - -class TrafficLightState(int, __CarlaEnum): +class TrafficLightState(int, _CarlaEnum): """All possible states for traffic lights. These can either change at a specific time step or be changed manually. The snippet in `carla.TrafficLight.set_state` changes the state of a traffic light on the fly.""" + Red = 0 Yellow = 1 Green = 2 Off = 3 Unknown = 4 - -class TrafficManager(): +class TrafficManager: """The traffic manager is a module built on top of the CARLA API in C++. It handles any group of vehicles set to autopilot mode to populate the simulation with realistic urban traffic conditions and give the chance to user to customize some behaviours. The architecture of the traffic manager is divided in five different goal-oriented stages and a PID controller where the information flows until eventually, a `carla.VehicleControl` is applied to every vehicle registered in a traffic manager. In order to learn more, visit the documentation regarding this module. https://carla.readthedocs.io/en/latest/adv_traffic_manager/ @@ -3618,21 +3524,21 @@ class TrafficManager(): distance (float): Meters between vehicles (meters). """ - def set_hybrid_physics_mode(self, enabled=False): + def set_hybrid_physics_mode(self, enabled: bool = False): """Enables or disables the hybrid physics mode. In this mode, vehicle's farther than a certain radius from the ego vehicle will have their physics disabled. Computation cost will be reduced by not calculating vehicle dynamics. Vehicles will be teleported. Args: enabled (bool, optional): If `True`, enables the hybrid physics. Defaults to False. """ - def set_hybrid_physics_radius(self, r=50.0): + def set_hybrid_physics_radius(self, r: float = 50.0): """With hybrid physics on, changes the radius of the area of influence where physics are enabled. Args: r (float, optional): New radius where physics are enabled (meters). Defaults to 50.0. """ - def set_osm_mode(self, mode_switch=True): + def set_osm_mode(self, mode_switch: bool = True): """Enables or disables the OSM mode. This mode allows the user to run TM in a map created with the OSM feature. These maps allow having dead-end streets. Normally, if vehicles cannot find the next waypoint, TM crashes. If OSM mode is enabled, it will show a warning, and destroy vehicles when necessary. Args: @@ -3654,7 +3560,7 @@ class TrafficManager(): value (int): Seed value for the random number generation of the Traffic Manager. """ - def set_respawn_dormant_vehicles(self, mode_switch=False): + def set_respawn_dormant_vehicles(self, mode_switch: bool = False): """If `True`, vehicles in large maps will respawn near the hero vehicle when they become dormant. Otherwise, they will stay dormant until they are within `actor_active_distance` of the hero vehicle again. @@ -3673,7 +3579,7 @@ class TrafficManager(): path (list[str]): The list of route instructions (string) for the vehicle to follow. """ - def set_synchronous_mode(self, mode_switch=True): + def set_synchronous_mode(self, mode_switch: bool = True): """Sets the Traffic Manager to synchronous mode. In a multiclient situation, only the TM-Server can tick. Similarly, in a multiTM situation, only one TM-Server must tick. Use this method in the client that does the world tick, and right after setting the world to synchronous mode, to set which TM will be the master while in sync. + Warning: If the server is set to synchronous mode, the TM must be set to synchronous mode too in the same client that does the tick. @@ -3683,10 +3589,8 @@ class TrafficManager(): """ # endregion - class TrafficSign(Actor): - """Traffic signs appearing in the simulation except for traffic lights. These have their own class inherited from this in `carla.TrafficLight`. Right now, speed signs, stops and yields are mainly the ones implemented, but many others are borne in mind. - """ + """Traffic signs appearing in the simulation except for traffic lights. These have their own class inherited from this in `carla.TrafficLight`. Right now, speed signs, stops and yields are mainly the ones implemented, but many others are borne in mind.""" # region Instance Variables @property @@ -3694,62 +3598,60 @@ class TrafficSign(Actor): """A carla.BoundingBox situated near a traffic sign where the carla.Actor who is inside can know about it.""" # endregion - -class Transform(): - """Class that defines a transformation, a combination of location and rotation, without scaling. - """ +class Transform: + """Class that defines a transformation, a combination of location and rotation, without scaling.""" # region Instance Variables @property def location(self) -> Location: """Describes a point in the coordinate system.""" @location.setter - def location(self, value: Location | Vector3D): + def location(self, value: Location | Vector3D) -> None: ... @property def rotation(self) -> Rotation: """Describes a rotation for an object according to Unreal Engine's axis system (degrees (pitch, yaw, roll)).""" @rotation.setter - def rotation(self, value: Rotation | Vector3D): + def rotation(self, value: Rotation | Vector3D) -> None: ... # endregion - # region Methods - def __init__(self, location: Location = Location(0,0,0), rotation: Rotation = Rotation(0,0,0)): ... + # region Methods + def __init__(self, location: Location = Location(0, 0, 0), rotation: Rotation = Rotation(0, 0, 0)) -> None: ... def transform(self, in_point: Vector3D) -> Vector3D: """ - Translates a 3D point from local to global coordinates using the current + Translates a 3D point from local to global coordinates using the current transformation as frame of reference. Args: - in_point (Location): Location in the space to which the transformation will be applied. - + in_point (Location): Location in the space to which the transformation will be applied. + Note: This operation transforms `in_point` in place. """ - + def inverse_transform(self, in_point: Vector3D) -> Vector3D: """ - Applies the inverse of `transform` by translating a 3D point from global to local + Applies the inverse of `transform` by translating a 3D point from global to local coordinates using the current transformation as frame of reference. - + Args: in_point (Vector3D): Vector to which the transformation will be applied. - + Note: This operation transforms `in_point` in place. """ def transform_vector(self, in_point: Vector3D) -> Vector3D: """ - Rotates a vector using the current transformation as frame of reference, + Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity. Args: in_point (Vector3D): Vector to which the transformation will be applied. - + Note: This operation transforms `in_point` in place. """ @@ -3773,18 +3675,17 @@ class Transform(): # endregion # region Dunder Methods - def __eq__(self, __value: Transform) -> bool: + def __eq__(self, other: Transform, /) -> bool: """Returns `True` if both `location` and `rotation` are equal for this and `other`.""" - def __ne__(self, __value: Transform) -> bool: + def __ne__(self, other: Transform, /) -> bool: """Returns `True` if any `location` and `rotation` are not equal for this and `other`.""" def __str__(self) -> str: """Parses both `location` and `rotation` to string.""" # endregion - -class Vector2D(): +class Vector2D: """Helper class to perform 2D operations.""" # region Instance Variables @@ -3797,7 +3698,7 @@ class Vector2D(): # endregion # region Methods - def __init__(self, x=0.0, y=0.0): ... + def __init__(self, x: float = 0.0, y: float = 0.0) -> None: ... def length(self) -> float: """Computes the length of the vector.""" @@ -3815,38 +3716,48 @@ class Vector2D(): def __eq__(self, other: Vector2D) -> bool: """Returns `True` if values for every axis are equal.""" - def __mul__(self, other: float) -> Vector2D: ... + def __mul__(self, other: float) -> float: ... - def __ne__(self, bool: Vector2D) -> bool: + def __ne__(self, other: Vector2D) -> bool: """Returns `True` if the value for any axis is different.""" def __str__(self) -> str: """Returns the axis values for the vector parsed as string.""" - ... def __sub__(self, other: Vector2D) -> Vector2D: ... def __truediv__(self, other: float) -> Vector2D: ... # endregion - -class Vector3D(): +# pylint: disable=function-redefined +class Vector3D: """Helper class to perform 3D operations.""" # region Instance Variables @property def x(self) -> float: """X-axis value.""" + @x.setter + def x(self, value: float) -> None: + ... + @property def y(self) -> float: """Y-axis value.""" + @y.setter + def y(self, value: float) -> None: + ... + @property def z(self) -> float: """Z-axis value.""" + @z.setter + def z(self, value: float) -> None: + ... # endregion # region Methods - def __init__(self, x=0.0, y=0.0, z=0.0): ... + def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0) -> None: ... def cross(self, vector: Vector3D) -> Vector3D: """Computes the cross product between two vectors.""" @@ -3854,7 +3765,7 @@ class Vector3D(): def distance(self, vector: Vector3D) -> float: """Computes the distance between two vectors.""" - def distance_2d(self, vector: Vector3D) -> Vector3D: + def distance_2d(self, vector: Vector3D) -> float: """Computes the 2-dimensional distance between two vectors.""" def distance_squared(self, vector: Vector3D) -> float: @@ -3897,7 +3808,6 @@ class Vector3D(): def __truediv__(self, other: float) -> Vector3D: ... # endregion - class Vehicle(Actor): """One of the most important groups of actors in CARLA. These include any type of vehicle from cars to trucks, motorbikes, vans, bycicles and also official vehicles such as police cars. A wide set of these actors is provided in `carla.BlueprintLibrary` to facilitate different requirements. Vehicles can be either manually controlled or set to an autopilot mode that will be conducted client-side by the `traffic manager`.""" @@ -3912,13 +3822,14 @@ class Vehicle(Actor): """Applies an Ackermann control object on the next tick. Args: - `control (VehicleAckermannControl)`\n + `control (VehicleAckermannControl)` """ def apply_ackermann_controller_settings(self, settings: VehicleAckermannControl): """Applies a new Ackermann control settings to this vehicle in the next tick. - + Warning: This method does call the simulator.""" + + Warning: This method does call the simulator. + """ def apply_control(self, control: VehicleControl) -> None: """Applies a control object on the next tick, containing driving parameters such as throttle, steering or gear shifting.""" @@ -3933,7 +3844,7 @@ class Vehicle(Actor): """Enables the CarSim physics solver for this particular vehicle. In order for this function to work, there needs to be a valid license manager running on the server side. The control inputs are redirected to CarSim which will provide the position and orientation of the vehicle for every frame. Args: - `simfile_path (str)`: Path to the `.simfile` file with the parameters of the simulation.\n + `simfile_path (str)`: Path to the `.simfile` file with the parameters of the simulation. """ def enable_chrono_physics(self, max_substeps: int, max_substep_delta_time: int, vehicle_json: str, powertrain_json: str, tire_json: str, base_json_path: str): @@ -3948,7 +3859,7 @@ class Vehicle(Actor): `vehicle_json (str)`: Path to vehicle json file relative to `base_json_path`.\n `powertrain_json (str)`: Path to powertrain json file relative to `base_json_path`.\n `tire_json (str)`: Path to tire json file relative to `base_json_path`.\n - `base_json_path (str)`: Path to `chrono/data/vehicle` folder. E.g., `/home/user/carla/Build/chrono-install/share/chrono/data/vehicle/` (the final / character is required).\n + `base_json_path (str)`: Path to `chrono/data/vehicle` folder. E.g., `/home/user/carla/Build/chrono-install/share/chrono/data/vehicle/` (the final / character is required). """ def is_at_traffic_light(self) -> bool: @@ -3958,12 +3869,11 @@ class Vehicle(Actor): """Open the door `door_idx` if the vehicle has it. Use carla.VehicleDoor.All to open all available doors. Args: - `door_idx (VehicleDoor)`: door index.\n + `door_idx (VehicleDoor)`: door index. """ - def show_debug_telemetry(self, enabled=True): - """Enables or disables the telemetry on this vehicle. This shows information about the vehicles current state and forces applied to it in the spectator window. Only information for one vehicle can be shown so that, if you enable a second one, the previous will be automatically disabled. - """ + def show_debug_telemetry(self, enabled: bool = True): + """Enables or disables the telemetry on this vehicle. This shows information about the vehicles current state and forces applied to it in the spectator window. Only information for one vehicle can be shown so that, if you enable a second one, the previous will be automatically disabled.""" def use_carsim_road(self, enabled: bool): """Enables or disables the usage of CarSim vs terrain file specified in the `.simfile`. By default this option is disabled and CarSim uses unreal engine methods to process the geometry of the scene.""" @@ -3977,8 +3887,7 @@ class Vehicle(Actor): """ def get_control(self) -> VehicleControl: - """The client returns the control applied in the last tick. The method does not call the simulator. - """ + """The client returns the control applied in the last tick. The method does not call the simulator.""" def get_failure_state(self) -> VehicleFailureState: """Vehicle have failure states, to indicate that it is incapable of continuing its route. This function returns the vehicle's specific failure state, or in other words, the cause that resulted in it.""" @@ -3999,16 +3908,14 @@ class Vehicle(Actor): """The client returns the speed limit affecting this vehicle according to last tick (it does not call the simulator). The speed limit is updated when passing by a speed limit signal, so a vehicle might have none right after spawning. Returns: - `float`: (km/h)\n + `float`: (km/h) """ def get_traffic_light(self) -> TrafficLight: - """Retrieves the traffic light actor affecting this vehicle (if any) according to last tick. The method does not call the simulator. - """ + """Retrieves the traffic light actor affecting this vehicle (if any) according to last tick. The method does not call the simulator.""" def get_traffic_light_state(self) -> TrafficLightState: - """The client returns the state of the traffic light affecting this vehicle according to last tick. The method does not call the simulator. If no traffic light is currently affecting the vehicle, returns `green`. - """ + """The client returns the state of the traffic light affecting this vehicle according to last tick. The method does not call the simulator. If no traffic light is currently affecting the vehicle, returns `green`.""" def get_wheel_steer_angle(self, wheel_location: VehicleWheelLocation) -> float: """ @@ -4019,12 +3926,12 @@ class Vehicle(Actor): # endregion # region Setters - def set_autopilot(self, enabled=True, port=8000) -> None: + def set_autopilot(self, enabled: bool = True, port: int = 8000) -> None: """Registers or deletes the vehicle from a Traffic Manager's list. When `True`, the Traffic Manager passed as parameter will move the vehicle around. The autopilot takes place client-side. Args: `enabled (bool, optional)`: Defaults to True.\n - `port (int, optional)`: The port of the TM-Server where the vehicle is to be registered or unlisted. Defaults to 8000.\n + `port (int, optional)`: The port of the TM-Server where the vehicle is to be registered or unlisted. Defaults to 8000. """ def set_light_state(self, light_state: VehicleLightState) -> None: @@ -4044,8 +3951,7 @@ class Vehicle(Actor): def __str__(self) -> str: ... # endregion - -class VehicleAckermannControl(): +class VehicleAckermannControl: """Manages the basic movement of a vehicle using Ackermann driving controls.""" # region Instance Variables @@ -4070,7 +3976,7 @@ class VehicleAckermannControl(): # endregion # region Methods - def __init__(self, steer=0.0, steer_speed=0.0, speed=0.0, acceleration=0.0, jerk=0.0): ... + def __init__(self, steer: float = 0.0, steer_speed: float = 0.0, speed: float = 0.0, acceleration: float = 0.0, jerk: float = 0.0) -> None: ... # endregion # region Dunder Methods @@ -4079,56 +3985,57 @@ class VehicleAckermannControl(): def __str__(self) -> str: ... # endregion - -class VehicleControl(): +# pylint: disable=function-redefined +class VehicleControl: """Manages the basic movement of a vehicle using typical driving controls.""" + # region Instance Variables @property def throttle(self) -> float: """A scalar value to control the vehicle throttle [0.0, 1.0]. Default is 0.0.""" @throttle.setter - def throttle(self, value: float):... + def throttle(self, value: float) -> None: ... @property def steer(self) -> float: """A scalar value to control the vehicle steering [-1.0, 1.0]. Default is 0.0.""" @steer.setter - def steer(self, value: float): ... + def steer(self, value: float) -> None: ... @property def brake(self) -> float: """A scalar value to control the vehicle brake [0.0, 1.0]. Default is 0.0.""" @brake.setter - def brake(self, value: float): ... + def brake(self, value: float) -> None: ... @property def hand_brake(self) -> bool: """Determines whether hand brake will be used. Default is `False`.""" @hand_brake.setter - def hand_brake(self, value: bool): ... + def hand_brake(self, value: bool) -> None: ... @property def reverse(self) -> bool: """Determines whether the vehicle will move backwards. Default is `False`.""" @reverse.setter - def reverse(self, value: bool): ... + def reverse(self, value: bool) -> None: ... @property def manual_gear_shift(self) -> bool: """Determines whether the vehicle will be controlled by changing gears manually. Default is `False`.""" @manual_gear_shift.setter - def manual_gear_shift(self, value: bool): ... + def manual_gear_shift(self, value: bool) -> None: ... @property def gear(self) -> int: """States which gear is the vehicle running on.""" @gear.setter - def gear(self, value: int): ... + def gear(self, value: int) -> None: ... # endregion # region Methods - def __init__(self, throttle=0.0, steer=0.0, brake=0.0, hand_brake=False, reverse=False, manual_gear_shift=False, gear=0): + def __init__(self, throttle: float = 0.0, steer: float = 0.0, brake: float = 0.0, hand_brake: bool = False, reverse: bool = False, manual_gear_shift: bool = False, gear: int = 0) -> None: """ Args: `throttle (float, optional)`: Scalar value between [0.0,1.0]. Defaults to 0.0.\n @@ -4137,19 +4044,19 @@ class VehicleControl(): `hand_brake (bool, optional)` Defaults to False.\n `reverse (bool, optional)` Defaults to False.\n `manual_gear_shift (bool, optional)` Defaults to False.\n - `gear (int, optional)` Defaults to 0.\n + `gear (int, optional)` Defaults to 0. """ # endregion # region Dunder Methods - def __eq__(self, __value: VehicleControl) -> bool: ... - def __ne__(self, __value: VehicleControl) -> bool: ... + def __eq__(self, other: VehicleControl, /) -> bool: ... + def __ne__(self, other: VehicleControl, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class VehicleDoor(int, __CarlaEnum): +class VehicleDoor(int, _CarlaEnum): """Possible index representing the possible doors that can be open. Notice that not all possible doors are able to open in some vehicles.""" + FL = 0 """Front left door.""" FR = 1 @@ -4161,8 +4068,7 @@ class VehicleDoor(int, __CarlaEnum): All = 6 """Represents all doors.""" - -class VehicleFailureState(int, __CarlaEnum): +class VehicleFailureState(int, _CarlaEnum): """Enum containing the different failure states of a vehicle, from which the it cannot recover. These are returned by get_failure_state() and only Rollover is currently implemented.""" NONE = 0 @@ -4170,15 +4076,17 @@ class VehicleFailureState(int, __CarlaEnum): Engine = 2 TirePuncture = 3 - -class VehicleLightState(IntFlag, __CarlaEnum): +# pylint: disable=function-redefined +class VehicleLightState(IntFlag, _CarlaEnum): """Class that recaps the state of the lights of a vehicle, these can be used as a flags. E.g: `VehicleLightState.HighBeam & VehicleLightState.Brake` will return `True` when both are active. Lights are off by default in any situation and should be managed by the user via script. The blinkers blink automatically. - + Warning: Right now, not all vehicles have been prepared to work with this functionality, this will be added to all of them in later updates.""" + + Warning: Right now, not all vehicles have been prepared to work with this functionality, this will be added to all of them in later updates. + """ + NONE = 0 """All lights off.""" Position = 1 @@ -4197,8 +4105,8 @@ class VehicleLightState(IntFlag, __CarlaEnum): All = -1 """All lights on.""" - -class VehiclePhysicsControl(): +# pylint: disable=function-redefined +class VehiclePhysicsControl: """Summarizes the parameters that will be used to simulate a carla.Vehicle as a physical object. The specific settings for the wheels though are stipulated using `carla.WheelPhysicsControl`.""" # region Instance Variables @@ -4264,6 +4172,8 @@ class VehiclePhysicsControl(): @property def use_sweep_wheel_collision(self) -> bool: """Enable the use of sweep for wheel collision. By default, it is disabled and it uses a simple raycast from the axis to the floor for each wheel. This option provides a better collision model in which the full volume of the wheel is checked against collisions.""" + @use_sweep_wheel_collision.setter + def use_sweep_wheel_collision(self, value: bool) -> None: ... @property def wheels(self) -> list[WheelPhysicsControl]: @@ -4272,20 +4182,23 @@ class VehiclePhysicsControl(): # region Methods def __init__(self, - torque_curve=[[0.0, 500.0], [5000.0, 500.0]], - max_rpm=5000.0, - moi=1.0, - damping_rate_full_throttle=0.15, damping_rate_zero_throttle_clutch_engaged=2.0, damping_rate_zero_throttle_clutch_disengaged=0.35, use_gear_autobox=True, - gear_switch_time=0.5, - clutch_strength=10.0, - final_ratio=4.0, - forward_gears=list(), - drag_coefficient=0.3, - center_of_mass=[0.0, 0.0, 0.0], - steering_curve=[[0.0, 1.0], [10.0, 0.5]], - wheels=list(), - use_sweep_wheel_collision=False, - mass=1000.0): + torque_curve: list[Vector2D | Annotated[Sequence[float], "length 2"]] = [[0.0, 500.0], [5000.0, 500.0]], + max_rpm: float = 5000.0, + moi: float = 1.0, + damping_rate_full_throttle: float = 0.15, + damping_rate_zero_throttle_clutch_engaged: float = 2.0, + damping_rate_zero_throttle_clutch_disengaged: float = 0.35, + use_gear_autobox: bool = True, + gear_switch_time: float = 0.5, + clutch_strength: float = 10.0, + final_ratio: float = 4.0, + forward_gears: list[GearPhysicsControl] = [], + drag_coefficient: float = 0.3, + center_of_mass: Location = Location(0.0, 0.0, 0.0), + steering_curve: list[Vector2D | Annotated[Sequence[float], "length 2"]] = [[0.0, 1.0], [10.0, 0.5]], + wheels=[], + use_sweep_wheel_collision: bool = False, + mass: float = 1000.0) -> None: """VehiclePhysicsControl constructor. Args: @@ -4305,7 +4218,7 @@ class VehiclePhysicsControl(): `steering_curve (list, optional)`: Defaults to [[0.0, 1.0], [10.0, 0.5]].\n `wheels (_type_, optional)`: Defaults to list().\n `use_sweep_wheel_collision (bool, optional)`: Defaults to False.\n - `mass (float, optional)`: (kilograms). Defaults to 1000.0.\n + `mass (float, optional)`: (kilograms). Defaults to 1000.0. """ # endregion @@ -4315,9 +4228,9 @@ class VehiclePhysicsControl(): def __str__(self) -> str: ... # endregion - -class VehicleWheelLocation(int, __CarlaEnum): +class VehicleWheelLocation(int, _CarlaEnum): """enum representing the position of each wheel on a vehicle. Used to identify the target wheel when setting an angle in `carla.Vehicle.set_wheel_steer_direction` or `carla.Vehicle.get_wheel_steer_angle`.""" + FL_Wheel = 0 """Front left wheel of a 4 wheeled vehicle.""" FR_Wheel = 1 @@ -4331,10 +4244,8 @@ class VehicleWheelLocation(int, __CarlaEnum): Back_Wheel = 1 """Back wheel of a 2 wheeled vehicle.""" - class Walker(Actor): - """This class inherits from the `carla.Actor` and defines pedestrians in the simulation. Walkers are a special type of actor that can be controlled either by an AI (`carla.WalkerAIController`) or manually via script, using a series of `carla.WalkerControl` to move these and their skeletons. - """ + """This class inherits from the `carla.Actor` and defines pedestrians in the simulation. Walkers are a special type of actor that can be controlled either by an AI (`carla.WalkerAIController`) or manually via script, using a series of `carla.WalkerControl` to move these and their skeletons.""" # region Methods def apply_control(self, control: WalkerControl): @@ -4348,16 +4259,14 @@ class Walker(Actor): + any other: will interpolate all the bone positions between animation and the custom pose. Args: - `blend_value (float)`: value from 0 to 1 with the blend percentage\n + `blend_value (float)`: value from 0 to 1 with the blend percentage """ def hide_pose(self): - """Hide the custom pose and show the animation (same as calling `blend_pose(0)`). - """ + """Hide the custom pose and show the animation (same as calling `blend_pose(0)`).""" def show_pose(self): - """Show the custom pose and hide the animation (same as calling `blend_pose(1)`). - """ + """Show the custom pose and hide the animation (same as calling `blend_pose(1)`).""" # endregion # region Getters @@ -4369,16 +4278,15 @@ class Walker(Actor): + component: transform based on the pivot of the actor + relative: transform based on the bone parent. - - + Setter: `carla.Walker.set_bones` + Setter: + `carla.Walker.set_bones` Returns: - `WalkerBoneControlOut`: _description_\n + `WalkerBoneControlOut`: _description_ """ def get_control(self) -> WalkerControl: - """The client returns the control applied to this walker during last tick. The method does not call the simulator. - """ + """The client returns the control applied to this walker during last tick. The method does not call the simulator.""" def get_pose_from_animation(self): """Make a copy of the current animation frame as the custom pose. Initially the custom pose is the neutral pedestrian pose.""" @@ -4395,7 +4303,7 @@ class Walker(Actor): + Getter: `carla.Walker.get_bones` Args: - `bones (WalkerBoneControlIn)`: list of pairs (bone_name, transform) for the bones that we want to set)\n + `bones (WalkerBoneControlIn)`: list of pairs (bone_name, transform) for the bones that we want to set) """ # endregion @@ -4403,17 +4311,15 @@ class Walker(Actor): def __str__(self) -> str: ... # endregion - class WalkerAIController(Actor): - """Class that conducts AI control for a walker. The controllers are defined as actors, but they are quite different from the rest. They need to be attached to a parent actor during their creation, which is the walker they will be controlling (take a look at `carla.World` if you are yet to learn on how to spawn actors). They also need for a special blueprint (already defined in `carla.BlueprintLibrary` as "controller.ai.walker"). This is an empty blueprint, as the AI controller will be invisible in the simulation but will follow its parent around to dictate every step of the way. - """ + """Class that conducts AI control for a walker. The controllers are defined as actors, but they are quite different from the rest. They need to be attached to a parent actor during their creation, which is the walker they will be controlling (take a look at `carla.World` if you are yet to learn on how to spawn actors). They also need for a special blueprint (already defined in `carla.BlueprintLibrary` as "controller.ai.walker"). This is an empty blueprint, as the AI controller will be invisible in the simulation but will follow its parent around to dictate every step of the way.""" # region Methods def go_to_location(self, destination: Location): """Sets the destination that the pedestrian will reach. Args: - `destination (Location)`: (meters)\n + `destination (Location)`: (meters) """ def start(self): @@ -4424,11 +4330,11 @@ class WalkerAIController(Actor): # endregion # region Setters - def set_max_speed(self, speed=1.4): + def set_max_speed(self, speed: float = 1.4): """Sets a speed for the walker in meters per second. Args: - `speed (float, optional)`: An easy walking speed is set by default (m/s). Defaults to 1.4.\n + `speed (float, optional)`: An easy walking speed is set by default (m/s). Defaults to 1.4. """ # endregion @@ -4436,8 +4342,7 @@ class WalkerAIController(Actor): def __str__(self) -> str: ... # endregion - -class WalkerBoneControlIn(): +class WalkerBoneControlIn: """This class grants bone specific manipulation for walker. The skeletons of walkers have been unified for clarity and the transform applied to each bone are always relative to its parent. Take a look here to learn more on how to create a walker and define its movement. https://carla.readthedocs.io/en/latest/tuto_G_control_walker_skeletons/ @@ -4454,21 +4359,19 @@ class WalkerBoneControlIn(): # endregion # region Methods - def __init__(self, bone_transforms: list[tuple[str, Transform]]): + def __init__(self, bone_transforms: list[tuple[str, Transform]]) -> None: """Initializes an object containing moves to be applied on tick. These are listed with the name of the bone and the transform that will be applied to it. Args: - `bone_transforms (list[tuple[str,Transform]])`\n + `bone_transforms (list[tuple[str,Transform]])` """ - ... # endregion # region Dunder Methods def __str__(self) -> str: ... # endregion - -class WalkerBoneControlOut(): +class WalkerBoneControlOut: """This class is used to return all bone positions of a pedestrian. For each bone we get its name and its transform in three different spaces (world, actor and relative).""" # region Instance Variables @@ -4488,8 +4391,7 @@ class WalkerBoneControlOut(): def __str__(self) -> str: ... # endregion - -class WalkerControl(): +class WalkerControl: """This class defines specific directions that can be commanded to a `carla.Walker` to control it via script. AI control can be settled for walkers, but the control used to do so is `carla.WalkerAIController`. @@ -4508,28 +4410,28 @@ class WalkerControl(): # endregion # region Methods - def __init__(self, direction=[1.0, 0.0, 0.0], speed=0.0, jump=False): + def __init__(self, direction: Vector3D = Vector3D(1.0, 0.0, 0.0), speed: float = 0.0, jump: bool = False) -> None: """This class defines specific directions that can be commanded to a `carla.Walker` to control it via script. Args: - `direction (list, optional)`: Vector using global coordinates that will correspond to the direction of the walker.. Defaults to [1.0, 0.0, 0.0].\n + `direction (Vector3D, optional)`: Vector using global coordinates that will correspond to the direction of the walker.. Defaults to [1.0, 0.0, 0.0].\n `speed (float, optional)`: A scalar value to control the walker's speed (m/s). Defaults to 0.0.\n - `jump (bool, optional)`: If `True`, the walker will perform a jump. Defaults to False.\n + `jump (bool, optional)`: If `True`, the walker will perform a jump. Defaults to False. """ # endregion # region Dunder Methods - def __eq__(self, __value: WalkerControl) -> bool: ... - def __ne__(self, __value: WalkerControl) -> bool: ... + def __eq__(self, other: WalkerControl, /) -> bool: ... + def __ne__(self, other: WalkerControl, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class Waypoint(): +class Waypoint: """Waypoints in CARLA are described as 3D directed points. They have a `carla.Transform` which locates the waypoint in a road and orientates it according to the lane. They also store the road information belonging to said point regarding its lane and lane markings. All the information regarding waypoints and the waypoint API is retrieved as provided by the OpenDRIVE file. Once the client asks for the map object to the server, no longer communication will be needed. """ + # region Instance Variables @property def id(self) -> int: @@ -4595,17 +4497,17 @@ class Waypoint(): `distance (float)`: The approximate distance where to get the next waypoints (meters).\n Returns: - `list[Waypoint]`\n + `list[Waypoint]` """ def next_until_lane_end(self, distance: float) -> list[Waypoint]: - """Returns a list of waypoints from this to the end of the lane separated by a certain `distance`."" + """Returns a list of waypoints from this to the end of the lane separated by a certain `distance`. Args: `distance (float)`: The approximate distance between waypoints.(meters). Returns: - `list[Waypoint]`\n + `list[Waypoint]` """ def previous(self, distance: float) -> list[Waypoint]: @@ -4615,7 +4517,7 @@ class Waypoint(): `distance (float)`: The approximate distance where to get the previous waypoints (meters).\n Returns: - `list[Waypoint]`\n + `list[Waypoint]` """ def previous_until_lane_start(self, distance: float) -> list[Waypoint]: @@ -4625,7 +4527,7 @@ class Waypoint(): `distance (float)`: The approximate distance between waypoints (meters).\n Returns: - `list[Waypoint]`\n + `list[Waypoint]` """ # endregion # region Getters @@ -4633,21 +4535,21 @@ class Waypoint(): def get_junction(self) -> Junction: """If the waypoint belongs to a junction this method returns the associated junction object. Otherwise returns `null`.""" - def get_landmarks(self, distance: float, stop_at_junction=False) -> list[Landmark]: + def get_landmarks(self, distance: float, stop_at_junction: bool = False) -> list[Landmark]: """Returns a list of landmarks in the road from the current waypoint until the specified distance. Args: `distance (float)`: The maximum distance to search for landmarks from the current waypoint (meters).\n - `stop_at_junction (bool, optional)`: Enables or disables the landmark search through junctions. Defaults to False.\n + `stop_at_junction (bool, optional)`: Enables or disables the landmark search through junctions. Defaults to False. """ - def get_landmarks_of_type(self, distance: float, type: str, stop_at_junction=False) -> list[Landmark]: + def get_landmarks_of_type(self, distance: float, type: str, stop_at_junction: bool = False) -> list[Landmark]: """Returns a list of landmarks in the road of a specified type from the current waypoint until the specified distance. Args: `distance (float)`: The maximum distance to search for landmarks from the current waypoint (meters).\n `type (str)`: The type of landmarks to search.\n - `stop_at_junction (bool, optional)`: Enables or disables the landmark search through junctions. Defaults to False.\n + `stop_at_junction (bool, optional)`: Enables or disables the landmark search through junctions. Defaults to False. """ def get_left_lane(self) -> Waypoint | None: @@ -4669,14 +4571,14 @@ class Waypoint(): def __str__(self) -> str: ... # endregion - -class WeatherParameters(): +class WeatherParameters: """This class defines objects containing lighting and weather specifications that can later be applied in `carla.World`. So far, these conditions only intervene with `sensor.camera.rgb`. They neither affect the actor's physics nor other sensors. Each of these parameters acts independently from the rest. Increasing the rainfall will not automatically create puddles nor change the road's humidity. That makes for a better customization but means that realistic conditions need to be scripted. However an example of dynamic weather conditions working realistically can be found here. https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/dynamic_weather.py """ + # region Instance Variables @property def cloudiness(self) -> float: @@ -4730,19 +4632,19 @@ class WeatherParameters(): # region Methods def __init__(self, - cloudiness=0.0, - precipitation=0.0, - precipitation_deposits=0.0, - wind_intensity=0.0, - sun_azimuth_angle=0.0, - sun_altitude_angle=0.0, - fog_density=0.0, - fog_distance=0.0, - wetness=0.0, - fog_falloff=0.0, - scattering_intensity=0.0, - mie_scattering_scale=0.0, - rayleigh_scattering_scale=0.0331): + cloudiness: float = 0.0, + precipitation: float = 0.0, + precipitation_deposits: float = 0.0, + wind_intensity: float = 0.0, + sun_azimuth_angle: float = 0.0, + sun_altitude_angle: float = 0.0, + fog_density: float = 0.0, + fog_distance: float = 0.0, + wetness: float = 0.0, + fog_falloff: float = 0.0, + scattering_intensity: float = 0.0, + mie_scattering_scale: float = 0.0, + rayleigh_scattering_scale: float = 0.0331) -> None: """Method to initialize an object defining weather conditions. This class has some presets for different noon and sunset conditions listed in a note below. + Note: ClearNoon, CloudyNoon, WetNoon, WetCloudyNoon, SoftRainNoon, MidRainyNoon, HardRainNoon, ClearSunset, CloudySunset, WetSunset, WetCloudySunset, SoftRainSunset, MidRainSunset, HardRainSunset. @@ -4760,18 +4662,17 @@ class WeatherParameters(): `fog_falloff (float, optional)`: Density (specific mass) of the fog, from 0 to infinity. Defaults to 0.0.\n `scattering_intensity (float, optional)`: Controls how much the light will contribute to volumetric fog. When set to 0, there is no contribution. Defaults to 0.0.\n `mie_scattering_scale (float, optional)`: Controls interaction of light with large particles like pollen or air pollution resulting in a hazy sky with halos around the light sources. When set to 0, there is no contribution. Defaults to 0.0.\n - `rayleigh_scattering_scale (float, optional)`: Controls interaction of light with small particles like air molecules. Dependent on light wavelength, resulting in a blue sky in the day or red sky in the evening. Defaults to 0.0331.\n + `rayleigh_scattering_scale (float, optional)`: Controls interaction of light with small particles like air molecules. Dependent on light wavelength, resulting in a blue sky in the day or red sky in the evening. Defaults to 0.0331. """ # endregion # region Dunder Methods - def __eq__(self, __value: WeatherParameters) -> bool: ... - def __ne__(self, __value: WeatherParameters) -> bool: ... + def __eq__(self, other: WeatherParameters, /) -> bool: ... + def __ne__(self, other: WeatherParameters, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class WheelPhysicsControl(): +class WheelPhysicsControl: """Class that defines specific physical parameters for wheel objects that will be part of a `carla.VehiclePhysicsControl` to simulate vehicle it as a material object.""" # region Instance Variables @@ -4809,23 +4710,22 @@ class WheelPhysicsControl(): # region Methods def __init__(self, - tire_friction=2.0, - damping_rate=0.25, - max_steer_angle=70.0, - radius=30.0, - max_brake_torque=1500.0, - max_handbrake_torque=3000.0, - position: Vector3D = Vector3D(0.0, 0.0, 0.0)): ... + tire_friction: float = 2.0, + damping_rate: float = 0.25, + max_steer_angle: float = 70.0, + radius: float = 30.0, + max_brake_torque: float = 1500.0, + max_handbrake_torque: float = 3000.0, + position: Vector3D = Vector3D(0.0, 0.0, 0.0)) -> None: ... # endregion # region Dunder Methods - def __eq__(self, __value: WheelPhysicsControl) -> bool: ... - def __ne__(self, __value: WheelPhysicsControl) -> bool: ... + def __eq__(self, other: WheelPhysicsControl, /) -> bool: ... + def __ne__(self, other: WheelPhysicsControl, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class World(): +class World: """World objects are created by the client to have a place for the simulation to happen. The world contains the map we can see, meaning the asset, not the navigation map. Navigation maps are part of the `carla.Map` class. It also manages the weather and actors present in it. There can only be one world per simulation, but it can be changed anytime.""" # region Instance Variables @@ -4858,8 +4758,7 @@ class World(): """ def apply_textures_to_object(self, object_name: str, diffuse_texture: TextureColor, emissive_texture: TextureFloatColor, normal_texture: TextureFloatColor, ao_roughness_metallic_emissive_texture: TextureFloatColor): - """Applies all texture fields in `carla.MaterialParameter` to the object `object_name`. Empty textures here will not be applied. - """ + """Applies all texture fields in `carla.MaterialParameter` to the object `object_name`. Empty textures here will not be applied.""" def apply_textures_to_objects(self, objects_name_list: list[str], diffuse_texture: TextureColor, emissive_texture: TextureFloatColor, normal_texture: TextureFloatColor, ao_roughness_metallic_emissive_texture: TextureFloatColor): """Applies all texture fields in `carla.MaterialParameter` to all objects in `objects_name_list`. Empty textures here will not be applied.""" @@ -4901,7 +4800,9 @@ class World(): """ def on_tick(self, callback: Callable[[WorldSnapshot], Any]) -> int: - """This method is used in `asynchronous mode`. It starts callbacks from the client for the function defined as `callback`, and returns the ID of the callback. The function will be called everytime the server ticks. It requires a `carla.WorldSnapshot` as argument, which can be retrieved from `wait_for_tick()`. Use `remove_on_tick()` to stop the callbacks. + """This method is used in `asynchronous mode`. It starts callbacks from the client for the function defined as `callback`, and returns the ID of the callback. + + The function will be called every time the server ticks. It requires a `carla.WorldSnapshot` as argument, which can be retrieved from `wait_for_tick()`. Use `remove_on_tick()` to stop the callbacks. Args: callback (Callable[[WorldSnapshot], Any]): Function with a `snapshot` as compulsory parameter that will be called when the client receives a tick. @@ -4916,21 +4817,20 @@ class World(): `search_distance (float)`: The maximum distance to perform the projection.\n Returns: - `LabelledPoint`\n + `LabelledPoint` """ def remove_on_tick(self, callback_id: int): """Stops the callback for callback_id started with `on_tick()`. Args: - `callback_id (int)`: The callback to be removed. The ID is returned when creating the callback.\n + `callback_id (int)`: The callback to be removed. The ID is returned when creating the callback. """ def reset_all_traffic_lights(self): - """Resets the cycle of all traffic lights in the map to the initial state. - """ + """Resets the cycle of all traffic lights in the map to the initial state.""" - def spawn_actor(self, blueprint: ActorBlueprint, transform: Transform, attach_to: Optional[Actor] = None, attachment_type=AttachmentType.Rigid) -> Actor: + def spawn_actor(self, blueprint: ActorBlueprint, transform: Transform, attach_to: Optional[Actor] = None, attachment_type: AttachmentType = AttachmentType.Rigid) -> Actor: """The method will create, return and spawn an actor into the world. The actor will need an available blueprint to be created and a transform (location and rotation). It can also be attached to a parent with a certain attachment type. Args: @@ -4940,10 +4840,10 @@ class World(): `attachment (AttachmentType, optional)`: Determines how fixed and rigorous should be the changes in position according to its parent object. Defaults to AttachmentType.Rigid.\n Returns: - `Actor`\n + `Actor` """ - def tick(self, seconds=10.0) -> int: + def tick(self, seconds: float = 10.0) -> int: """This method is used in synchronous mode, when the server waits for a client tick before computing the next frame. This method will send the tick, and give way to the server. It returns the ID of the new frame computed by the server. + Note: If no tick is received in synchronous mode, the simulation will freeze. Also, if many ticks are received from different clients, there may be synchronization issues. Please read the docs about synchronous mode to learn more. @@ -4952,10 +4852,10 @@ class World(): `seconds (float, optional)`: Maximum time the server should wait for a tick. Defaults to 10.0.\n Returns: - `int`\n + `int` """ - def try_spawn_actor(self, blueprint: ActorBlueprint, transform: Transform, attach_to: Optional[Actor] = None, attachment_type=AttachmentType.Rigid) -> Actor: + def try_spawn_actor(self, blueprint: ActorBlueprint, transform: Transform, attach_to: Optional[Actor] = None, attachment_type: AttachmentType = AttachmentType.Rigid) -> Actor: """Same as `spawn_actor()` but returns `None` on failure instead of throwing an exception. Args: @@ -4965,7 +4865,7 @@ class World(): `attachment (AttachmentType, optional)`: Determines how fixed and rigorous should be the changes in position according to its parent object. Defaults to AttachmentType.Rigid.\n Returns: - `Actor`\n + `Actor` """ def unload_map_layer(self, map_layers: MapLayer): @@ -4974,17 +4874,17 @@ class World(): + Warning: This only affects "Opt" maps. The minimum layout includes roads, sidewalks, traffic lights and traffic signs. Args: - `map_layers (MapLayer)`: Mask of level layers to be unloaded.\n + `map_layers (MapLayer)`: Mask of level layers to be unloaded. """ - def wait_for_tick(self, seconds=10.0) -> WorldSnapshot: + def wait_for_tick(self, seconds: float = 10.0) -> WorldSnapshot: """This method is used in asynchronous mode. It makes the client wait for a server tick. When the next frame is computed, the server will tick and return a snapshot describing the new state of the world. Args: `seconds (float, optional)`: Maximum time the server should wait for a tick. Defaults to 10.0.\n Returns: - `WorldSnapshot`\n + `WorldSnapshot` """ # endregion @@ -5013,7 +4913,7 @@ class World(): """Returns a list of EnvironmentObject with the requested semantic tag. The method returns all the EnvironmentObjects in the level by default, but the query can be filtered by semantic tags with the argument `object_type`. Args: - `object_type (CityObjectLabel, optional)`: Semantic tag of the EnvironmentObjects that are returned. Defaults to CityObjectLabel.Any.\n + `object_type (CityObjectLabel, optional)`: Semantic tag of the EnvironmentObjects that are returned. Defaults to CityObjectLabel.Any. """ def get_level_bbs(self, actor_type: CityObjectLabel = CityObjectLabel.Any) -> list[BoundingBox]: @@ -5023,7 +4923,7 @@ class World(): `actor_type (CityObjectLabel, optional)`: Semantic tag of the elements contained in the bounding boxes that are returned. Defaults to CityObjectLabel.Any.\n Returns: - `list[BoundingBox]`\n + `list[BoundingBox]` """ def get_lightmanager(self) -> LightManager: @@ -5055,14 +4955,14 @@ class World(): """Provided a landmark, returns the traffic light object it describes. Args: - `landmark (Landmark)`: The landmark object describing a traffic light.\n + `landmark (Landmark)`: The landmark object describing a traffic light. """ def get_traffic_light_from_opendrive_id(self, traffic_light_id: str) -> TrafficLight: """Returns the traffic light actor corresponding to the indicated OpenDRIVE id. Args: - `traffic_light_id (str)`: The OpenDRIVE id.\n + `traffic_light_id (str)`: The OpenDRIVE id. """ def get_traffic_lights_from_waypoint(self, waypoint: Waypoint, distance: float) -> list[TrafficLight]: @@ -5070,26 +4970,25 @@ class World(): Args: `waypoint (Waypoint)`: The input waypoint.\n - `distance (float)`: Search distance.\n + `distance (float)`: Search distance. """ def get_traffic_lights_in_junction(self, junction_id: int) -> list[TrafficLight]: """Returns the list of traffic light actors affecting the junction indicated in `junction_id`. Args: - `junction_id (int)`: The id of the junction.\n + `junction_id (int)`: The id of the junction. """ def get_traffic_sign(self, landmark: Landmark) -> TrafficSign: """Provided a landmark, returns the traffic sign object it describes. Args: - `landmark (Landmark)`: The landmark object describing a traffic sign.\n + `landmark (Landmark)`: The landmark object describing a traffic sign. """ def get_vehicles_light_states(self) -> dict[int, VehicleLightState]: - """Returns a dict where the keys are `carla.Actor` IDs and the values are `carla.VehicleLightState` of that vehicle. - """ + """Returns a dict where the keys are `carla.Actor` IDs and the values are `carla.VehicleLightState` of that vehicle.""" def get_weather(self) -> WeatherParameters: """Retrieves an object containing weather parameters currently active in the simulation, mainly cloudiness, precipitation, wind and sun position. @@ -5105,11 +5004,11 @@ class World(): + Note: Should be set before pedestrians are spawned. Args: - `percentage (float)`: Value should be between 0.0 and 1.0. For example, a value of 0.1 would allow 10% of pedestrians to walk on the road.\n + `percentage (float)`: Value should be between 0.0 and 1.0. For example, a value of 0.1 would allow 10% of pedestrians to walk on the road. """ def set_pedestrians_seed(self, seed: int): - """ Sets the seed to use for any random number generated in relation to pedestrians. + """Sets the seed to use for any random number generated in relation to pedestrians. + Note: Should be set before pedestrians are spawned. If you want to repeat the same exact bodies (blueprint) for each pedestrian, then use the same seed in the Python code (where the blueprint is chosen randomly) and here, otherwise the pedestrians will repeat the same paths but the bodies will be different. """ @@ -5118,9 +5017,9 @@ class World(): """Changes the weather parameters ruling the simulation to another ones defined in an object. + Getter: `carla.World.get_weather` - + Args: - `weather (WeatherParameters)`: New conditions to be applied.\n + `weather (WeatherParameters)`: New conditions to be applied. """ # endregion @@ -5129,8 +5028,7 @@ class World(): """The content of the world is parsed and printed as a brief report of its current state.""" # endregion - -class WorldSettings(): +class WorldSettings: """The simulation has some advanced configuration options that are contained in this class and can be managed using carla.World and its methods. These allow the user to choose between client-server synchrony/asynchrony, activation of "no rendering mode" and either if the simulation should run with a fixed or variable time-step. Check this out if you want to learn about it. https://carla.readthedocs.io/en/latest/adv_synchrony_timestep/ @@ -5141,89 +5039,89 @@ class WorldSettings(): def synchronous_mode(self) -> bool: """States the synchrony between client and server. When set to true, the server will wait for a client tick in order to move forward. It is `False` by default.""" @synchronous_mode.setter - def synchronous_mode(self, value: bool): + def synchronous_mode(self, value: bool) -> None: ... @property def no_rendering_mode(self) -> bool: """When enabled, the simulation will run no rendering at all. This is mainly used to avoid overhead during heavy traffic simulations. It is `False` by default.""" @no_rendering_mode.setter - def no_rendering_mode(self, value: bool): + def no_rendering_mode(self, value: bool) -> None: ... @property def fixed_delta_seconds(self) -> float | None: """Ensures that the time elapsed between two steps of the simulation is fixed. Set this to `0.0` to work with a variable time-step, as happens by default.""" @fixed_delta_seconds.setter - def fixed_delta_seconds(self, value: float | None): + def fixed_delta_seconds(self, value: float | None) -> None: ... @property def substepping(self) -> bool: """Enable the physics substepping. This option allows computing some physics substeps between two render frames. If synchronous mode is set, the number of substeps and its time interval are fixed and computed are so they fulfilled the requirements of `carla.WorldSettings.max_substep` and `carla.WorldSettings.max_substep_delta_time`. These last two parameters need to be compatible with c`arla.WorldSettings.fixed_delta_seconds`. Enabled by default.""" @substepping.setter - def substepping(self, value: bool): + def substepping(self, value: bool) -> None: ... @property def max_substep_delta_time(self) -> float: - """Maximum delta time of the substeps. If the carla.`WorldSettingsmax_substep` is high enough, the substep delta time would be always below or equal to this value. By default, the value is set to 0.01.""" + """Maximum delta time of the substeps. If the carla.`WorldSettings.max_substep` is high enough, the substep delta time would be always below or equal to this value. By default, the value is set to 0.01.""" @max_substep_delta_time.setter - def max_substep_delta_time(self, value: float): + def max_substep_delta_time(self, value: float) -> None: ... @property def max_substeps(self) -> int: """The maximum number of physics substepping that are allowed. By default, the value is set to 10.""" @max_substeps.setter - def max_substeps(self, value: int): + def max_substeps(self, value: int) -> None: ... @property def max_culling_distance(self) -> float: """Configure the max draw distance for each mesh of the level.""" @max_culling_distance.setter - def max_culling_distance(self, value: float): + def max_culling_distance(self, value: float) -> None: ... @property def deterministic_ragdolls(self) -> bool: """Defines wether to use deterministic physics for pedestrian death animations or physical ragdoll simulation. When enabled, pedestrians have less realistic death animation but ensures determinism. When disabled, pedestrians are simulated as ragdolls with more realistic simulation and collision but no determinsm can be ensured.""" @deterministic_ragdolls.setter - def deterministic_ragdolls(self, value: bool): + def deterministic_ragdolls(self, value: bool) -> None: ... @property def tile_stream_distance(self) -> bool: """Used for large maps only. Configures the maximum distance from the hero vehicle to stream tiled maps. Regions of the map within this range will be visible (and capable of simulating physics). Regions outside this region will not be loaded.""" @tile_stream_distance.setter - def tile_stream_distance(self, value: bool): + def tile_stream_distance(self, value: bool) -> None: ... @property def actor_active_distance(self) -> float: """Used for large maps only. Configures the distance from the hero vehicle to convert actors to dormant. Actors within this range will be active, and actors outside will become dormant.""" @actor_active_distance.setter - def actor_active_distance(self, value: float): + def actor_active_distance(self, value: float) -> None: ... @property def spectator_as_ego(self) -> float: """Used for large maps only. Defines the influence of the spectator on tile loading in Large Maps. By default, the spectator will provoke loading of neighboring tiles in the absence of an ego actor. This might be inconvenient for applications that immediately spawn an ego actor.""" @spectator_as_ego.setter - def spectator_as_ego(self, value: float): + def spectator_as_ego(self, value: float) -> None: ... # region Methods def __init__(self, - synchronous_mode=False, - no_rendering_mode=False, - fixed_delta_seconds=0.0, - max_culling_distance=0.0, - deterministic_ragdolls=False, - tile_stream_distance=3000, - actor_active_distance=2000, - spectator_as_ego=True): + synchronous_mode: bool = False, + no_rendering_mode: bool = False, + fixed_delta_seconds: float = 0.0, + max_culling_distance: float = 0.0, + deterministic_ragdolls: bool = False, + tile_stream_distance: int = 3000, + actor_active_distance: int = 2000, + spectator_as_ego: bool = True) -> None: """Creates an object containing desired settings that could later be applied through `carla.World` and its method `apply_settings()`. Args: @@ -5237,21 +5135,20 @@ class WorldSettings(): `spectator_as_ego (bool, optional)`: Used for large maps only. Defines the influence of the spectator on tile loading in Large Maps. Defaults to True.\n Returns: - `WorldSettings`: _description_\n + `WorldSettings`: _description_ """ # endregion # region Dunder Methods - def __eq__(self, __value: WorldSettings) -> bool: ... - def __ne__(self, __value: WorldSettings) -> bool: ... + def __eq__(self, other: WorldSettings, /) -> bool: ... + def __ne__(self, other: WorldSettings, /) -> bool: ... def __str__(self) -> str: ... # endregion - -class WorldSnapshot(): +class WorldSnapshot: """ - This snapshot comprises all the information for every actor on scene at a certain moment of time. - It creates and gives access to a data structure containing a series of `carla.ActorSnapshot`. + This snapshot comprises all the information for every actor on scene at a certain moment of time. + It creates and gives access to a data structure containing a series of `carla.ActorSnapshot`. The client receives a new snapshot on every tick that cannot be stored. """ @@ -5269,15 +5166,14 @@ class WorldSnapshot(): # region Methods def find(self, actor_id: int) -> ActorSnapshot: - """Given a certain actor ID, returns its corresponding snapshot or `None` if it is not found. - """ + """Given a certain actor ID, returns its corresponding snapshot or `None` if it is not found.""" def has_actor(self, actor_id: int) -> bool: """Given a certain actor ID, checks if there is a snapshot corresponding it and so, if the actor was present at that moment.""" # endregion # region Dunder Methods - def __eq__(self, __value: WorldSnapshot) -> bool: + def __eq__(self, other: WorldSnapshot, /) -> bool: """Returns True if both `timestamp` are the same.""" def __iter__(self) -> Iterator[ActorSnapshot]: @@ -5286,464 +5182,6 @@ class WorldSnapshot(): def __len__(self) -> int: """Returns the amount of `carla.ActorSnapshot` present in this snapshot.""" - def __ne__(self, __value: WorldSnapshot) -> bool: + def __ne__(self, other: WorldSnapshot, /) -> bool: """Returns True if both `timestamp` are different.""" # endregion - - -class command(): - """ - Submodule with commands that can be used with `carla.Client.apply_batch` - and `carla.Client.apply_batch_sync`. - """ - - class ApplyAngularImpulse(): - """Command adaptation of `add_angular_impulse()` in `carla.Actor`. Applies an angular impulse to an actor. - """ - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def impulse(self) -> Vector3D: - """Angular impulse applied to the actor (degrees*s).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], impulse: Vector3D): - """Applies an angular impulse to an actor. - - Args: - `actor (Union[Actor,int])`: Actor or its ID to whom the command will be applied to.\n - `impulse (Vector3D)`: (degrees*s)\n - """ - # endregion - - class ApplyForce(): - """Command adaptation of `add_force()` in `carla.Actor`. Applies a force to an actor.""" - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def force(self) -> Vector3D: - """Force applied to the actor over time (N).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], force: Vector3D): - """Applies a force to an actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `force (Vector3D)`: (N)\n - """ - # endregion - - class ApplyImpulse(): - """Command adaptation of `add_impulse()` in `carla.Actor`. Applies an impulse to an actor.""" - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def impulse(self) -> Vector3D: - """Impulse applied to the actor (N*s).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], impulse: Vector3D): - """Applies an impulse to an actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `impulse (Vector3D)`: (N*s)\n - """ - # endregion - - class ApplyTargetAngularVelocity(): - """Command adaptation of `set_target_angular_velocity()` in `carla.Actor`. Sets the actor's angular velocity vector. - """ - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def angular_velocity(self) -> Vector3D: - """The 3D angular velocity that will be applied to the actor (deg/s).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], angular_velocity: Vector3D): - """Sets the actor's angular velocity vector. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `angular_velocity (Vector3D)`: Angular velocity vector applied to the actor.\n - """ - # endregion - - class ApplyTargetVelocity(): - """Command adaptation of `set_target_velocity()` in `carla.Actor`. Sets the actor's target velocity vector. - """ - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def velocity(self) -> Vector3D: - """The 3D velocity applied to the actor (m/s).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], velocity: Vector3D): - """Sets the actor's target velocity vector. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `velocity (Vector3D)`: Velocity vector applied to the actor.\n - """ - # endregion - - class ApplyTorque(): - """ - Command adaptation of `add_torque()` in carla.Actor. Applies a torque to an actor. - """ - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - - @property - def transform(self) -> Vector3D: - """Torque applied to the actor over time (degrees).""" - - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], torque: Vector3D): - """Sets a new transform to an actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `torque (Vector3D)`: Torque vector in global coordinates (degrees). - """ - # endregion - - class ApplyTransform(): - """ - Command adaptation of `set_transform()` in `carla.Actor`. Sets a new transform to an actor. - """ - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def transform(self) -> Transform: - """Transformation to be applied.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], transform: Transform): - """Sets a new transform to an actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `transform (Transform)`\n - """ - # endregion - - class ApplyVehicleAckermannControl(): - """Command adaptation of `apply_ackermann_control()` in `carla.Vehicle`. Applies a certain akermann control to a vehicle. - """ - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def control(self) -> AckermannControllerSettings: - """Vehicle ackermann control to be applied.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], control: AckermannControllerSettings): - """Applies a certain akermann control to a vehicle. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `control (AckermannControllerSettings)`: Vehicle ackermann control to be applied.\n - """ - # endregion - - class ApplyVehicleControl(): - """Command adaptation of `apply_control()` in `carla.Vehicle`. Applies a certain control to a vehicle.""" - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def control(self) -> VehicleControl: - """Vehicle control to be applied.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], control: VehicleControl): - """Applies a certain control to a vehicle. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `control (VehicleControl)`: Vehicle control to be applied.\n - """ - # endregion - - class ApplyVehiclePhysicsControl(): - """Command adaptation of `apply_physics_control()` in `carla.Vehicle`. Applies a new physics control to a vehicle, modifying its physical parameters.""" - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - @property - def control(self) -> VehiclePhysicsControl: - """Physics control to be applied.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], control: VehicleControl): - """Applies a new physics control to a vehicle, modifying its physical parameters. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `control (VehicleControl)`: Physics control to be applied.\n - """ - # endregion - - class ApplyWalkerControl(): - """Command adaptation of `apply_control()` in `carla.Walker`. Applies a control to a walker.""" - - # region Instance Variables - @property - def actor_id(self) -> int: - """Walker actor affected by the command.""" - @property - def control(self) -> VehiclePhysicsControl: - """Walker control to be applied.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], control: VehicleControl): - """Applies a control to a walker. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `control (VehicleControl)`: Walker control to be applied.\n - """ - # endregion - - class ApplyWalkerState(): - """Apply a state to the walker actor. Specially useful to initialize an actor them with a specific location, orientation and speed.""" - - # region Instance Variables - @property - def actor_id(self) -> int: - """Walker actor affected by the command.""" - @property - def transform(self) -> Transform: - """Transform to be applied.""" - @property - def speed(self) -> float: - """Speed to be applied (m/s).""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], transform: Transform, speed: float): - """Apply a state to the walker actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `transform (Transform)`: Transform to be applied.\n - `speed (float)`: Speed to be applied (m/s).\n - """ - # endregion - - class DestroyActor(): - """Command adaptation of `destroy()` in `carla.Actor` that tells the simulator to destroy this actor. It has no effect if the actor was already destroyed. When executed with `apply_batch_sync()` in c`arla.Client` there will be a `command.Response` that will return a boolean stating whether the actor was successfully destroyed.""" - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor affected by the command.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int]): - """Command adaptation of `destroy()` in `carla.Actor` that tells the simulator to destroy this actor. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - """ - # endregion - - class FutureActor(): - """A utility object used to reference an actor that will be created in the command in the previous step, it has no parameters or methods.""" - - class Response(): - """States the result of executing a command as either the ID of the actor to whom the command was applied to (when succeeded) or an error string (when failed). actor ID, depending on whether or not the command succeeded. The method `apply_batch_sync()` in c`arla.Client` returns a list of these to summarize the execution of a batch. - """ - - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor to whom the command was applied to. States that the command was successful.""" - @property - def error(self) -> str: - """A string stating the command has failed.""" - # endregion - - # region Methods - def has_error(self) -> bool: - """Returns `True` if the command execution fails, and `False` if it was successful.""" - # endregion - - class SetAutopilot(): - """Command adaptation of `set_autopilot()` in `carla.Vehicle`. Turns on/off the vehicle's autopilot mode.""" - - # region Instance Methods - @property - def actor_id(self) -> int: - """Actor that is affected by the command.""" - @property - def enabled(self) -> bool: - """If autopilot should be activated or not.""" - @property - def port(self) -> int: - """Port of the Traffic Manager where the vehicle is to be registered or unlisted.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], enabled: bool, port=8000): - """Turns on/off the vehicle's autopilot mode. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `enabled (bool)`: _description_\n - `port (int, optional)`: The Traffic Manager port where the vehicle is to be registered or unlisted. If None is passed, it will consider a TM at default port 8000. Defaults to 8000.\n - """ - # endregion - - class SetEnableGravity(): - """Command adaptation of `set_enable_gravity()` in `carla.Actor`. Enables or disables gravity on an actor.""" - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor that is affected by the command.""" - @property - def enabled(self) -> bool: - """If gravity should be activated or not.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], enabled: bool): - """Enables or disables gravity on an actor. - - Args: - `actor (Union[Actor, int])`: Actor or Actor ID to which the command will be applied to.\n - `enabled (bool)`: If gravity should be activated or not.\n - """ - # endregion - - class SetSimulatePhysics(): - """Command adaptation of `set_simulate_physics()` in `carla.Actor`. Determines whether an actor will be affected by physics or not.""" - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor that is affected by the command.""" - @property - def enabled(self) -> bool: - """If physics should be activated or not.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], enabled: bool): - """Determines whether an actor will be affected by physics or not. - - Args: - `actor (Union[Actor, int])`: Actor or Actor ID to which the command will be applied to.\n - `enabled (bool)`: If physics should be activated or not.\n - """ - # endregion - - class SetVehicleLightState(): - """Command adaptation of `set_light_state()` in `carla.Vehicle`. Sets the light state of a vehicle.""" - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor that is affected by the command.""" - @property - def light_state(self) -> VehicleLightState: - """Recaps the state of the lights of a vehicle, these can be used as a flags.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], light_state: VehicleLightState): - """Sets the light state of a vehicle. - - Args: - `actor (Union[Actor, int])`: Actor or its ID to whom the command will be applied to.\n - `light_state (VehicleLightState)`: Recaps the state of the lights of a vehicle, these can be used as a flags.\n - """ - # endregion - - class ShowDebugTelemetry(): - """Command adaptation of `show_debug_telemetry()` in `carla.Actor`. Displays vehicle control telemetry data. - """ - # region Instance Variables - @property - def actor_id(self) -> int: - """Actor that is affected by the command.""" - @property - def enabled(self) -> bool: - """If debug should be activated or not.""" - # endregion - - # region Methods - def __init__(self, actor: Union[Actor, int], enabled: bool): - """Displays vehicle control telemetry data. - - Args: - `actor (Union[Actor, int])`: Actor or Actor ID to which the command will be applied to.\n - `enabled (bool)`: If debug should be activated or not.\n - """ - # endregion - - class SpawnActor(): - """Command adaptation of `spawn_actor()` in `carla.World`. Spawns an actor into the world based on the blueprint provided and the transform. If a parent is provided, the actor is attached to it.""" - - # region Instance Variables - @property - def transform(self) -> Transform: - """Transform to be applied.""" - @property - def parent_id(self) -> int: - """Identificator of the parent actor.""" - # endregion - - # region Methods - @overload - def __init__(self): ... - @overload - def __init__(self, blueprint: ActorBlueprint, transform: Transform): ... - @overload - def __init__(self, blueprint: ActorBlueprint, transform: Transform, parent: Union[Actor, int]): ... - - def then(self, command: command): - """Links another command to be executed right after. It allows to ease very common flows such as spawning a set of vehicles by command and then using this method to set them to autopilot automatically. - - Args: - `command (command)`: a Carla command.\n - """ - # endregion diff --git a/Util/BuildTools/BuildPythonAPI.sh b/Util/BuildTools/BuildPythonAPI.sh index f5bbb5c61c..f8a12656dc 100755 --- a/Util/BuildTools/BuildPythonAPI.sh +++ b/Util/BuildTools/BuildPythonAPI.sh @@ -99,6 +99,8 @@ if ${BUILD_PYTHONAPI} ; then for PY_VERSION in ${PY_VERSION_LIST[@]} ; do log "Building Python API for Python ${PY_VERSION}." + # Building the RSS variant adds files to SOURCES.txt we do not want included in a normal build + rm -Rf source/carla.egg-info if [[ -z ${TARGET_WHEEL_PLATFORM} ]] ; then /usr/bin/env python${PY_VERSION} setup.py bdist_egg bdist_wheel --dist-dir dist/.tmp