pub struct PyWheelDynamics {
pub omega: f64,
pub inertia: f64,
pub radius: f64,
pub slip_ratio: f64,
pub slip_angle: f64,
pub camber: f64,
pub toe: f64,
pub fx: f64,
pub fy: f64,
pub fz: f64,
pub grounded: bool,
}Expand description
State and forces at a single wheel.
Fields§
§omega: f64Wheel angular velocity (rad/s).
inertia: f64Wheel moment of inertia (kg·m²).
radius: f64Effective rolling radius (m).
slip_ratio: f64Current slip ratio.
slip_angle: f64Current slip angle (rad).
camber: f64Camber angle (rad, positive = lean toward vehicle center).
toe: f64Toe angle (rad).
fx: f64Longitudinal force at the contact patch (N).
fy: f64Lateral force at the contact patch (N).
fz: f64Normal load (N).
grounded: boolWhether the wheel is on the ground.
Implementations§
Source§impl PyWheelDynamics
impl PyWheelDynamics
Sourcepub fn new(inertia: f64, radius: f64) -> Self
pub fn new(inertia: f64, radius: f64) -> Self
Create a new wheel with given inertia and radius.
Sourcepub fn step_omega(&mut self, drive_torque: f64, brake_torque: f64, dt: f64)
pub fn step_omega(&mut self, drive_torque: f64, brake_torque: f64, dt: f64)
Update wheel angular velocity given applied torque and time step.
Sourcepub fn peripheral_speed(&self) -> f64
pub fn peripheral_speed(&self) -> f64
Peripheral speed of the tire.
Trait Implementations§
Source§impl Clone for PyWheelDynamics
impl Clone for PyWheelDynamics
Source§fn clone(&self) -> PyWheelDynamics
fn clone(&self) -> PyWheelDynamics
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 PyWheelDynamics
impl Debug for PyWheelDynamics
Source§impl<'de> Deserialize<'de> for PyWheelDynamics
impl<'de> Deserialize<'de> for PyWheelDynamics
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 PyWheelDynamics
impl RefUnwindSafe for PyWheelDynamics
impl Send for PyWheelDynamics
impl Sync for PyWheelDynamics
impl Unpin for PyWheelDynamics
impl UnsafeUnpin for PyWheelDynamics
impl UnwindSafe for PyWheelDynamics
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.