[][src]Struct librobot::navigation::PIDParameters

pub struct PIDParameters {
    pub coder_radius: f32,
    pub left_wheel_coef: f32,
    pub right_wheel_coef: f32,
    pub ticks_per_turn: u16,
    pub inter_axial_length: f32,
    pub pos_kp: f32,
    pub pos_kd: f32,
    pub orient_kp: f32,
    pub orient_kd: f32,
    pub max_output: u16,
    pub command_threshold: u16,
    pub distance_threshold: f32,
}

Les paramètres d'un PID

Fields

coder_radius: f32

Le rayon d'une roue codeuse en mm

left_wheel_coef: f32

Coefficient de correction de la roue codeuse gauche, notamment pour pouvoir supporter le décompte en sens inverse

right_wheel_coef: f32

Coefficient de correction de la roue codeuse droite, pour corriger le sens et l'écart de diamètre entre les deux roues.

ticks_per_turn: u16

Le nombre de ticks d'une roue codeuse

inter_axial_length: f32

La distance entre les roues codeuses en mm

pos_kp: f32

Le coefficient proportionnel sur la position

pos_kd: f32

Le coefficient dérivé sur la position

orient_kp: f32

Le coefficient proportionnel sur l'orientation

orient_kd: f32

Le coefficient dérivée sur l'orientation

max_output: u16

La valeur maximale en sortie

command_threshold: u16

Seuil de commande pour le bloquage

distance_threshold: f32

Seuil de distance pour le bloquage

Methods

impl PIDParameters[src]

pub fn from_frame(
    base: &PIDParameters,
    params_frame: &NavigationParametersFrame
) -> PIDParameters
[src]

Détermine les nouveaux paramètres lorsque la carte a reçu une trame de paramètres. Les paramètres sont initialisés à partir de base et sont ensuite modifiés par rapport aux informations de la trame.

pub fn ticks_to_distance(&self, left_ticks: i64, right_ticks: i64) -> (f32, f32)[src]

Convertit les ticks des QEI en distance parcourue par les roues codeuses (en mm)

pub fn distance_to_ticks(
    &self,
    left_distance: MilliMeter,
    right_distance: MilliMeter
) -> (i64, i64)
[src]

Convertit la distance parcourue par chaque roue codeuse, en nombre de ticks observé par chaque QEI.

Trait Implementations

impl Debug for PIDParameters[src]

impl Copy for PIDParameters[src]

impl Clone for PIDParameters[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for PIDParameters[src]

Auto Trait Implementations

impl Send for PIDParameters

impl Sync for PIDParameters

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self