Grip-Reloaded
Grip version visualizaiton interface for DART (DynamicAnimationandRoboticsToolkits)
/home/pete/myRepos/grip2/include/HuboController.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2013, Georgia Tech Research Corporation
00003  * 
00004  * Humanoid Robotics Lab      Georgia Institute of Technology
00005  * Director: Mike Stilman     http://www.golems.org
00006  *
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  *     * Redistributions of source code must retain the above
00014  *       copyright notice, this list of conditions and the following
00015  *       disclaimer.
00016  *     * Redistributions in binary form must reproduce the above
00017  *       copyright notice, this list of conditions and the following
00018  *       disclaimer in the documentation and/or other materials
00019  *       provided with the distribution.
00020  *     * Neither the name of the Georgia Tech Research Corporation nor
00021  *       the names of its contributors may be used to endorse or
00022  *       promote products derived from this software without specific
00023  *       prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY GEORGIA TECH RESEARCH CORPORATION ''AS
00026  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00027  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00028  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEORGIA
00029  * TECH RESEARCH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT,
00030  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00031  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00032  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00034  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00036  * OF THE POSSIBILITY OF SUCH DAMAGE.
00037  */
00038 
00046 #ifndef HUBO_CONTROLLER_H
00047 #define HUBO_CONTROLLER_H
00048 
00049 // C++ Stanadard includes
00050 #include <vector>
00051 
00052 // Eigen includes
00053 #include <Eigen/Core>
00054 
00055 // DART includes
00056 #include <dynamics/Skeleton.h>
00057 
00062 class HuboController {
00063 public:
00073     HuboController(dart::dynamics::Skeleton *skeleton,
00074                    const Eigen::VectorXd p,
00075                    const Eigen::VectorXd i,
00076                    const Eigen::VectorXd d,
00077                    const Eigen::VectorXd mask,
00078                    double tInit);
00079 
00083     virtual ~HuboController() {};
00084 
00093     Eigen::VectorXd getTorques(const Eigen::VectorXd &curPos,
00094                                const Eigen::VectorXd &curVel,
00095                                double t);
00096 
00097     Eigen::VectorXd refPos;
00098     Eigen::VectorXd refVel;
00099     Eigen::MatrixXd Kp;
00100     Eigen::MatrixXd Kd;
00101     Eigen::MatrixXd Ki;
00102 
00103     Eigen::VectorXd errorLast;
00104     Eigen::VectorXd errorDeriv;
00105     Eigen::VectorXd errorInteg;
00106 
00107     Eigen::MatrixXd jointMask;
00108 
00109     double tLast;
00110 
00111     dart::dynamics::Skeleton* skel;
00112 };
00113 
00114 #endif // HUBO_CONTROLLER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator