Skip to main content

low_pass_filter

Function low_pass_filter 

Source
pub fn low_pass_filter(
    sample_time: f64,
    y: f64,
    y_last: f64,
    cutoff_frequency: f64,
) -> FrankaResult<f64>
Expand description

Applies a first-order low-pass filter.

Port of franka::lowpassFilter.

  • sample_time – sample time constant
  • y – current value of the signal to be filtered
  • y_last – value of the signal in the previous time step
  • cutoff_frequency – cutoff frequency of the low-pass filter

§Errors

FrankaError::InvalidArgument if sample_time is negative, infinite or NaN, if cutoff_frequency is zero, negative, infinite or NaN, or if either signal value is infinite or NaN.