filter-differentiator.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2017-, Rohan Budhirja, LAAS-CNRS
3  *
4  * This file is part of sot-torque-control.
5  * sot-torque-control is free software: you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation, either version 3 of
8  * the License, or (at your option) any later version.
9  * sot-torque-control is distributed in the hope that it will be
10  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details. You should
13  * have received a copy of the GNU Lesser General Public License along
14  * with sot-torque-control. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __sot_torque_control_FilterDifferentiator_H__
18 #define __sot_torque_control_FilterDifferentiator_H__
19 /* --------------------------------------------------------------------- */
20 /* --- API ------------------------------------------------------------- */
21 /* --------------------------------------------------------------------- */
22 
23 #if defined(WIN32)
24 #if defined(low_pass_filter_EXPORTS)
25 #define SOTFILTERDIFFERENTIATOR_EXPORT __declspec(dllexport)
26 #else
27 #define SOTFILTERDIFFERENTIATOR_EXPORT __declspec(dllimport)
28 #endif
29 #else
30 #define SOTFILTERDIFFERENTIATOR_EXPORT
31 #endif
32 
33 // #define VP_DEBUG 1 /// enable debug output
34 // #define VP_DEBUG_MODE 20
35 
36 /* --------------------------------------------------------------------- */
37 /* --- INCLUDE --------------------------------------------------------- */
38 /* --------------------------------------------------------------------- */
39 
40 /* HELPER */
42 
44 #include <sot/core/stop-watch.hh>
45 
46 namespace dynamicgraph {
47 namespace sot {
59  : public ::dynamicgraph::Entity {
61 
62  public: /* --- SIGNALS --- */
69 
80 
84 
85  protected:
86  double m_dt;
88 
91 
92  public:
93  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
94 
96  FilterDifferentiator(const std::string &name);
97 
109  void init(const double &timestep, const size_type &xSize,
110  const Eigen::VectorXd &filter_numerator,
111  const Eigen::VectorXd &filter_denominator);
112 
113  void switch_filter(const Eigen::VectorXd &filter_numerator,
114  const Eigen::VectorXd &filter_denominator);
115 
116  protected:
117  public: /* --- ENTITY INHERITANCE --- */
118  virtual void display(std::ostream &os) const;
119 
120 }; // class FilterDifferentiator
121 
122 } // namespace sot
123 } // namespace dynamicgraph
124 
125 #endif // #ifndef __sot_torque_control_FilterDifferentiator_H__
init
void init(bool compute_local_aabb=true)
causal-filter.hh
dynamicgraph::sot::FilterDifferentiator::m_x_size
size_type m_x_size
sampling timestep of the input signal
Definition: filter-differentiator.hh:87
dynamicgraph
dynamicgraph::Entity
dynamicgraph::sot::CausalFilter
Definition: causal-filter.hh:45
DECLARE_SIGNAL_IN
#define DECLARE_SIGNAL_IN(name, type)
DYNAMIC_GRAPH_ENTITY_DECL
#define DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::sot::FilterDifferentiator
Definition: filter-differentiator.hh:58
DECLARE_SIGNAL_INNER
#define DECLARE_SIGNAL_INNER(name, type)
stop-watch.hh
x
x
dynamicgraph::size_type
Matrix::Index size_type
display
dynamicgraph::Vector
Eigen::VectorXd Vector
DECLARE_SIGNAL_OUT
#define DECLARE_SIGNAL_OUT(name, type)
dynamicgraph::sot::FilterDifferentiator::m_filter
CausalFilter * m_filter
polynomial-fitting filters
Definition: filter-differentiator.hh:90
signal-helper.h
SOTFILTERDIFFERENTIATOR_EXPORT
#define SOTFILTERDIFFERENTIATOR_EXPORT
Definition: filter-differentiator.hh:30
dynamicgraph::sot::FilterDifferentiator::m_dt
double m_dt
Definition: filter-differentiator.hh:86
compile.name
name
Definition: compile.py:23


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