smarts.core.lanepoints module
- class smarts.core.lanepoints.LanePoint(lane: RoadMap.Lane, pose: Pose, lane_width: float)[source]
A point on a lane.
- lane: RoadMap.Lane
The lane this point is on.
- lane_width: float
The width of the lane at this point.
- class smarts.core.lanepoints.LanePoints(shape_lps: List[LinkedLanePoint], spacing: float)[source]
A LanePoint utility class.
- closest_lanepoints(pose: Pose, maximum_count: int = 10) List[LanePoint] [source]
Get the lane-points closest to the given pose. :param pose: The pose to look around for lane-points. :param maximum_count: The maximum number of lane-points that should be found.
- closest_linked_lanepoint_on_lane_to_point(point: Point, lane_id: str) LinkedLanePoint [source]
Returns the closest linked lane-point on the given lane.
- closest_linked_lanepoint_on_road(point: Point, road_id: str) LinkedLanePoint [source]
Returns the closest linked lane-point on the given road.
- classmethod from_argoverse(argoverse_map, spacing)[source]
Computes the lane shape (start/shape/end) lane-points for all lanes in the network, the result of this function can be used to interpolate lane-points along lanes to the desired granularity.
- classmethod from_opendrive(od_road_network, spacing)[source]
Computes the lane shape (start/shape/end) lane-points for all lanes in the network, the result of this function can be used to interpolate lane-points along lanes to the desired granularity.
- classmethod from_sumo(sumo_road_network, spacing)[source]
Computes the lane shape (start/shape/end) lane-points for all lanes in the network, the result of this function can be used to interpolate lane-points along lanes to the desired granularity.
- classmethod from_waymo(waymo_road_network, spacing)[source]
Computes the lane shape (start/shape/end) lane-points for all lanes in the network, the result of this function can be used to interpolate lane-points along lanes to the desired granularity.
- paths_starting_at_lanepoint(lanepoint: LinkedLanePoint, lookahead: int, route_edge_ids: tuple) List[List[LinkedLanePoint]] [source]
Returns all full branches from the given lane-point up to the length of the look-ahead. Branches will be filtered at the lane level if they or their outgoing lanes do not belong to a road in the route edge list. :param lanepoint: The starting lane-point. :type lanepoint: LinkedLanePoint :param lookahead: The maximum lane-points in a branch. :type lookahead: int :param route_edge_ids: White-listed edge ids for a route. :type route_edge_ids: Tuple[str]
- Returns:
All branches (as lists) stemming from the input lane-point.
- class smarts.core.lanepoints.LinkedLanePoint(lp: LanePoint = None, is_inferred: bool = True, nexts: List[LinkedLanePoint] = [])[source]
A lane point that is linked to the next points in the road network.
- is_inferred: bool
Alias for field number 1
- nexts: List[LinkedLanePoint]
Alias for field number 2