Skip to main content

Controller

Trait Controller 

Source
pub trait Controller {
    type State;
    type Reference;
    type Output;

    // Required methods
    fn compute(
        &mut self,
        state: &Self::State,
        reference: &Self::Reference,
    ) -> Self::Output;
    fn reset(&mut self);
}
Expand description

Trait for controllers (PID, LQR, MPC, etc.)

Required Associated Types§

Source

type State

State type

Source

type Reference

Reference/target type

Source

type Output

Output control type

Required Methods§

Source

fn compute( &mut self, state: &Self::State, reference: &Self::Reference, ) -> Self::Output

Compute control output

Source

fn reset(&mut self)

Reset controller state

Implementors§