From c9e8c09b413fe4d9ba7a73208402f642fdf2d895 Mon Sep 17 00:00:00 2001 From: sergi-e Date: Tue, 15 Sep 2020 15:40:57 +0200 Subject: [PATCH] New fixes on M and D comments --- Docs/core_actors.md | 6 +++--- Docs/python_api.md | 36 +++++++++++++++++----------------- PythonAPI/docs/doc_gen.py | 11 +++++++---- PythonAPI/docs/sensor.yml | 30 ++++++++++++++-------------- PythonAPI/docs/sensor_data.yml | 7 ++++--- 5 files changed, 47 insertions(+), 43 deletions(-) diff --git a/Docs/core_actors.md b/Docs/core_actors.md index b6cd046cc..39102d1b6 100644 --- a/Docs/core_actors.md +++ b/Docs/core_actors.md @@ -74,12 +74,12 @@ The world has two different methods to spawn actors. * [`try_spawn_actor()`](python_api.md#carla.World.try_spawn_actor) returns `None` if the spawning fails. ```py -transform = Transform(Location(x=230, y=195, z=40), Rotation(0,180,0)) +transform = Transform(Location(x=230, y=195, z=40), Rotation(yaw=180)) actor = world.spawn_actor(blueprint, transform) ``` -!!! Note - CARLA uses the [Unreal Engine coordinates system](https://carla.readthedocs.io/en/latest/python_api/#carlarotation), and rotations are declared in a specific order, `(pitch,yaw,roll)`, which is different in the Unreal Engine Editor. +!!! Important + CARLA uses the [Unreal Engine coordinates system](https://carla.readthedocs.io/en/latest/python_api/#carlarotation). Remember that [`carla.Rotation`](https://carla.readthedocs.io/en/latest/python_api/#carlarotation) constructor is defined as `(pitch, yaw, roll)`, that differs from Unreal Engine Editor `(roll, pitch, yaw)`. The actor will not be spawned in case of collision at the specified location. No matter if this happens with a static object or another actor. It is possible to try avoiding these undesired spawning collisions. diff --git a/Docs/python_api.md b/Docs/python_api.md index 7320d3d7e..bce89d6f3 100644 --- a/Docs/python_api.md +++ b/Docs/python_api.md @@ -1728,9 +1728,9 @@ Data contained inside a [carla.SemanticLidarMeasurement](#carla.SemanticLidarMea - **cos_inc_angle** (_float_) Cosine of the incident angle between the ray, and the normal of the hit object. - **object_idx** (_uint_) -[CARLA index](https://[carla.readthedocs.io](#carla.readthedocs.io)/en/latest/ref_sensors/#semantic-segmentation-camera) of the hit actor. +ID of the actor hit by the ray. - **object_tag** (_uint_) -[Semantic tag](https://[carla.readthedocs.io](#carla.readthedocs.io)/en/latest/ref_sensors/#semantic-segmentation-camera) of the hit component. +[Semantic tag](https://[carla.readthedocs.io](#carla.readthedocs.io)/en/latest/ref_sensors/#semantic-segmentation-camera) of the component hit by the ray.

Methods

@@ -1745,8 +1745,8 @@ Cosine of the incident angle between the ray, and the normal of the hit object.

Instance Variables

- **channels** (_int_) Number of lasers shot. -- **horizontal_angle** (_float_) -Horizontal angle the LIDAR is rotated at the time of the measurement (in radians). +- **horizontal_angle** (_float – radians_) +Horizontal angle the LIDAR is rotated at the time of the measurement. - **raw_data** (_bytes_) Received list of raw detection points. Each point consists of [x,y,z] coordinates plus the cosine of the incident angle, the index of the hit actor, and its semantic tag. @@ -1774,20 +1774,20 @@ Retrieves the number of points sorted by channel that are generated by this meas ## carla.Sensor
Inherited from _[carla.Actor](#carla.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](#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](#carla.SensorData) (depending on the sensor). - Most sensors can be divided in two groups: those receiving data on every tick (cameras, point clouds and some specific sensors) and those who only receive under certain circumstances (trigger detectors). CARLA provides a specific set of sensors and their blueprint can be found in [carla.BlueprintLibrary](#carla.BlueprintLibrary). All the information on their preferences and settlement can be found [here](ref_sensors.md), but the list of those available in CARLA so far goes as follow. - Receive data on every tick. - - [Depth camera](ref_sensors.md#depth-camera). - - [Gnss sensor](ref_sensors.md#gnss-sensor). - - [IMU sensor](ref_sensors.md#imu-sensor). - - [Lidar raycast](ref_sensors.md#lidar-raycast-sensor). - - [SemanticLidar raycast](ref_sensors.md#semanticlidar-raycast-sensor). - - [Radar](ref_sensors.md#radar-sensor). - - [RGB camera](ref_sensors.md#rgb-camera). - - [RSS sensor](ref_sensors.md#rss-sensor). - - [Semantic Segmentation camera](ref_sensors.md#semantic-segmentation-camera). - Only receive data when triggered. - - [Collision detector](ref_sensors.md#collision-detector). - - [Lane invasion detector](ref_sensors.md#lane-invasion-detector). + Most sensors can be divided in two groups: those receiving data on every tick (cameras, point clouds and some specific sensors) and those who only receive under certain circumstances (trigger detectors). CARLA provides a specific set of sensors and their blueprint can be found in [carla.BlueprintLibrary](#carla.BlueprintLibrary). All the information on their preferences and settlement can be found [here](ref_sensors.md), but the list of those available in CARLA so far goes as follow. +
Receive data on every tick. + - [Depth camera](ref_sensors.md#depth-camera). + - [Gnss sensor](ref_sensors.md#gnss-sensor). + - [IMU sensor](ref_sensors.md#imu-sensor). + - [Lidar raycast](ref_sensors.md#lidar-raycast-sensor). + - [SemanticLidar raycast](ref_sensors.md#semanticlidar-raycast-sensor). + - [Radar](ref_sensors.md#radar-sensor). + - [RGB camera](ref_sensors.md#rgb-camera). + - [RSS sensor](ref_sensors.md#rss-sensor). + - [Semantic Segmentation camera](ref_sensors.md#semantic-segmentation-camera). +
Only receive data when triggered. + - [Collision detector](ref_sensors.md#collision-detector). + - [Lane invasion detector](ref_sensors.md#lane-invasion-detector). - [Obstacle detector](ref_sensors.md#obstacle-detector).

Instance Variables

diff --git a/PythonAPI/docs/doc_gen.py b/PythonAPI/docs/doc_gen.py index 7a271564e..d8247a422 100755 --- a/PythonAPI/docs/doc_gen.py +++ b/PythonAPI/docs/doc_gen.py @@ -129,6 +129,9 @@ def brackets(buf): def parentheses(buf): return join(['(', buf, ')']) +def small_html(buf): + return join([''+buf+'']) + def small(buf): return join(['', buf, '']) @@ -334,7 +337,7 @@ def add_doc_method_param(md, param): if valid_dic_val(param, 'doc'): param_doc = create_hyperlinks(md.prettify_doc(param['doc'])) if valid_dic_val(param, 'param_units'): - param_units = ' – '+create_hyperlinks(param['param_units']+'') + param_units = small_html(' – '+param['param_units']) param_type = '' if not param_type else parentheses(italic(param_type+param_units)) md.list_push(code(param_name)) if param_type: @@ -377,7 +380,7 @@ def add_doc_method(md, method, class_key): md.list_push(bold('Return:') + ' ') return_units = '' if valid_dic_val(method, 'return_units'): - return_units = ' – '+create_hyperlinks(method['return_units']+'') + return_units = small_html(' – '+method['return_units']) md.textn(italic(create_hyperlinks(method['return'])+return_units)) md.list_pop() @@ -431,7 +434,7 @@ def add_doc_getter_setter(md, method,class_key,is_getter,other_list): md.list_push(bold('Return:') + ' ') return_units = '' if valid_dic_val(method, 'return_units'): - return_units = ' – '+create_hyperlinks(method['return_units']+'') + return_units = small_html(' – '+method['return_units']) md.textn(italic(create_hyperlinks(method['return'])+return_units)) md.list_pop() @@ -507,7 +510,7 @@ def add_doc_inst_var(md, inst_var, class_key): # Instance variable type if valid_dic_val(inst_var, 'type'): if valid_dic_val(inst_var, 'var_units'): - var_units = ' – '+create_hyperlinks(inst_var['var_units']+'') + var_units = small_html(' – '+inst_var['var_units']) var_type = ' ' + parentheses(italic(create_hyperlinks(inst_var['type']+var_units))) md.list_pushn( html_key(var_key) + diff --git a/PythonAPI/docs/sensor.yml b/PythonAPI/docs/sensor.yml index 466685b31..69aba6bc0 100644 --- a/PythonAPI/docs/sensor.yml +++ b/PythonAPI/docs/sensor.yml @@ -8,21 +8,21 @@ doc: > Sensors compound a specific family of actors quite diverse and unique. They are normally spawned as attachment/sons of a vehicle (take a look at carla.World to learn about actor spawning). Sensors are thoroughly designed to retrieve different types of data that they are listening to. The data they receive is shaped as different subclasses inherited from carla.SensorData (depending on the sensor). - Most sensors can be divided in two groups: those receiving data on every tick (cameras, point clouds and some specific sensors) and those who only receive under certain circumstances (trigger detectors). CARLA provides a specific set of sensors and their blueprint can be found in carla.BlueprintLibrary. All the information on their preferences and settlement can be found [here](ref_sensors.md), but the list of those available in CARLA so far goes as follow. - Receive data on every tick. - - [Depth camera](ref_sensors.md#depth-camera). - - [Gnss sensor](ref_sensors.md#gnss-sensor). - - [IMU sensor](ref_sensors.md#imu-sensor). - - [Lidar raycast](ref_sensors.md#lidar-raycast-sensor). - - [SemanticLidar raycast](ref_sensors.md#semanticlidar-raycast-sensor). - - [Radar](ref_sensors.md#radar-sensor). - - [RGB camera](ref_sensors.md#rgb-camera). - - [RSS sensor](ref_sensors.md#rss-sensor). - - [Semantic Segmentation camera](ref_sensors.md#semantic-segmentation-camera). - Only receive data when triggered. - - [Collision detector](ref_sensors.md#collision-detector). - - [Lane invasion detector](ref_sensors.md#lane-invasion-detector). - - [Obstacle detector](ref_sensors.md#obstacle-detector). + Most sensors can be divided in two groups: those receiving data on every tick (cameras, point clouds and some specific sensors) and those who only receive under certain circumstances (trigger detectors). CARLA provides a specific set of sensors and their blueprint can be found in carla.BlueprintLibrary. All the information on their preferences and settlement can be found [here](ref_sensors.md), but the list of those available in CARLA so far goes as follow. +
Receive data on every tick. + - [Depth camera](ref_sensors.md#depth-camera). + - [Gnss sensor](ref_sensors.md#gnss-sensor). + - [IMU sensor](ref_sensors.md#imu-sensor). + - [Lidar raycast](ref_sensors.md#lidar-raycast-sensor). + - [SemanticLidar raycast](ref_sensors.md#semanticlidar-raycast-sensor). + - [Radar](ref_sensors.md#radar-sensor). + - [RGB camera](ref_sensors.md#rgb-camera). + - [RSS sensor](ref_sensors.md#rss-sensor). + - [Semantic Segmentation camera](ref_sensors.md#semantic-segmentation-camera). +
Only receive data when triggered. + - [Collision detector](ref_sensors.md#collision-detector). + - [Lane invasion detector](ref_sensors.md#lane-invasion-detector). + - [Obstacle detector](ref_sensors.md#obstacle-detector). # - PROPERTIES ------------------------- instance_variables: diff --git a/PythonAPI/docs/sensor_data.yml b/PythonAPI/docs/sensor_data.yml index 56af9815e..4ea1c3e86 100644 --- a/PythonAPI/docs/sensor_data.yml +++ b/PythonAPI/docs/sensor_data.yml @@ -205,8 +205,9 @@ Number of lasers shot. - var_name: horizontal_angle type: float + var_units: radians doc: > - Horizontal angle the LIDAR is rotated at the time of the measurement (in radians). + Horizontal angle the LIDAR is rotated at the time of the measurement. - var_name: raw_data type: bytes doc: > @@ -266,12 +267,12 @@ - var_name: object_idx type: uint doc: > - [CARLA index](https://carla.readthedocs.io/en/latest/ref_sensors/#semantic-segmentation-camera) of the hit actor. + ID of the actor hit by the ray. # -------------------------------------- - var_name: object_tag type: uint doc: > - [Semantic tag](https://carla.readthedocs.io/en/latest/ref_sensors/#semantic-segmentation-camera) of the hit component. + [Semantic tag](https://carla.readthedocs.io/en/latest/ref_sensors/#semantic-segmentation-camera) of the component hit by the ray. # - METHODS ---------------------------- methods: - def_name: __str__