Loading...
Searching...
No Matches
OptimalControllerSolver.hh
Go to the documentation of this file.
1/*
2 * Copyright 2006, 2007, 2008, 2009, 2010,
3 *
4 * Florent Lamiraux
5 * Mathieu Poirier
6 * Olivier Stasse
7 *
8 * JRL, CNRS/AIST
9 *
10 * This file is part of walkGenJrl.
11 * walkGenJrl is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * walkGenJrl is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Lesser Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with walkGenJrl. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * Research carried out within the scope of the
24 * Joint Japanese-French Robotics Laboratory (JRL)
25 */
30#ifndef _OPTIMAL_CONTROLLER_SOLVER_H_
31#define _OPTIMAL_CONTROLLER_SOLVER_H_
32
33#include <Eigen/Dense>
34
35namespace PatternGeneratorJRL {
145 public:
146 static const unsigned int MODE_WITHOUT_INITIALPOS = 1;
147 static const unsigned int MODE_WITH_INITIALPOS = 0;
148
150 OptimalControllerSolver(Eigen::MatrixXd &A, Eigen::MatrixXd &b,
151 Eigen::MatrixXd &c, double Q, double R,
152 unsigned int Nl);
153
156
161 void ComputeWeights(unsigned int Mode);
162
164 void DisplayWeights();
165
167 void GetF(Eigen::MatrixXd &LF);
168
170 void GetK(Eigen::MatrixXd &LK);
171
172 protected:
173 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
186
192 double m_Q, m_R;
193
197
199 int m_Nl;
200
201 bool GeneralizedSchur(MatrixRXd &A, MatrixRXd &B, Eigen::VectorXd &alphar,
202 Eigen::VectorXd &alphai, Eigen::VectorXd &beta,
203 MatrixRXd &L, MatrixRXd &R);
204};
205
336} // namespace PatternGeneratorJRL
337#endif /* _OPTIMAL_CONTROLLER_SOLVER_H_ */
This class computes the gains for preview control for a given discrete system. The discrete system is...
Definition OptimalControllerSolver.hh:144
void DisplayWeights()
Definition OptimalControllerSolver.cpp:314
static const unsigned int MODE_WITHOUT_INITIALPOS
Definition OptimalControllerSolver.hh:146
static const unsigned int MODE_WITH_INITIALPOS
Definition OptimalControllerSolver.hh:147
double m_Q
Definition OptimalControllerSolver.hh:192
MatrixRXd m_c
Definition OptimalControllerSolver.hh:185
~OptimalControllerSolver()
Definition OptimalControllerSolver.cpp:113
MatrixRXd m_b
Definition OptimalControllerSolver.hh:184
bool GeneralizedSchur(MatrixRXd &A, MatrixRXd &B, Eigen::VectorXd &alphar, Eigen::VectorXd &alphai, Eigen::VectorXd &beta, MatrixRXd &L, MatrixRXd &R)
Definition OptimalControllerSolver.cpp:115
double m_R
Definition OptimalControllerSolver.hh:192
void GetF(Eigen::MatrixXd &LF)
Definition OptimalControllerSolver.cpp:319
void GetK(Eigen::MatrixXd &LK)
Definition OptimalControllerSolver.cpp:321
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixRXd
Definition OptimalControllerSolver.hh:174
MatrixRXd m_F
Definition OptimalControllerSolver.hh:196
MatrixRXd m_K
Definition OptimalControllerSolver.hh:195
MatrixRXd m_A
Definition OptimalControllerSolver.hh:183
int m_Nl
Definition OptimalControllerSolver.hh:199
void ComputeWeights(unsigned int Mode)
Definition OptimalControllerSolver.cpp:170
\doc Simulate a rigid body
Definition patterngeneratorinterface.hh:41
doublereal * b
Definition qld.cpp:386
doublereal * c
Definition qld.cpp:386