iCub-main
SmithPredictor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Ugo Pattacini
4  * email: ugo.pattacini@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17 */
18 
19 #ifndef __SMITHPREDICTOR_H__
20 #define __SMITHPREDICTOR_H__
21 
22 #include <deque>
23 
24 #include <yarp/os/Property.h>
25 #include <yarp/sig/Vector.h>
26 
27 #include <iCub/ctrl/pids.h>
28 #include <iCub/ctrl/filters.h>
29 #include <iCub/iKin/iKinFwd.h>
30 
31 
32 // this class implements the Smith Predictor block
33 // which accounts for the communication delays that
34 // exist between the velocity commands and their
35 // execution on the robot
37 {
38 protected:
40  std::deque<iCub::ctrl::Filter*> F;
41  std::deque<std::deque<double>*> tappedDelays;
42  bool enabled;
43 
44  void dealloc();
45 
46 public:
49  void configure(const yarp::os::Property &options, iCub::iKin::iKinChain &chain);
50  void restart(const yarp::sig::Vector &y0);
51  yarp::sig::Vector computeCmd(const yarp::sig::Vector &u);
52 };
53 
54 #endif
55 
std::deque< std::deque< double > * > tappedDelays
void configure(const yarp::os::Property &options, iCub::iKin::iKinChain &chain)
yarp::sig::Vector computeCmd(const yarp::sig::Vector &u)
std::deque< iCub::ctrl::Filter * > F
iCub::ctrl::Integrator * I
void restart(const yarp::sig::Vector &y0)
A class for defining a saturated integrator based on Tustin formula: .
Definition: pids.h:48
A Base class for defining a Serial Link Chain.
Definition: iKinFwd.h:354