Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
rtc
TorqueController
Convolution.h
Go to the documentation of this file.
1
// -*- C++ -*-
10
#ifndef CONVOLUTION_H
11
#define CONVOLUTION_H
12
13
// </rtc-template>
14
15
#include "../Stabilizer/Integrator.h"
16
17
class
Convolution
{
18
public
:
19
// if range = 0, integrate from 0 to t. Otherwise, integrate from t - (range - 1) * dt to t.
20
Convolution
(
double
_dt = 0.005,
unsigned
int
_range = 0);
21
~Convolution
(
void
);
22
void
reset
(
void
);
23
void
setup
(
double
_dt,
unsigned
int
_range);
24
void
update
(
double
_f,
double
_g);
25
double
calculate
(
void
);
26
private
:
27
double
dt
;
// control cycle
28
unsigned
int
range
;
// integration range (from t_now - range * dt to t_now [sec])
29
std::deque<double>
f_buffer
;
// integration data buffer for f
30
std::deque<double>
g_buffer
;
// integration data buffer for g
31
long
long
buffer_size
;
// buffer size of convolution values (f, g)
32
Integrator
integrator
;
// convolution(f, g) = integrate(f(x)*g(t-x), x=0, x=t);
33
};
34
35
#endif // CONVOLUTION_H
Convolution::f_buffer
std::deque< double > f_buffer
Definition:
Convolution.h:29
Convolution::setup
void setup(double _dt, unsigned int _range)
Definition:
Convolution.cpp:30
Convolution::calculate
double calculate(void)
Definition:
Convolution.cpp:50
Convolution::range
unsigned int range
Definition:
Convolution.h:28
Integrator
Definition:
Integrator.h:17
Convolution::buffer_size
long long buffer_size
Definition:
Convolution.h:31
Convolution::dt
double dt
Definition:
Convolution.h:27
Convolution::Convolution
Convolution(double _dt=0.005, unsigned int _range=0)
Definition:
Convolution.cpp:14
Convolution::reset
void reset(void)
Definition:
Convolution.cpp:22
Convolution::~Convolution
~Convolution(void)
Definition:
Convolution.cpp:19
Convolution::g_buffer
std::deque< double > g_buffer
Definition:
Convolution.h:30
Convolution
Definition:
Convolution.h:17
Convolution::integrator
Integrator integrator
Definition:
Convolution.h:32
Convolution::update
void update(double _f, double _g)
Definition:
Convolution.cpp:38
hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:49