iCub-main
icub-main
src
simulators
iCubSimulation
wrapper
pidfilter.cpp
Go to the documentation of this file.
1
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3
/*
4
* Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
5
* Author: Lorenzo Natale
6
* email: lorenzo.natale@iit.it
7
* website: www.robotcub.org
8
* Permission is granted to copy, distribute, and/or modify this program
9
* under the terms of the GNU General Public License, version 2 or any
10
* later version published by the Free Software Foundation.
11
*
12
* A copy of the license can be found at
13
* http://www.robotcub.org/icub/license/gpl.txt
14
*
15
* This program is distributed in the hope that it will be useful, but
16
* WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18
* Public License for more details
19
*/
28
#include "
pidfilter.h
"
29
31
// Construction/Destruction
33
PidFilter::PidFilter
(
void
)
34
{
35
error_old=0;
36
Kp=0;
37
Kd=0;
38
Ki=0;
39
40
Umax = 0.0;
41
Sn = 0.0;
42
}
43
44
PidFilter::PidFilter
(
double
kp,
double
kd,
double
ki,
double
u_max)
45
{
46
error_old=0;
47
Kp=kp;
48
Kd=kd;
49
Ki=ki;
50
51
Umax = u_max;
52
Sn = 0.0;
53
}
54
55
PidFilter::~PidFilter
(
void
)
56
{
57
}
58
59
PidFilter::PidFilter
(
const
PidFilter
&
f
)
60
{
61
error_old=
f
.error_old;
62
Kp=
f
.Kp;
63
Kd=
f
.Kd;
64
Ki=
f
.Ki;
65
66
Umax =
f
.Umax;
67
Sn =
f
.Sn;
68
}
69
70
void
PidFilter::operator=
(
const
PidFilter
&
f
)
71
{
72
error_old=
f
.error_old;
73
Kp=
f
.Kp;
74
Kd=
f
.Kd;
75
Ki=
f
.Ki;
76
77
Umax =
f
.Umax;
78
Sn =
f
.Sn;
79
}
PidFilter::PidFilter
PidFilter(void)
Definition:
pidfilter.cpp:33
PidFilter
Definition:
pidfilter.h:33
PidFilter::operator=
void operator=(const PidFilter &f)
Definition:
pidfilter.cpp:70
f
f
Definition:
compute_ekf_sym.m:22
pidfilter.h
Header to implement the PID filter.
PidFilter::~PidFilter
virtual ~PidFilter(void)
Definition:
pidfilter.cpp:55
Generated on Mon May 23 2022 15:54:33 for iCub-main by
1.8.17