causal-filter.hh
Go to the documentation of this file.
1 #ifndef _SOT_CORE_CAUSAL_FILTER_H_
2 #define _SOT_CORE_CAUSAL_FILTER_H_
3 /*
4  * Copyright 2017-, Rohan Budhirja, LAAS-CNRS
5  *
6  * This file is part of sot-torque-control.
7  * sot-torque-control is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  * sot-torque-control is distributed in the hope that it will be
12  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details. You should
15  * have received a copy of the GNU Lesser General Public License along
16  * with sot-torque-control. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 /* --------------------------------------------------------------------- */
20 /* --- INCLUDE --------------------------------------------------------- */
21 /* --------------------------------------------------------------------- */
22 #include <sot/core/fwd.hh>
23 
42 namespace dynamicgraph {
43 namespace sot {
44 
45 class CausalFilter {
46  public:
47  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
48 
57  CausalFilter(const double &timestep, const size_type &xSize,
58  const Eigen::VectorXd &filter_numerator,
59  const Eigen::VectorXd &filter_denominator);
60 
61  void get_x_dx_ddx(const Eigen::VectorXd &base_x,
62  Eigen::VectorXd &x_output_dx_ddx);
63 
64  void switch_filter(const Eigen::VectorXd &filter_numerator,
65  const Eigen::VectorXd &filter_denominator);
66 
67  private:
69  double m_dt;
76 
78  Eigen::VectorXd m_filter_numerator;
80  Eigen::VectorXd m_filter_denominator;
85  Eigen::MatrixXd m_input_buffer;
86  Eigen::MatrixXd m_output_buffer;
87 }; // class CausalFilter
88 } // namespace sot
89 } // namespace dynamicgraph
90 #endif /* _SOT_CORE_CAUSAL_FILTER_H_ */
dynamicgraph::sot::CausalFilter::m_filter_order_n
Eigen::VectorXd::Index m_filter_order_n
Size of the denominator .
Definition: causal-filter.hh:75
dynamicgraph
dynamicgraph::sot::CausalFilter::m_pt_numerator
size_type m_pt_numerator
Definition: causal-filter.hh:83
dynamicgraph::sot::CausalFilter::m_x_size
size_type m_x_size
Size.
Definition: causal-filter.hh:71
dynamicgraph::sot::CausalFilter::get_x_dx_ddx
void get_x_dx_ddx(const Eigen::VectorXd &base_x, Eigen::VectorXd &x_output_dx_ddx)
Definition: causal-filter.cpp:57
dynamicgraph::sot::CausalFilter::m_first_sample
bool m_first_sample
Definition: causal-filter.hh:81
dynamicgraph::sot::CausalFilter
Definition: causal-filter.hh:45
dynamicgraph::sot::CausalFilter::CausalFilter
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CausalFilter(const double &timestep, const size_type &xSize, const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
Definition: causal-filter.cpp:36
dynamicgraph::sot::CausalFilter::m_pt_denominator
size_type m_pt_denominator
Definition: causal-filter.hh:84
fwd.hh
dynamicgraph::sot::CausalFilter::m_filter_order_m
Eigen::VectorXd::Index m_filter_order_m
Size of the numerator .
Definition: causal-filter.hh:73
dynamicgraph::sot::CausalFilter::m_filter_numerator
Eigen::VectorXd m_filter_numerator
Coefficients of the numerator .
Definition: causal-filter.hh:78
Index
std::size_t Index
dynamicgraph::sot::CausalFilter::m_dt
double m_dt
sampling timestep of the input signal
Definition: causal-filter.hh:69
dynamicgraph::size_type
Matrix::Index size_type
dynamicgraph::sot::CausalFilter::m_input_buffer
Eigen::MatrixXd m_input_buffer
Definition: causal-filter.hh:85
dynamicgraph::sot::CausalFilter::switch_filter
void switch_filter(const Eigen::VectorXd &filter_numerator, const Eigen::VectorXd &filter_denominator)
Definition: causal-filter.cpp:107
dynamicgraph::sot::CausalFilter::m_output_buffer
Eigen::MatrixXd m_output_buffer
Definition: causal-filter.hh:86
dynamicgraph::sot::CausalFilter::m_filter_denominator
Eigen::VectorXd m_filter_denominator
Coefficients of the denominator .
Definition: causal-filter.hh:80


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