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 
iKinFwd.h
iCub::ctrl::Integrator
Definition: pids.h:47
SmithPredictor::enabled
bool enabled
Definition: SmithPredictor.h:42
SmithPredictor::F
std::deque< iCub::ctrl::Filter * > F
Definition: SmithPredictor.h:40
SmithPredictor::dealloc
void dealloc()
Definition: SmithPredictor.cpp:52
iCub::iKin::iKinChain
Definition: iKinFwd.h:354
SmithPredictor
Definition: SmithPredictor.h:36
SmithPredictor::SmithPredictor
SmithPredictor()
Definition: SmithPredictor.cpp:37
SmithPredictor::~SmithPredictor
~SmithPredictor()
Definition: SmithPredictor.cpp:45
SmithPredictor::I
iCub::ctrl::Integrator * I
Definition: SmithPredictor.h:39
filters.h
SmithPredictor::restart
void restart(const yarp::sig::Vector &y0)
Definition: SmithPredictor.cpp:166
SmithPredictor::configure
void configure(const yarp::os::Property &options, iCub::iKin::iKinChain &chain)
Definition: SmithPredictor.cpp:69
SmithPredictor::computeCmd
yarp::sig::Vector computeCmd(const yarp::sig::Vector &u)
Definition: SmithPredictor.cpp:193
SmithPredictor::tappedDelays
std::deque< std::deque< double > * > tappedDelays
Definition: SmithPredictor.h:41
pids.h