Skip to main content

StateLattice

pub struct StateLattice { /* private fields */ }
Expand description

State Lattice Planner

Implementations§

Source§

impl StateLattice

Source

pub fn new(config: StateLatticeConfig) -> Self

Source

pub fn with_defaults() -> Self

Source

pub fn set_lookup_table_from_csv(&mut self, csv_data: &str)

Set lookup table from CSV data

Source

pub fn set_initial_curvature(&mut self, k0: f64)

Set initial curvature

Source

pub fn config(&self) -> &StateLatticeConfig

Get configuration

Source

pub fn calc_uniform_polar_states(&self) -> Vec<TargetPose>

Calculate uniform polar states

Source

pub fn calc_biased_polar_states(&self, goal_angle: f64) -> Vec<TargetPose>

Calculate biased polar states toward a goal

Source

pub fn calc_lane_states(&self) -> Vec<TargetPose>

Calculate lane states for structured driving

Source

pub fn generate_paths(&self, targets: &[TargetPose]) -> Vec<Trajectory>

Generate paths to target states

Source

pub fn plan_uniform_polar(&self) -> Vec<Trajectory>

Generate paths using uniform polar sampling

Source

pub fn plan_biased_polar(&self, goal_angle: f64) -> Vec<Trajectory>

Generate paths using biased polar sampling

Source

pub fn plan_lane_states(&self) -> Vec<Trajectory>

Generate paths using lane sampling

Source

pub fn plan( &self, start: Point2D, goal: Point2D, ) -> Result<Path2D, RoboticsError>

Plan a path from start to goal using state lattice

Source

pub fn plan_with_obstacles( &self, goal: Point2D, obstacles: &Obstacles, robot_radius: f64, ) -> Result<ObstacleAwarePlanResult, RoboticsError>

Plan the best collision-free trajectory considering obstacles.

Generates candidate trajectories using biased polar sampling toward the goal, checks each against obstacles, scores them, and returns the best collision-free trajectory.

All coordinates are in the ego frame (vehicle at origin heading along +x). Transform obstacles into the ego frame before calling.

Source

pub fn plan_from_pose_with_obstacles( &self, pose_x: f64, pose_y: f64, pose_yaw: f64, goal: Point2D, obstacles: &Obstacles, robot_radius: f64, ) -> Result<ObstacleAwarePlanResult, RoboticsError>

Plan from a world-frame pose with obstacles, returning a world-frame result.

Transforms obstacles into the ego frame, plans, then transforms the result back to world frame.

Auto Trait Implementations§

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V