verse.map.lane_segment_3d.CircularLane_3d_v1
- class verse.map.lane_segment_3d.CircularLane_3d_v1(id, center: ndarray | Sequence[float], radius: float, norm_vec: ndarray | Sequence[float], start_phase: float, end_phase: float, right_rotate: bool = True, width: float = 4, line_types: List[LineType_3d] = None, forbidden: bool = False, speed_limit: float = 20, priority: int = 0)
Bases:
AbstractLane_3d
A lane going in circle arc.
Methods
altitude
()Get the lane altitude (avg z of the start and end point)
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
ABCMeta
on_lane
(position[, longitudinal, lateral, ...])Whether a given world position is on the lane.
position
(longitudinal, lateral, theta)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
get_lane_center
get_outer_center
get_sample_points
get_start_end_tang
get_tang
- __init__(id, center: ndarray | Sequence[float], radius: float, norm_vec: ndarray | Sequence[float], start_phase: float, end_phase: float, right_rotate: bool = True, width: float = 4, line_types: List[LineType_3d] = None, forbidden: bool = False, speed_limit: float = 20, priority: int = 0) None
- altitude()
Get the lane altitude (avg z of the start and end point)
- Returns:
the lane altitude [m]
- 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
- abstract 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, 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, theta: 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]