Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.27 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.27 KB

iir_filters

iir filters ROS wrapper with C++.

This repository wrapper the origin IIR filters repository for ROS.

This is a powerful filter library which implements all standard IIR filters such as Bessel, Butterworth, Elliptic and Chebychev. The data format is floating-point throughout.

System specification

ROS: kinetic
Ubuntu: 16.04

Usages

Just copy this repository as a stanalone ROS package in your catkin workspace. Set your package depending on this pacakge named iir_filters in your package.xml and CMakeLists.txt.

In your project, use the filter like this

#include "iir_filters/Iir.h"

// init filter
Iir::Butterworth::LowPass<order> f;  // NOTE: here order should replaced by a int number!
const float samplingrate = 1000; // Hz
const float cutoff_frequency = 5; // Hz
f.setup (order, samplingrate, cutoff_frequency); // NOTE: here order should replaced by a int number!

// Realtime filtering sample by sample
float y = f.filter(x); // here x is a float, and one dimension

Reference