27#include <yarp/sig/Vector.h>
54 virtual void init(
const yarp::sig::Vector& y0) = 0;
61 virtual const yarp::sig::Vector&
filt(
const yarp::sig::Vector& u) = 0;
67 virtual const yarp::sig::Vector&
output()
const = 0;
83 std::deque<yarp::sig::Vector>
uold;
84 std::deque<yarp::sig::Vector>
yold;
99 Filter(
const yarp::sig::Vector &num,
const yarp::sig::Vector &den,
100 const yarp::sig::Vector &y0=yarp::sig::Vector(1,0.0));
106 virtual void init(
const yarp::sig::Vector &y0);
115 virtual void init(
const yarp::sig::Vector &y0,
const yarp::sig::Vector &u0);
124 void getCoeffs(yarp::sig::Vector &num, yarp::sig::Vector &den);
136 void setCoeffs(
const yarp::sig::Vector &num,
const yarp::sig::Vector &den);
151 bool adjustCoeffs(
const yarp::sig::Vector &num,
const yarp::sig::Vector &den);
158 void getStates(std::deque<yarp::sig::Vector> &u, std::deque<yarp::sig::Vector> &
y);
165 virtual const yarp::sig::Vector&
filt(
const yarp::sig::Vector &u);
171 virtual const yarp::sig::Vector&
output()
const {
return y; }
183 yarp::sig::Vector
uD;
197 RateLimiter(
const yarp::sig::Vector &rL,
const yarp::sig::Vector &rU);
203 virtual void init(
const yarp::sig::Vector &u0);
210 void getLimits(yarp::sig::Vector &rL, yarp::sig::Vector &rU);
219 void setLimits(
const yarp::sig::Vector &rL,
const yarp::sig::Vector &rU);
226 virtual const yarp::sig::Vector&
filt(
const yarp::sig::Vector &u);
232 virtual const yarp::sig::Vector&
output()
const {
return uLim; }
261 const yarp::sig::Vector &y0=yarp::sig::Vector(1,0.0));
272 virtual void init(
const yarp::sig::Vector &y0);
303 virtual const yarp::sig::Vector&
filt(
const yarp::sig::Vector &u);
309 virtual const yarp::sig::Vector&
output()
const {
return y; }
321 std::deque<std::deque<double> >
uold;
326 double median(std::deque<double>& v);
334 MedianFilter(
const size_t n,
const yarp::sig::Vector &y0=yarp::sig::Vector(1,0.0));
340 virtual void init(
const yarp::sig::Vector &y0);
359 virtual const yarp::sig::Vector&
filt(
const yarp::sig::Vector &u);
365 virtual const yarp::sig::Vector&
output()
const {
return y; }
virtual const yarp::sig::Vector & filt(const yarp::sig::Vector &u)
Performs filtering on the actual input.
void setCoeffs(const yarp::sig::Vector &num, const yarp::sig::Vector &den)
Sets new filter coefficients.
bool adjustCoeffs(const yarp::sig::Vector &num, const yarp::sig::Vector &den)
Modifies the values of existing filter coefficients without varying their lengths.
virtual const yarp::sig::Vector & output() const
Return current filter output.
void getCoeffs(yarp::sig::Vector &num, yarp::sig::Vector &den)
Returns the current filter coefficients.
virtual void init(const yarp::sig::Vector &y0)
Internal state reset.
void getStates(std::deque< yarp::sig::Vector > &u, std::deque< yarp::sig::Vector > &y)
Returns the current filter states.
std::deque< yarp::sig::Vector > yold
std::deque< yarp::sig::Vector > uold
virtual void init(const yarp::sig::Vector &y0, const yarp::sig::Vector &u0)
Internal state reset for filter with zero gain.
First order low pass filter implementing the transfer function H(s) = \frac{1}{1+\tau s}.
bool setCutFrequency(const double cutFrequency)
Change the cut frequency of the filter.
bool setSampleTime(const double sampleTime)
Change the sample time of the filter.
virtual const yarp::sig::Vector & output() const
Return current filter output.
double getSampleTime()
Retrieve the sample time of the filter.
double getCutFrequency()
Retrieve the cut frequency of the filter.
virtual void init(const yarp::sig::Vector &y0)
Internal state reset.
virtual const yarp::sig::Vector & filt(const yarp::sig::Vector &u)
Performs filtering on the actual input.
virtual ~FirstOrderLowPassFilter()
Destructor.
Interface for the filters implemented in iCub::crtl.
virtual void init(const yarp::sig::Vector &y0)=0
Internal state reset.
virtual const yarp::sig::Vector & filt(const yarp::sig::Vector &u)=0
Performs filtering on the actual input.
virtual const yarp::sig::Vector & output() const =0
Return current filter output.
virtual ~IFilter()
Destructor.
void setLimits(const yarp::sig::Vector &rL, const yarp::sig::Vector &rU)
Sets new Rate limits.
virtual const yarp::sig::Vector & output() const
Return current filter output.
yarp::sig::Vector rateLowerLim
virtual void init(const yarp::sig::Vector &u0)
Init internal state.
void getLimits(yarp::sig::Vector &rL, yarp::sig::Vector &rU)
Returns the current Rate limits.
yarp::sig::Vector rateUpperLim
virtual const yarp::sig::Vector & filt(const yarp::sig::Vector &u)
Limits the input rate.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.