Public Member Functions | Protected Attributes | Private Member Functions | List of all members
dynamicgraph::sot::FilterDifferentiator Class Reference

#include <filter-differentiator.hh>

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

Public Member Functions

 DECLARE_SIGNAL_IN (x, dynamicgraph::Vector)
 Input signals. More...
 
 DECLARE_SIGNAL_INNER (x_dx_ddx, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_OUT (ddx, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_OUT (dx, dynamicgraph::Vector)
 
 DECLARE_SIGNAL_OUT (x_filtered, dynamicgraph::Vector)
 Output signal x_filtered. More...
 
virtual void display (std::ostream &os) const
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW FilterDifferentiator (const std::string &name)
 
void init (const double &timestep, const size_type &xSize, const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
 
void switch_filter (const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
 
- Public Member Functions inherited from dynamicgraph::Entity
std::ostream & displaySignalList (std::ostream &os) const
 
 Entity (const std::string &name)
 
virtual const std::string & getClassName () const
 
const std::string & getCommandList () const
 
virtual std::string getDocString () const
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
const std::string & getName () const
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
CommandMap_t getNewStyleCommandMap ()
 
SignalBase< sigtime_t > & getSignal (const std::string &signalName)
 
const SignalBase< sigtime_t > & getSignal (const std::string &signalName) const
 
SignalMap getSignalMap () const
 
double getStreamPrintPeriod ()
 
double getStreamPrintPeriod ()
 
double getTimeSample ()
 
double getTimeSample ()
 
bool hasSignal (const std::string &signame) const
 
Loggerlogger ()
 
Loggerlogger ()
 
const Loggerlogger () const
 
const Loggerlogger () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
bool setStreamPrintPeriod (double t)
 
bool setStreamPrintPeriod (double t)
 
bool setTimeSample (double t)
 
bool setTimeSample (double t)
 
virtual SignalBase< sigtime_t > * test ()
 
virtual void test2 (SignalBase< sigtime_t > *)
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual ~Entity ()
 

Protected Attributes

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

Private Member Functions

 DYNAMIC_GRAPH_ENTITY_DECL ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 58 of file filter-differentiator.hh.

Constructor & Destructor Documentation

◆ FilterDifferentiator()

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

— CONSTRUCTOR -—

Definition at line 58 of file filter-differentiator.cpp.

Member Function Documentation

◆ DECLARE_SIGNAL_IN()

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

Input signals.

◆ DECLARE_SIGNAL_INNER()

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.

◆ DECLARE_SIGNAL_OUT() [1/3]

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

◆ DECLARE_SIGNAL_OUT() [2/3]

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

◆ DECLARE_SIGNAL_OUT() [3/3]

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

Output signal x_filtered.

◆ display()

void dynamicgraph::sot::FilterDifferentiator::display ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::Entity.

Definition at line 163 of file filter-differentiator.cpp.

◆ DYNAMIC_GRAPH_ENTITY_DECL()

dynamicgraph::sot::FilterDifferentiator::DYNAMIC_GRAPH_ENTITY_DECL ( )
private

◆ init()

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

Initialize the FilterDifferentiator.

Parameters
timestepPeriod (in seconds) after which the sensors' data are updated.
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.

Definition at line 92 of file filter-differentiator.cpp.

◆ switch_filter()

void dynamicgraph::sot::FilterDifferentiator::switch_filter ( const Eigen::VectorXd filter_numerator,
const Eigen::VectorXd filter_denominator 
)

Definition at line 106 of file filter-differentiator.cpp.

Member Data Documentation

◆ m_dt

double dynamicgraph::sot::FilterDifferentiator::m_dt
protected

Definition at line 86 of file filter-differentiator.hh.

◆ m_filter

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

polynomial-fitting filters

Definition at line 90 of file filter-differentiator.hh.

◆ m_x_size

size_type dynamicgraph::sot::FilterDifferentiator::m_x_size
protected

sampling timestep of the input signal

Definition at line 87 of file filter-differentiator.hh.


The documentation for this class was generated from the following files:


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:32