smarts.sstudio.sstypes.map_spec module

class smarts.sstudio.sstypes.map_spec.MapSpec(source: str, lanepoint_spacing: float = 1.0, default_lane_width: float | None = None, shift_to_origin: bool = False, builder_fn: ~typing.Callable[[~typing.Any], ~typing.Tuple[~smarts.core.road_map.RoadMap | None, str | None]] = <function get_road_map>)[source]

A map specification that describes how to generate a roadmap.

builder_fn() Tuple[RoadMap | None, str | None]

If specified, this should return an object derived from the RoadMap base class and a hash that uniquely identifies it (changes to the hash should signify that the map is different enough that map-related caches should be reloaded). The parameter is this MapSpec object itself. If not specified, this currently defaults to a function that creates SUMO road networks (get_road_map()) in smarts.core.default_map_builder.

default_lane_width: float | None = None

If specified, the default width (in meters) of lanes on this map.

lanepoint_spacing: float = 1.0

The default distance between pre-generated Lane Points (Waypoints).

shift_to_origin: bool = False

If True, upon creation a map whose bounding-box does not intersect with the origin point (0,0) will be shifted such that it does.

source: str

A path or URL or name uniquely designating the map source.