pub struct PusherSliderParams {
pub half_extent: f64,
pub char_len: f64,
pub pusher_friction: f64,
}Expand description
Quasi-static pusher-slider parameters.
Fields§
§half_extent: f64Half side length of the square slider [m].
char_len: f64Limit-surface characteristic length c [m] (couples force to torque).
pusher_friction: f64Coulomb friction coefficient between pusher and slider.
Implementations§
Source§impl PusherSliderParams
impl PusherSliderParams
pub fn new( half_extent: f64, char_len: f64, pusher_friction: f64, ) -> RoboticsResult<Self>
Sourcepub fn step(
self,
state: SliderState,
command: PusherCommand,
dt: f64,
) -> (SliderState, ContactMode)
pub fn step( self, state: SliderState, command: PusherCommand, dt: f64, ) -> (SliderState, ContactMode)
Advance the slider one quasi-static step, returning the new state and the realized contact mode.
Sourcepub fn contact_point(
self,
state: SliderState,
command: PusherCommand,
) -> [f64; 2]
pub fn contact_point( self, state: SliderState, command: PusherCommand, ) -> [f64; 2]
World-frame contact point for a command (useful for rendering).
Sourcepub fn two_contact_twist(
self,
c1: PusherCommand,
c2: PusherCommand,
) -> ([f64; 3], [ContactMode; 2])
pub fn two_contact_twist( self, c1: PusherCommand, c2: PusherCommand, ) -> ([f64; 3], [ContactMode; 2])
Body-frame slider twist [vx, vy, omega] and per-contact modes for two
simultaneous point contacts, solved contact-implicitly.
Each contact maintains its commanded normal speed; its tangential degree
of freedom is either sticking (tangential contact-point velocity matches
the pusher) or sliding (the tangential force saturates the friction cone).
The realized regime is found by enumerating the per-contact stick/slide
modes, solving the resulting 4x4 contact-force system, and keeping the
first combination whose forces are pushing (fn >= 0), respect the
friction cone (stick) or sit on the correct cone edge with a consistent
slip direction (slide).
Sourcepub fn two_contact_step(
self,
state: SliderState,
c1: PusherCommand,
c2: PusherCommand,
dt: f64,
) -> (SliderState, [ContactMode; 2])
pub fn two_contact_step( self, state: SliderState, c1: PusherCommand, c2: PusherCommand, dt: f64, ) -> (SliderState, [ContactMode; 2])
Advance the slider one quasi-static step under two simultaneous contacts.
Trait Implementations§
Source§impl Clone for PusherSliderParams
impl Clone for PusherSliderParams
Source§fn clone(&self) -> PusherSliderParams
fn clone(&self) -> PusherSliderParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PusherSliderParams
impl Debug for PusherSliderParams
Source§impl Default for PusherSliderParams
impl Default for PusherSliderParams
Source§impl PartialEq for PusherSliderParams
impl PartialEq for PusherSliderParams
Source§fn eq(&self, other: &PusherSliderParams) -> bool
fn eq(&self, other: &PusherSliderParams) -> bool
self and other values to be equal, and is used by ==.impl Copy for PusherSliderParams
impl StructuralPartialEq for PusherSliderParams
Auto Trait Implementations§
impl Freeze for PusherSliderParams
impl RefUnwindSafe for PusherSliderParams
impl Send for PusherSliderParams
impl Sync for PusherSliderParams
impl Unpin for PusherSliderParams
impl UnsafeUnpin for PusherSliderParams
impl UnwindSafe for PusherSliderParams
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> 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>
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.