verse.map.lane_segment.CircularLane
- class verse.map.lane_segment.CircularLane(id, center: ndarray | Sequence[float], radius: float, start_phase: float, end_phase: float, clockwise: bool = True, width: float = 4, line_types: List[LineType] = None, forbidden: bool = False, speed_limit: float = 20, priority: int = 0)
 Bases:
AbstractLaneA lane going in circle arc.
Methods
distance(position)Compute the L1 distance [m] from a position to the lane.
distance_with_heading(position, heading[, ...])Compute a weighted distance in position and heading to the lane.
from_config(config)Create lane instance from config
heading_at(longitudinal)Get the lane heading at a given longitudinal lane coordinate.
is_reachable_from(position)Whether the lane is reachable from a given world position
local_coordinates(position)Convert a world position to local lane coordinates.
alias of
ABCMetaon_lane(position[, longitudinal, lateral, ...])Whether a given world position is on the lane.
position(longitudinal, lateral)Convert local lane coordinates to a world position.
Write lane parameters to dict which can be serialized to json
width_at(longitudinal)Get the lane width at a given longitudinal lane coordinate.
after_end
- __init__(id, center: ndarray | Sequence[float], radius: float, start_phase: float, end_phase: float, clockwise: bool = True, width: float = 4, line_types: List[LineType] = None, forbidden: bool = False, speed_limit: float = 20, priority: int = 0) None
 
- distance(position: ndarray)
 Compute the L1 distance [m] from a position to the lane.
- distance_with_heading(position: ndarray, heading: float | None, heading_weight: float = 1.0)
 Compute a weighted distance in position and heading to the lane.
- classmethod from_config(config: dict)
 Create lane instance from config
- Parameters:
 config – json dict with lane parameters
- heading_at(longitudinal: float) float
 Get the lane heading at a given longitudinal lane coordinate.
- Parameters:
 longitudinal – longitudinal lane coordinate [m]
- Returns:
 the lane heading [rad]
- is_reachable_from(position: ndarray) bool
 Whether the lane is reachable from a given world position
- Parameters:
 position – the world position [m]
- Returns:
 is the lane reachable?
- local_coordinates(position: ndarray) Tuple[float, float]
 Convert a world position to local lane coordinates.
- Parameters:
 position – a world position [m]
- Returns:
 the (longitudinal, lateral) lane coordinates [m]
- metaclass__
 alias of
ABCMeta
- on_lane(position: ndarray, longitudinal: float = None, lateral: float = None, margin: float = 0) bool
 Whether a given world position is on the lane.
- Parameters:
 position – a world position [m]
longitudinal – (optional) the corresponding longitudinal lane coordinate, if known [m]
lateral – (optional) the corresponding lateral lane coordinate, if known [m]
margin – (optional) a supplementary margin around the lane width
- Returns:
 is the position on the lane?
- position(longitudinal: float, lateral: float) ndarray
 Convert local lane coordinates to a world position.
- Parameters:
 longitudinal – longitudinal lane coordinate [m]
lateral – lateral lane coordinate [m]
- Returns:
 the corresponding world position [m]
- to_config() dict
 Write lane parameters to dict which can be serialized to json
- Returns:
 dict of lane parameters
- width_at(longitudinal: float) float
 Get the lane width at a given longitudinal lane coordinate.
- Parameters:
 longitudinal – longitudinal lane coordinate [m]
- Returns:
 the lane width [m]