smarts.sstudio.sstypes.route module

class smarts.sstudio.sstypes.route.JunctionEdgeIDResolver(start_edge_id: str, start_lane_index: int, end_edge_id: str, end_lane_index: int)[source]

A utility for resolving a junction connection edge

end_edge_id: str
end_lane_index: int
start_edge_id: str
start_lane_index: int
to_edge(sumo_road_network) str[source]

Queries the road network to see if there is a junction edge between the two given edges.

class smarts.sstudio.sstypes.route.RandomRoute(id: str = <factory>, map_spec: ~smarts.sstudio.sstypes.map_spec.MapSpec | None = None)[source]

An alternative to types.Route which specifies to sstudio to generate a random route.

id: str
map_spec: MapSpec | None = None

All routes are relative to a road map. If not specified here, the default map_spec for the scenario is used.

class smarts.sstudio.sstypes.route.Route(begin: ~typing.Tuple[str, int, ~typing.Any], end: ~typing.Tuple[str, int, ~typing.Any], via: ~typing.Tuple[str, ...] = <factory>, map_spec: ~smarts.sstudio.sstypes.map_spec.MapSpec | None = None)[source]

A route is represented by begin and end road IDs, with an optional list of intermediary road IDs. When an intermediary is not specified the router will decide what it should be.

begin: Tuple[str, int, Any]

The (road, lane_index, offset) details of the start location for the route.

road:

The starting road by name.

lane_index:

The lane index from the rightmost lane.

offset:

The offset in meters into the lane. Also acceptable: “max”, “random”

end: Tuple[str, int, Any]

The (road, lane_index, offset) details of the end location for the route.

road:

The starting road by name.

lane_index:

The lane index from the rightmost lane.

offset:

The offset in meters into the lane. Also acceptable: “max”, “random”

property id: str

The unique id of this route.

map_spec: MapSpec | None = None

All routes are relative to a road map. If not specified here, the default map_spec for the scenario is used.

property roads

All roads that are used within this route.

via: Tuple[str, ...]

The ids of roads that must be included in the route between begin and end.