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 y, double y_last, double cutoff_frequency) | 
|   | Applies a first-order low-pass filter.  
  | 
|   | 
| std::array< double, 16 >  | franka::cartesianLowpassFilter (double sample_time, std::array< double, 16 > y, std::array< double, 16 > y_last, 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 >  | 
          y,  | 
        
        
           | 
           | 
          std::array< double, 16 >  | 
          y_last,  | 
        
        
           | 
           | 
          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] | y | Current Cartesian transformation matrix to be filtered  | 
    | [in] | y_last | 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 y is infinite or NaN.  | 
    | std::invalid_argument | if elements of 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 Cartesian transformation matrix. 
 
 
 
◆ lowpassFilter()
      
        
          | double franka::lowpassFilter  | 
          ( | 
          double  | 
          sample_time,  | 
        
        
           | 
           | 
          double  | 
          y,  | 
        
        
           | 
           | 
          double  | 
          y_last,  | 
        
        
           | 
           | 
          double  | 
          cutoff_frequency  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Applies a first-order low-pass filter. 
- Parameters
 - 
  
    | [in] | sample_time | Sample time constant  | 
    | [in] | y | Current value of the signal to be filtered  | 
    | [in] | y_last | 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 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.