pub struct StateLattice { /* private fields */ }Expand description
State Lattice Planner
Implementations§
Source§impl StateLattice
impl StateLattice
pub fn new(config: StateLatticeConfig) -> Self
pub fn with_defaults() -> Self
Sourcepub fn set_lookup_table_from_csv(&mut self, csv_data: &str)
pub fn set_lookup_table_from_csv(&mut self, csv_data: &str)
Set lookup table from CSV data
Sourcepub fn set_initial_curvature(&mut self, k0: f64)
pub fn set_initial_curvature(&mut self, k0: f64)
Set initial curvature
Sourcepub fn config(&self) -> &StateLatticeConfig
pub fn config(&self) -> &StateLatticeConfig
Get configuration
Sourcepub fn calc_uniform_polar_states(&self) -> Vec<TargetPose>
pub fn calc_uniform_polar_states(&self) -> Vec<TargetPose>
Calculate uniform polar states
Sourcepub fn calc_biased_polar_states(&self, goal_angle: f64) -> Vec<TargetPose>
pub fn calc_biased_polar_states(&self, goal_angle: f64) -> Vec<TargetPose>
Calculate biased polar states toward a goal
Sourcepub fn calc_lane_states(&self) -> Vec<TargetPose>
pub fn calc_lane_states(&self) -> Vec<TargetPose>
Calculate lane states for structured driving
Sourcepub fn generate_paths(&self, targets: &[TargetPose]) -> Vec<Trajectory>
pub fn generate_paths(&self, targets: &[TargetPose]) -> Vec<Trajectory>
Generate paths to target states
Sourcepub fn plan_uniform_polar(&self) -> Vec<Trajectory>
pub fn plan_uniform_polar(&self) -> Vec<Trajectory>
Generate paths using uniform polar sampling
Sourcepub fn plan_biased_polar(&self, goal_angle: f64) -> Vec<Trajectory>
pub fn plan_biased_polar(&self, goal_angle: f64) -> Vec<Trajectory>
Generate paths using biased polar sampling
Sourcepub fn plan_lane_states(&self) -> Vec<Trajectory>
pub fn plan_lane_states(&self) -> Vec<Trajectory>
Generate paths using lane sampling
Sourcepub fn plan(
&self,
start: Point2D,
goal: Point2D,
) -> Result<Path2D, RoboticsError>
pub fn plan( &self, start: Point2D, goal: Point2D, ) -> Result<Path2D, RoboticsError>
Plan a path from start to goal using state lattice
Sourcepub fn plan_with_obstacles(
&self,
goal: Point2D,
obstacles: &Obstacles,
robot_radius: f64,
) -> Result<ObstacleAwarePlanResult, RoboticsError>
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.
Sourcepub 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>
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§
impl Freeze for StateLattice
impl RefUnwindSafe for StateLattice
impl Send for StateLattice
impl Sync for StateLattice
impl Unpin for StateLattice
impl UnsafeUnpin for StateLattice
impl UnwindSafe for StateLattice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.