Contains functions for filtering signals with a low-pass filter.
More...
#include <array>
#include <cmath>
Go to the source code of this file.
|
| double | franka::lowpassFilter (double sample_time, double current_signal_value, double last_signal_value, double cutoff_frequency) |
| | Applies a first-order low-pass filter.
|
| |
| std::array< double, 16 > | franka::cartesianLowpassFilter (double sample_time, std::array< double, 16 > current_signal_value, std::array< double, 16 > last_signal_value, double cutoff_frequency) |
| | Applies a first-order low-pass filter to the translation and spherical linear interpolation to the rotation of a transformation matrix which represents a Cartesian Motion.
|
| |
|
|
constexpr double | franka::kMaxCutoffFrequency = 1000.0 |
| | Maximum cutoff frequency.
|
| |
|
constexpr double | franka::kDefaultCutoffFrequency = 100.0 |
| | Default cutoff frequency.
|
| |
Contains functions for filtering signals with a low-pass filter.
◆ cartesianLowpassFilter()
| std::array< double, 16 > franka::cartesianLowpassFilter |
( |
double |
sample_time, |
|
|
std::array< double, 16 > |
current_signal_value, |
|
|
std::array< double, 16 > |
last_signal_value, |
|
|
double |
cutoff_frequency |
|
) |
| |
Applies a first-order low-pass filter to the translation and spherical linear interpolation to the rotation of a transformation matrix which represents a Cartesian Motion.
- Parameters
-
| [in] | sample_time | Sample time constant |
| [in] | current_signal_value | Current Cartesian transformation matrix to be filtered |
| [in] | last_signal_value | Cartesian transformation matrix from the previous time step |
| [in] | cutoff_frequency | Cutoff frequency of the low-pass filter |
- Exceptions
-
| std::invalid_argument | if elements of current_signal_value is infinite or NaN. |
| std::invalid_argument | if elements of last_signal_value 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 Cartesian transformation matrix.
◆ lowpassFilter()
| double franka::lowpassFilter |
( |
double |
sample_time, |
|
|
double |
current_signal_value, |
|
|
double |
last_signal_value, |
|
|
double |
cutoff_frequency |
|
) |
| |
Applies a first-order low-pass filter.
- Parameters
-
| [in] | sample_time | Sample time constant |
| [in] | current_signal_value | Current value of the signal to be filtered |
| [in] | last_signal_value | Value of the signal to be filtered in the previous time step |
| [in] | cutoff_frequency | Cutoff frequency of the low-pass filter |
- Exceptions
-
| std::invalid_argument | if current_signal_value is infinite or NaN. |
| std::invalid_argument | if last_signal_value 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.