pub struct PySteering {
pub rack_ratio: f64,
pub max_wheel_angle: f64,
pub four_ws: bool,
pub rear_steer_ratio: f64,
pub wheelbase: f64,
pub track_width: f64,
pub steering_damping: f64,
pub input: f64,
}Expand description
Steering system with Ackermann geometry and 4WS option.
Fields§
§rack_ratio: f64Steering rack ratio (radians of wheel turn per radian of steering input).
max_wheel_angle: f64Maximum steering angle at the wheels (rad).
four_ws: boolWhether four-wheel steering is active.
rear_steer_ratio: f64Rear steer angle ratio relative to front (0 = no rear steer, negative = counter-steer).
wheelbase: f64Wheelbase (m).
track_width: f64Track width (m).
steering_damping: f64Steering feel: damping coefficient.
input: f64Current steering angle input (normalized -1 to 1).
Implementations§
Source§impl PySteering
impl PySteering
Sourcepub fn new(wheelbase: f64, track_width: f64) -> Self
pub fn new(wheelbase: f64, track_width: f64) -> Self
Create a default front-wheel-steering system.
Sourcepub fn front_angle(&self) -> f64
pub fn front_angle(&self) -> f64
Compute the front wheel steer angle from the input.
Sourcepub fn rear_angle(&self) -> f64
pub fn rear_angle(&self) -> f64
Compute the rear wheel steer angle (0 for standard FWS).
Sourcepub fn ackermann_front_angles(&self) -> (f64, f64)
pub fn ackermann_front_angles(&self) -> (f64, f64)
Compute Ackermann inner/outer wheel angles.
Trait Implementations§
Source§impl Clone for PySteering
impl Clone for PySteering
Source§fn clone(&self) -> PySteering
fn clone(&self) -> PySteering
Returns a duplicate of the value. Read more
1.0.0 · 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 PySteering
impl Debug for PySteering
Source§impl<'de> Deserialize<'de> for PySteering
impl<'de> Deserialize<'de> for PySteering
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PySteering
impl RefUnwindSafe for PySteering
impl Send for PySteering
impl Sync for PySteering
impl Unpin for PySteering
impl UnsafeUnpin for PySteering
impl UnwindSafe for PySteering
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.