#include <sot/core/filter-differentiator.hh>
|
| 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 ×tep, 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 |
|
◆ FilterDifferentiator()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW dynamicgraph::sot::FilterDifferentiator::FilterDifferentiator |
( |
const std::string & |
name | ) |
|
◆ DECLARE_SIGNAL_IN()
dynamicgraph::sot::FilterDifferentiator::DECLARE_SIGNAL_IN |
( |
x |
, |
|
|
dynamicgraph::Vector |
|
|
) |
| |
◆ 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 |
( |
x_filtered |
, |
|
|
dynamicgraph::Vector |
|
|
) |
| |
Output signal x_filtered.
◆ 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 |
( |
ddx |
, |
|
|
dynamicgraph::Vector |
|
|
) |
| |
◆ display()
virtual void dynamicgraph::sot::FilterDifferentiator::display |
( |
std::ostream & |
os | ) |
const |
|
virtual |
◆ init()
void dynamicgraph::sot::FilterDifferentiator::init |
( |
const double & |
timestep, |
|
|
const int & |
xSize, |
|
|
const Eigen::VectorXd & |
filter_numerator, |
|
|
const Eigen::VectorXd & |
filter_denominator |
|
) |
| |
Initialize the FilterDifferentiator.
- Parameters
-
timestep | Period (in seconds) after which the sensors' data are updated. |
sigSize | Size of the input signal. |
delay | Delay (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.
◆ switch_filter()
void dynamicgraph::sot::FilterDifferentiator::switch_filter |
( |
const Eigen::VectorXd & |
filter_numerator, |
|
|
const Eigen::VectorXd & |
filter_denominator |
|
) |
| |
◆ m_dt
double dynamicgraph::sot::FilterDifferentiator::m_dt |
|
protected |
◆ m_filter
CausalFilter* dynamicgraph::sot::FilterDifferentiator::m_filter |
|
protected |
polynomial-fitting filters
◆ m_x_size
int dynamicgraph::sot::FilterDifferentiator::m_x_size |
|
protected |
sampling timestep of the input signal