All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dynamicgraph::sot::FilterDifferentiator Class Reference

#include <sot/core/filter-differentiator.hh>

Inheritance diagram for dynamicgraph::sot::FilterDifferentiator:
[legend]

Public Member Functions

 DECLARE_SIGNAL_IN (x, dynamicgraph::Vector)
 Input signals. More...
 
 DECLARE_SIGNAL_OUT (x_filtered, dynamicgraph::Vector)
 Output signal x_filtered. More...
 
 DECLARE_SIGNAL_OUT (dx, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_OUT (ddx, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_INNER (x_dx_ddx, dynamicgraph::Vector)
 The following inner signals are used because this entity has some output signals whose related quantities are computed at the same time by the same algorithm To avoid the risk of recomputing the same things twice, we create an inner signal that groups together all the quantities that are computed together. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW FilterDifferentiator (const std::string &name)
 — CONSTRUCTOR -— More...
 
void init (const double &timestep, const int &xSize, const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
 Initialize the FilterDifferentiator. More...
 
void switch_filter (const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
 
virtual void display (std::ostream &os) const
 
- Public Member Functions inherited from dynamicgraph::Entity
 Entity (const std::string &name)
 
virtual ~Entity ()
 
const std::string & getName () const
 
virtual const std::string & getClassName () const
 
virtual std::string getDocString () const
 
bool hasSignal (const std::string &signame) const
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
const std::string & getCommandList () const
 
CommandMap_t getNewStyleCommandMap ()
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
SignalMap getSignalMap () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
LoggerVerbosity getLoggerVerbosityLevel ()
 

Protected Attributes

double m_dt
 
int m_x_size
 sampling timestep of the input signal More...
 
CausalFilterm_filter
 polynomial-fitting filters More...
 
- Protected Attributes inherited from dynamicgraph::Entity
std::string name
 
SignalMap signalMap
 
CommandMap_t commandMap
 
Logger logger_
 

Additional Inherited Members

- Public Types inherited from dynamicgraph::Entity
typedef std::map< std::string,
SignalBase< int > * > 
SignalMap
 
typedef std::map< const
std::string, command::Command * > 
CommandMap_t
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityRegistration ()
 
void entityDeregistration ()
 
void signalRegistration (const SignalArray< int > &signals)
 
void signalDeregistration (const std::string &name)
 

Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW dynamicgraph::sot::FilterDifferentiator::FilterDifferentiator ( const std::string &  name)

— CONSTRUCTOR -—

Member Function Documentation

dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_IN ( ,
dynamicgraph::Vector   
)

Input signals.

dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_INNER ( x_dx_ddx  ,
dynamicgraph::Vector   
)

The following inner signals are used because this entity has some output signals whose related quantities are computed at the same time by the same algorithm To avoid the risk of recomputing the same things twice, we create an inner signal that groups together all the quantities that are computed together.

Then the single output signals will depend on this inner signal, which is the one triggering the computations. Inner signals are not exposed, so that nobody can access them. This signal contains the estimated positions, velocities and accelerations.

dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_OUT ( x_filtered  ,
dynamicgraph::Vector   
)

Output signal x_filtered.

dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_OUT ( dx  ,
dynamicgraph::Vector   
)
dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_OUT ( ddx  ,
dynamicgraph::Vector   
)
virtual void dynamicgraph::sot::FilterDifferentiator::display ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::Entity.

void dynamicgraph::sot::FilterDifferentiator::init ( const double &  timestep,
const int &  xSize,
const Eigen::VectorXd &  filter_numerator,
const Eigen::VectorXd &  filter_denominator 
)

Initialize the FilterDifferentiator.

  @param timestep Period (in seconds) after which

the sensors' data are updated.

Parameters
sigSizeSize of the input signal.
delayDelay (in seconds) introduced by the estimation. This should be a multiple of timestep.
Note
The estimationDelay is half of the length of the window used for the polynomial fitting. The larger the delay, the smoother the estimations.
void dynamicgraph::sot::FilterDifferentiator::switch_filter ( const Eigen::VectorXd &  filter_numerator,
const Eigen::VectorXd &  filter_denominator 
)

Member Data Documentation

double dynamicgraph::sot::FilterDifferentiator::m_dt
protected
CausalFilter* dynamicgraph::sot::FilterDifferentiator::m_filter
protected

polynomial-fitting filters

int dynamicgraph::sot::FilterDifferentiator::m_x_size
protected

sampling timestep of the input signal