maliput::api

Struct Lane

Source
pub struct Lane<'a> { /* private fields */ }
Expand description

A maliput::api::Lane Wrapper around C++ implementation maliput::api::Lane.

Implementations§

Source§

impl<'a> Lane<'a>

Source

pub fn index(&self) -> i32

Returns the index of this Lane within the Segment which owns it.

Source

pub fn to_left(&self) -> Option<Lane<'_>>

Get the left lane of the Lane.

Source

pub fn to_right(&self) -> Option<Lane<'_>>

Get the right lane of the Lane.

Source

pub fn length(&self) -> f64

Get the length of the Lane.

Source

pub fn id(&self) -> String

Get the id of the Lane as a string.

Source

pub fn segment(&self) -> Segment<'a>

Returns the Segment to which this Lane belongs.

Source

pub fn get_orientation(&self, lane_position: &LanePosition) -> Rotation

Get the orientation of the Lane at the given LanePosition.

Source

pub fn to_inertial_position( &self, lane_position: &LanePosition, ) -> InertialPosition

Get the inertial position of the Lane at the given LanePosition.

Source

pub fn to_lane_position( &self, inertial_position: &InertialPosition, ) -> LanePositionResult

Determines the LanePosition corresponding to InertialPosition inertial_position. The LanePosition is expected to be contained within the lane’s boundaries. See Lane::to_segment_position method.

This method guarantees that its result satisfies the condition that to_inertial_position(result.lane_position) is within linear_tolerance() of result.nearest_position.

Source

pub fn to_segment_position( &self, inertial_position: &InertialPosition, ) -> LanePositionResult

Determines the LanePosition corresponding to InertialPosition inertial_position. The LanePosition is expected to be contained within the segment’s boundaries. See Lane::to_lane_position method.

This method guarantees that its result satisfies the condition that to_inertial_position(result.lane_position) is within linear_tolerance() of result.nearest_position.

Source

pub fn lane_bounds(&self, s: f64) -> RBounds

Get the lane bounds of the Lane at the given s.

Source

pub fn segment_bounds(&self, s: f64) -> RBounds

Get the segment bounds of the Lane at the given s.

Source

pub fn elevation_bounds(&self, s: f64, r: f64) -> HBounds

Get the elevation bounds of the Lane at the given s and r.

Source

pub fn eval_motion_derivatives( &self, lane_position: &LanePosition, velocity: &IsoLaneVelocity, ) -> LanePosition

Computes derivatives of LanePosition given a velocity vector velocity. velocity is a isometric velocity vector oriented in the Lane-frame at position.

Returns Lane-frame derivatives packed into a LanePosition struct.

Source

pub fn get_branch_point(&self, end: &LaneEnd<'_>) -> BranchPoint<'_>

Returns the lane’s BranchPoint for the specified end.

Source

pub fn get_confluent_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>

Returns the set of LaneEnd’s which connect with this lane on the same side of the BranchPoint at end. At a minimum, this set will include this Lane.

Source

pub fn get_ongoing_branches(&self, end: &LaneEnd<'_>) -> LaneEndSet<'_>

Returns the set of LaneEnd’s which continue onward from this lane at the BranchPoint at end.

Source

pub fn get_default_branch(&self, end: &LaneEnd<'_>) -> Option<LaneEnd<'_>>

Returns the default ongoing LaneEnd connected at end, or None if no default branch has been established.

Source

pub fn contains(&self, lane_position: &LanePosition) -> bool

Check if the Lane contains the given LanePosition.

Trait Implementations§

Source§

impl Clone for Lane<'_>

Copy trait for Lane. A reference to the Lane is copied.

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Lane<'a>

§

impl<'a> RefUnwindSafe for Lane<'a>

§

impl<'a> !Send for Lane<'a>

§

impl<'a> !Sync for Lane<'a>

§

impl<'a> Unpin for Lane<'a>

§

impl<'a> UnwindSafe for Lane<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.