31 ROS_ERROR_STREAM(
"LPFilter was passed invalid number of elements. Not filtering.");
43 if(cutoffFrequency <=0)
45 ROS_ERROR_STREAM(
"LPFilter was passed invalid cuttoffFrequency. Not Filtering.");
50 cutoffFrequency *= (2*M_PI);
51 omega_a = tan(cutoffFrequency*deltaT/2.0);
62 ROS_INFO_STREAM(
"cutoffFrequency: " << cutoffFrequency <<
". omega_a: " <<
omega_a <<
". den: " << den <<
". a0: " <<
a0 <<
". a1: " <<
a1 <<
". a2: " <<
a2 <<
". b1: " <<
b1 <<
". b2: " <<
b2);
70 ROS_ERROR_STREAM(
"LPFilter was not initialized correctly. Not filtering data.");
73 if(input.size() !=
in1.size() || output.size() !=
out1.size())
82 out1.at(i) = output.at(i);
84 in1.at(i) = input.at(i);
bool update(std::vector< double > input, std::vector< double > &output)
std::vector< double > out1
std::vector< double > in2
std::vector< double > out2
#define ROS_INFO_STREAM(args)
LPFilter(double deltaT, double cutoffFrequency, int numElements)
#define ROS_ERROR_STREAM(args)
std::vector< double > in1