Function franka::lowpassFilter

Function Documentation

double franka::lowpassFilter(double sample_time, double y, double y_last, double cutoff_frequency)

Applies a first-order low-pass filter

Parameters:
  • sample_time[in] Sample time constant

  • y[in] Current value of the signal to be filtered

  • y_last[in] Value of the signal to be filtered in the previous time step

  • cutoff_frequency[in] Cutoff frequency of the low-pass filter

Throws:
  • std::invalid_argument – if y is infinite or NaN.

  • std::invalid_argument – if y_last is infinite or NaN.

  • std::invalid_argument – if cutoff_frequency is zero, negative, infinite or NaN.

  • std::invalid_argument – if sample_time is negative, infinite or NaN.

Returns:

Filtered value.