smarts.core.waypoints module

class smarts.core.waypoints.LinkedWaypoint(wp, is_shape_wp, nexts)[source]
property is_shape_wp

Alias for field number 1

property nexts

Alias for field number 2

property wp

Alias for field number 0

class smarts.core.waypoints.Waypoint(pos: ‘np.ndarray’, heading: ‘Heading’, lane_width: ‘float’, speed_limit: ‘float’, lane_id: ‘str’, lane_index: ‘int’)[source]
dist_to(p)[source]

Calculates straight line distance to the given 2D point

heading: smarts.core.coordinates.Heading
lane_id: str
lane_index: int
lane_width: float
pos: numpy.ndarray
property pose
relative_heading(h: smarts.core.coordinates.Heading)[source]

Computes relative heading between the given angle and the waypoint heading

Returns

[-pi..pi]

Return type

relative_heading

signed_lateral_error(p)[source]

Returns the signed lateral distance from the given point to the line formed by the waypoint position and the waypoints heading.

Negative signals right of line and Positive left of line

speed_limit: float
class smarts.core.waypoints.Waypoints(road_network, spacing, debug=True)[source]
closest_waypoint(pose, filter_from_count=10, within_radius=10)[source]
closest_waypoint_batched(poses, filter_from_count, within_radius)[source]
closest_waypoint_on_lane(pose, lane_id)[source]
closest_waypoint_on_lane_to_point(position, lane_id)[source]
closest_waypoints(point, desired_count)[source]
random_waypoint()[source]
random_waypoints(n, replace=False)[source]
waypoint_paths_along_route(point, lookahead, route)[source]
waypoint_paths_at(pose, lookahead, filter_from_count=3, within_radius=5)[source]
waypoint_paths_on_lane_at(point, lane_id, lookahead, filter_edge_ids: Optional[Sequence[str]] = None)[source]