Docs/updates april (#7417)

* fixed typos and broken links

* updated python_api.md

* fixed CityObjectLabel API docs

* added load_world_if_different to API docs
This commit is contained in:
MattRoweEAIF 2024-04-12 14:33:03 +02:00 committed by GitHub
parent 5992cdbb06
commit 054dae3a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 50 additions and 2 deletions

View File

@ -434,7 +434,13 @@ Enum declaration that contains the different tags available to filter the boundi
- <a name="carla.CityObjectLabel.Sidewalks"></a>**<font color="#f8805a">Sidewalks</font>**
- <a name="carla.CityObjectLabel.TrafficSigns"></a>**<font color="#f8805a">TrafficSigns</font>**
- <a name="carla.CityObjectLabel.Vegetation"></a>**<font color="#f8805a">Vegetation</font>**
- <a name="carla.CityObjectLabel.Vehicles"></a>**<font color="#f8805a">Vehicles</font>**
- <a name="carla.CityObjectLabel.Car"></a>**<font color="#f8805a">Car</font>**
- <a name="carla.CityObjectLabel.Bus"></a>**<font color="#f8805a">Bus</font>**
- <a name="carla.CityObjectLabel.Truck"></a>**<font color="#f8805a">Truck</font>**
- <a name="carla.CityObjectLabel.Motorcycle"></a>**<font color="#f8805a">Motorcycle</font>**
- <a name="carla.CityObjectLabel.Bicycle"></a>**<font color="#f8805a">Bicycle</font>**
- <a name="carla.CityObjectLabel.Rider"></a>**<font color="#f8805a">Rider</font>**
- <a name="carla.CityObjectLabel.Train"></a>**<font color="#f8805a">Train</font>**
- <a name="carla.CityObjectLabel.Walls"></a>**<font color="#f8805a">Walls</font>**
- <a name="carla.CityObjectLabel.Sky"></a>**<font color="#f8805a">Sky</font>**
- <a name="carla.CityObjectLabel.Ground"></a>**<font color="#f8805a">Ground</font>**
@ -484,6 +490,16 @@ Creates a new world with default settings using `map_name` map. All actors in th
- `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.
- `reset_settings` (_bool_) - 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.
- `map_layers` (_[carla.MapLayer](#carla.MapLayer)_) - Layers of the map that will be loaded. By default all layers are loaded. This parameter works like a flag mask.
- **Return:** _[carla.World](#carla.World)_
- **Warning:** <font color="#ED2F2F">_`map_layers` are only available for "Opt" maps
_</font>
- <a name="carla.Client.load_world_if_different"></a>**<font color="#7fb800">load_world_if_different</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**map_name**</font>, <font color="#00a6ed">**reset_settings**=True</font>, <font color="#00a6ed">**map_layers**=[carla.MapLayer.All](#carla.MapLayer.All)</font>)
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.
- **Parameters:**
- `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.
- `reset_settings` (_bool_) - 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.
- `map_layers` (_[carla.MapLayer](#carla.MapLayer)_) - Layers of the map that will be loaded. By default all layers are loaded. This parameter works like a flag mask.
- **Return:** _[carla.World](#carla.World)_
- **Warning:** <font color="#ED2F2F">_`map_layers` are only available for "Opt" maps
_</font>
- <a name="carla.Client.reload_world"></a>**<font color="#7fb800">reload_world</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**reset_settings**=True</font>)

View File

@ -101,6 +101,7 @@
doc: >
Layers of the map that will be loaded. By default all layers are loaded.
This parameter works like a flag mask.
return: carla.World
warning: >
`map_layers` are only available for "Opt" maps
doc: >
@ -119,6 +120,31 @@
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.
# --------------------------------------
- def_name: load_world_if_different
params:
- param_name: map_name
type: str
doc: >
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.
- param_name: reset_settings
type: bool
default: true
doc: >
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.
- param_name: map_layers
type: carla.MapLayer
default: carla.MapLayer.All
doc: >
Layers of the map that will be loaded. By default all layers are loaded.
This parameter works like a flag mask.
return: carla.World
warning: >
`map_layers` are only available for "Opt" maps
doc: >
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.
# --------------------------------------
- def_name: replay_file
params:

View File

@ -70,7 +70,13 @@
- var_name: Sidewalks
- var_name: TrafficSigns
- var_name: Vegetation
- var_name: Vehicles
- var_name: Car
- var_name: Bus
- var_name: Truck
- var_name: Motorcycle
- var_name: Bicycle
- var_name: Rider
- var_name: Train
- var_name: Walls
- var_name: Sky
- var_name: Ground