torchdrivesim.map¶
Classes¶
Functions¶
|
|
|
|
|
|
|
|
|
To retrieve configs for maps not bundled with the package, |
|
Downloads the map information using LOCATION_INFO from the Inverted AI API. |
|
|
|
Module Contents¶
- class torchdrivesim.map.MapConfig[source]¶
Encapsulates various map metadata, including where to find files defining the map. Map definition includes a coordinate frame and traffic signals.
- property road_mesh: torchdrivesim.mesh.BirdviewMesh | None[source]¶
- property traffic_light_controller: torchdrivesim.traffic_lights.TrafficLightController | None[source]¶
- torchdrivesim.map.store_map_config(cfg: MapConfig, json_path: str, store_absolute_paths: bool = False) None [source]¶
- torchdrivesim.map.find_map_config(map_name: str, resolve_paths: bool = True) MapConfig | None [source]¶
To retrieve configs for maps not bundled with the package, folders with corresponding names must be placed inside one of the directories listed in TDS_RESOURCE_PATH environment variable. Note that map names should be globally unique.
- torchdrivesim.map.download_iai_map(location_name: str, save_path: str) None [source]¶
Downloads the map information using LOCATION_INFO from the Inverted AI API. IAI_API_KEY needs to be set for this to succeed. Basename of save_path will be used as the map name for TorchDriveSim. If the dirpath of save_path is in TDS_RESOURCE_PATH, the map will be immediately available in find_map_config.
- torchdrivesim.map.traffic_controls_from_map_config(cfg: MapConfig) Dict[str, torchdrivesim.traffic_controls.BaseTrafficControl] [source]¶