Corrected typo for set_hybrid_physics_radius in Python API, corrected reference in TM docs and removed reset_traffic_lights from Python API reference.

This commit is contained in:
corkyw10 2021-03-16 11:07:00 +01:00 committed by Corinne
parent 055e627ee6
commit 492b477ae0
3 changed files with 6 additions and 12 deletions

View File

@ -318,7 +318,7 @@ The hybrid mode is disabled by default. There are two ways to enable it.
The are two parameters ruling the hybrid mode. One is the __radius__ that states the proximity area around any ego vehicle where physics are enabled. The other is the __vehicle__ with , that will act as center of this radius. The are two parameters ruling the hybrid mode. One is the __radius__ that states the proximity area around any ego vehicle where physics are enabled. The other is the __vehicle__ with , that will act as center of this radius.
* __Radius__ *(default = 70 meters)* — States the proximity area around the ego vehicle where physics are enabled. The value be changed with [traffic_manager.set_hybrid_mode_radius(r)](https://carla.readthedocs.io/en/latest/python_api/#carla.TrafficManager.set_hybrid_mode_radius). * __Radius__ *(default = 70 meters)* — States the proximity area around the ego vehicle where physics are enabled. The value be changed with [traffic_manager.set_hybrid_physics_radius(r)](python_api.md#carla.TrafficManager.set_hybrid_physics_radius).
* __Ego vehicle__ — A vehicle tagged with `role_name='hero'` that will act of the radius. * __Ego vehicle__ — A vehicle tagged with `role_name='hero'` that will act of the radius.
* __If there is none,__ all the vehicles will disable physics. * __If there is none,__ all the vehicles will disable physics.
* __If there are many,__ the radius will be considered for all of them. That will create different areas of influence with physics enabled. * __If there are many,__ the radius will be considered for all of them. That will create different areas of influence with physics enabled.

View File

@ -2117,8 +2117,6 @@ During the collision detection stage, which runs every frame, this method sets a
- **Parameters:** - **Parameters:**
- `actor` (_[carla.Actor](#carla.Actor)_) The vehicle that is going to ignore walkers on scene. - `actor` (_[carla.Actor](#carla.Actor)_) The vehicle that is going to ignore walkers on scene.
- `perc` (_float_) Between 0 and 100. Amount of times collisions will be ignored. - `perc` (_float_) Between 0 and 100. Amount of times collisions will be ignored.
- <a name="carla.TrafficManager.reset_traffic_lights"></a>**<font color="#7fb800">reset_traffic_lights</font>**(<font color="#00a6ed">**self**</font>)
Resets every traffic light in the map to its initial state.
- <a name="carla.TrafficManager.vehicle_percentage_speed_difference"></a>**<font color="#7fb800">vehicle_percentage_speed_difference</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**actor**</font>, <font color="#00a6ed">**percentage**</font>) - <a name="carla.TrafficManager.vehicle_percentage_speed_difference"></a>**<font color="#7fb800">vehicle_percentage_speed_difference</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**actor**</font>, <font color="#00a6ed">**percentage**</font>)
Sets the difference the vehicle's intended speed and its current speed limit. Speed limits can be exceeded by setting the `perc` to a negative value. Sets the difference the vehicle's intended speed and its current speed limit. Speed limits can be exceeded by setting the `perc` to a negative value.
Default is 30. Exceeding a speed limit can be done using negative percentages. Default is 30. Exceeding a speed limit can be done using negative percentages.
@ -2136,14 +2134,14 @@ Returns the port where the Traffic Manager is connected. If the object is a TM-C
Sets the minimum distance in meters that vehicles have to keep with the rest. The distance is in meters and will affect the minimum moving distance. It is computed from center to center of the vehicle objects. Sets the minimum distance in meters that vehicles have to keep with the rest. The distance is in meters and will affect the minimum moving distance. It is computed from center to center of the vehicle objects.
- **Parameters:** - **Parameters:**
- `distance` (_float<small> meters</small>_) Meters between vehicles. - `distance` (_float<small> meters</small>_) Meters between vehicles.
- <a name="carla.TrafficManager.set_hybrid_mode_radius"></a>**<font color="#7fb800">set_hybrid_mode_radius</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**r**=70.0</font>)
With hybrid physics on, changes the radius of the area of influence where physics are enabled.
- **Parameters:**
- `r` (_float<small> meters</small>_) New radius where physics are enabled.
- <a name="carla.TrafficManager.set_hybrid_physics_mode"></a>**<font color="#7fb800">set_hybrid_physics_mode</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**enabled**=False</font>) - <a name="carla.TrafficManager.set_hybrid_physics_mode"></a>**<font color="#7fb800">set_hybrid_physics_mode</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**enabled**=False</font>)
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. 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.
- **Parameters:** - **Parameters:**
- `enabled` (_bool_) If __True__, enables the hybrid physics. - `enabled` (_bool_) If __True__, enables the hybrid physics.
- <a name="carla.TrafficManager.set_hybrid_physics_radius"></a>**<font color="#7fb800">set_hybrid_physics_radius</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**r**=70.0</font>)
With hybrid physics on, changes the radius of the area of influence where physics are enabled.
- **Parameters:**
- `r` (_float<small> meters</small>_) New radius where physics are enabled.
- <a name="carla.TrafficManager.set_osm_mode"></a>**<font color="#7fb800">set_osm_mode</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**mode_switch**=True</font>) - <a name="carla.TrafficManager.set_osm_mode"></a>**<font color="#7fb800">set_osm_mode</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**mode_switch**=True</font>)
Enables or disables the OSM mode. This mode allows the user to run TM in a map created with the [OSM feature](tuto_G_openstreetmap.md). 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. Enables or disables the OSM mode. This mode allows the user to run TM in a map created with the [OSM feature](tuto_G_openstreetmap.md). 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.
- **Parameters:** - **Parameters:**

View File

@ -426,10 +426,6 @@
doc: > doc: >
During the collision detection stage, which runs every frame, this method sets a percent chance that collisions with walkers will be ignored for a vehicle. During the collision detection stage, which runs every frame, this method sets a percent chance that collisions with walkers will be ignored for a vehicle.
# -------------------------------------- # --------------------------------------
- def_name: reset_traffic_lights
doc: >
Resets every traffic light in the map to its initial state.
# --------------------------------------
- def_name: vehicle_percentage_speed_difference - def_name: vehicle_percentage_speed_difference
params: params:
- param_name: actor - param_name: actor
@ -471,7 +467,7 @@
doc: > doc: >
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. 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.
# -------------------------------------- # --------------------------------------
- def_name: set_hybrid_mode_radius - def_name: set_hybrid_physics_radius
params: params:
- param_name: r - param_name: r
type: float type: float