Compare commits

...

37 Commits

Author SHA1 Message Date
Daniel 537739972f
Added inverse_transform and fixes for Transform
inverse_transform from #7999
highlighted in-place character
2024-08-01 17:07:20 +02:00
Daniel 623a356a0e
Added Transform.inverse_transform and corrected signature
parameter is called in_point not in_vector
2024-08-01 17:01:31 +02:00
Daniel 85ed177b81
Corrected [try_]spawn_actor keyword name 2024-08-01 16:21:29 +02:00
Daniel f1fa9b19bd
Improved get_waypoints and Literal type hints 2024-07-29 18:01:28 +02:00
Daniel edb2d1849d
Added setters for VehicleControl 2024-07-29 17:48:36 +02:00
Daniel fca4a67442
Various fixes
- wrong signatures
- wrong names
2024-07-29 17:01:20 +02:00
Daniel 5abc41af92 Added self parameter to property signatures 2024-07-29 16:34:19 +02:00
Daniel 2c900e9cb7 Fixes for wrong stubs
- OpendriveGenerationParameter had no init
- missing @property
- wrong signatures
2024-07-29 16:34:19 +02:00
Daniel f28453cd16 Fix: Enum values were tuples. Added Flag or Int to Enums 2024-07-29 16:34:19 +02:00
Daniel 4b925a9dd6 Better usage of Enum if typing.Self is availiable
Using Self will not report an override / incompatible error.
2024-07-29 16:34:19 +02:00
Daniel 7e08bf1bef Fix spelling mistakes 2024-07-29 16:34:19 +02:00
Daniel 1af31a06b7 Improved get_waypoint disambiguation
correctly added two overload function
2024-07-29 16:34:19 +02:00
Daniel 44176daee9 Corrected and more precise type-hints
- fixed carla.Waypoint.next_until_lane_end
2024-07-29 16:34:19 +02:00
Daniel 8c974eb89c Added stubs for HUD drawing
Functions from #7168
2024-07-29 16:34:19 +02:00
Daniel 914113cc27 Formatted some docstring to be shorter 2024-07-29 16:34:19 +02:00
Daniel a4f98209f8 Fix missing @property 2024-07-29 16:34:19 +02:00
Daniel b93ce420a3 Fix intendation shadowing methods 2024-07-29 16:34:19 +02:00
Daniel 007b29b2b8 Added type hints for `values` attribute on enums 2024-07-29 16:34:19 +02:00
Daniel 61f904b647 Corrected Sensor.is_listening
Was changed to a function in 0.9.15. More info see: https://github.com/carla-simulator/carla/pull/7439
2024-07-29 16:34:19 +02:00
Daniel 6957cc8f22 Added undocumented variables
FutureActor
laod_world_if_different
2024-07-29 16:34:19 +02:00
Daniel ab0bb04eab Disambiguated get_waypoint signature
Syntax fix (squased)
2024-07-29 16:34:19 +02:00
Daniel cf4b79be86 Fixed CityObjectLabels 2024-07-29 16:34:19 +02:00
Daniel 032bc9928c ActorList.filter actually returns ActorList 2024-07-29 16:34:19 +02:00
Daniel e45b959606 Filled in missing information and types. 2024-07-29 16:34:19 +02:00
Daniel 94b55daaf3 FIX: added ApplyTransform, fixed ApplyTorque 2024-07-29 16:34:19 +02:00
Daniel ac44fbbfe6 FIX: __init__ methods do not return 2024-07-29 16:34:19 +02:00
Daniel 0ad315d681 Added missing return value to reload_world 2024-07-29 16:34:19 +02:00
Daniel f583a01589 Added missing -> World to load_world 2024-07-29 16:34:19 +02:00
Daniel 5b7c074f1a Removed wrong unit indication 2024-07-29 16:34:19 +02:00
Daniel faa0bf5e5e Fixed spelling misstakes 2024-07-29 16:34:19 +02:00
Daniel 384732c873 Added missing type for Labelled Point 2024-07-29 16:34:19 +02:00
Daniel 0a0aae6757 Added DSVEventArray iterator 2024-07-29 16:34:19 +02:00
Daniel f52306bfb6 Updated changelog
needs merge with dev version
2024-07-29 16:34:19 +02:00
Daniel c94283721e Fixed missing return types 2024-07-29 16:34:19 +02:00
Daraan c3660aa47b Fixed Actor.parent
Can be None or an Actor
2024-07-29 16:34:19 +02:00
Daniel 6788f7d9aa Fixes and missing Iterators 2024-07-29 16:34:19 +02:00
Minokori 3e5ae96ef4 Add a `*.pyi` file for auto-completion & hints.
To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.
2024-07-29 16:34:19 +02:00
4 changed files with 5707 additions and 9 deletions

View File

@ -18,6 +18,7 @@
* PythonAPI `Sensor.is_listening` was defined twice (property and method), cleaned and clarified it as a method.
* Added V2X sensors for cooperative awareness message and custom user-defined messages to support vehicle-to-vehicle communication
* Added named tuples for BasicAgent.py's detection result to allow for type-hints and better semantics.
* Added type-hint support for the PythonAPI
## CARLA 0.9.15

View File

@ -2786,14 +2786,18 @@ Describes a rotation for an object according to Unreal Engine's axis system.
- **Parameters:**
- `location` (_[carla.Location](#carla.Location)_)
- `rotation` (_[carla.Rotation](#carla.Rotation)<small> - degrees (pitch, yaw, roll)</small>_)
- <a name="carla.Transform.inverse_transform"></a>**<font color="#7fb800">inverse_transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
- **Parameters:**
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the inverse transformation will be applied.
- <a name="carla.Transform.transform"></a>**<font color="#7fb800">transform</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
- **Parameters:**
- `in_point` (_[carla.Location](#carla.Location)_) - Location in the space to which the transformation will be applied.
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_vector**</font>)
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Location in the space to which the transformation will be applied.
- <a name="carla.Transform.transform_vector"></a>**<font color="#7fb800">transform_vector</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**in_point**</font>)
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
- **Parameters:**
- `in_vector` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
- `in_point` (_[carla.Vector3D](#carla.Vector3D)_) - Vector to which the transformation will be applied.
##### Getters
- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)

File diff suppressed because it is too large Load Diff

View File

@ -438,20 +438,29 @@
- def_name: transform
params:
- param_name: in_point
type: carla.Location
type: carla.Vector3D
doc: >
Location in the space to which the transformation will be applied.
doc: >
Translates a 3D point from local to global coordinates using the current transformation as frame of reference.
Translates a 3D point in place from local to global coordinates using the current transformation as frame of reference.
# --------------------------------------
- def_name: inverse_transform
params:
- param_name: in_point
type: carla.Vector3D
doc: >
Location in the space to which the inverse transformation will be applied.
doc: >
Applies the inverse of `transform` by translating a 3D point in place from global to local coordinates using the current transformation as frame of reference.
# --------------------------------------
- def_name: transform_vector
params:
- param_name: in_vector
- param_name: in_point
type: carla.Vector3D
doc: >
Vector to which the transformation will be applied.
doc: >
Rotates a vector using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
Rotates a vector in place using the current transformation as frame of reference, without applying translation. Use this to transform, for example, a velocity.
# --------------------------------------
- def_name: get_forward_vector
return: carla.Vector3D