#[repr(C)]pub struct SwerveDrivetrain {
pub mass: f64,
pub moi: f64,
pub wheel_radius: f64,
pub wheel_max_angular_velocity: f64,
pub wheel_max_torque: f64,
pub wheel_cof: f64,
pub modules: Vec<Translation2d>,
}Expand description
A swerve drivetrain physical model.
Fields§
§mass: f64The mass of the robot (kg).
moi: f64The moment of inertia of the robot about the origin (kg−m²).
wheel_radius: f64Radius of the wheels (m).
wheel_max_angular_velocity: f64Maximum angular velocity of each wheel (rad/s).
wheel_max_torque: f64Maximum torque applied to each wheel (N−m).
wheel_cof: f64The Coefficient of Friction (CoF) of the wheels.
modules: Vec<Translation2d>Translation of each swerve module from the origin of the robot coordinate system to the center of the module (m). There’s usually one in each corner.
Trait Implementations§
Source§impl Clone for SwerveDrivetrain
impl Clone for SwerveDrivetrain
Source§impl Debug for SwerveDrivetrain
impl Debug for SwerveDrivetrain
Source§impl<'de> Deserialize<'de> for SwerveDrivetrain
impl<'de> Deserialize<'de> for SwerveDrivetrain
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
Source§impl ExternType for SwerveDrivetrain
impl ExternType for SwerveDrivetrain
Auto Trait Implementations§
impl Freeze for SwerveDrivetrain
impl RefUnwindSafe for SwerveDrivetrain
impl Send for SwerveDrivetrain
impl Sync for SwerveDrivetrain
impl Unpin for SwerveDrivetrain
impl UnsafeUnpin for SwerveDrivetrain
impl UnwindSafe for SwerveDrivetrain
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