pub struct MppiGateRace2D {
pub gates: Vec<MppiRacingGate2D>,
pub progress_weight: f64,
pub lateral_weight: f64,
pub pass_bonus: f64,
pub miss_penalty: f64,
pub terminal_gate_weight: f64,
pub crossing_tolerance: f64,
/* private fields */
}Expand description
Reference-free gate-progress objective for race-style MPPI.
The per-step progress term follows the racing-MPPI idea of minimizing the change in squared distance to the active gate. Moving toward the gate creates negative cost, moving away creates positive cost, and a valid gate crossing switches the rollout to the next gate.
Fields§
§gates: Vec<MppiRacingGate2D>§progress_weight: f64§lateral_weight: f64§pass_bonus: f64§miss_penalty: f64§terminal_gate_weight: f64§crossing_tolerance: f64Implementations§
Source§impl MppiGateRace2D
impl MppiGateRace2D
pub fn new(gates: Vec<MppiRacingGate2D>) -> RoboticsResult<Self>
pub fn gate_count(&self) -> usize
pub fn active_gate_index(&self) -> usize
pub fn reset(&mut self)
pub fn set_active_gate_index( &mut self, active_gate_index: usize, ) -> RoboticsResult<()>
pub fn advance_active_gate_from_state(&mut self, state: MppiState2D) -> usize
pub fn score_trajectory( &self, states: &[MppiState2D], ) -> RoboticsResult<MppiGateRaceReport2D>
Trait Implementations§
Source§impl Clone for MppiGateRace2D
impl Clone for MppiGateRace2D
Source§fn clone(&self) -> MppiGateRace2D
fn clone(&self) -> MppiGateRace2D
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MppiGateRace2D
impl Debug for MppiGateRace2D
Source§impl PartialEq for MppiGateRace2D
impl PartialEq for MppiGateRace2D
Source§fn eq(&self, other: &MppiGateRace2D) -> bool
fn eq(&self, other: &MppiGateRace2D) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MppiGateRace2D
Auto Trait Implementations§
impl Freeze for MppiGateRace2D
impl RefUnwindSafe for MppiGateRace2D
impl Send for MppiGateRace2D
impl Sync for MppiGateRace2D
impl Unpin for MppiGateRace2D
impl UnsafeUnpin for MppiGateRace2D
impl UnwindSafe for MppiGateRace2D
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.