Blender  V3.3
WDLSSolver.hpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later
2  * Copyright 2009 Ruben Smits. */
3 
8 #ifndef WDLSSOLVER_HPP_
9 #define WDLSSOLVER_HPP_
10 
11 #include "Solver.hpp"
12 
13 namespace iTaSC {
14 
15 class WDLSSolver: public iTaSC::Solver {
16 private:
17  e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV;
18  e_vector m_S,m_temp,m_Wy_ydot;
19  double m_lambda;
20  double m_epsilon;
21  double m_qmax;
22  int m_ns;
23  bool m_transpose;
24 public:
25  WDLSSolver();
26  virtual ~WDLSSolver();
27 
28  virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc);
29  virtual bool solve(const e_matrix& A, const e_vector& Wy, const e_vector& ydot, const e_matrix& Wq, e_vector& qdot, e_scalar& nlcoef);
30  virtual void setParam(SolverParam param, double value)
31  {
32  switch (param) {
33  case DLS_QMAX:
34  m_qmax = value;
35  break;
36  case DLS_LAMBDA_MAX:
37  m_lambda = value;
38  break;
39  case DLS_EPSILON:
40  m_epsilon = value;
41  break;
42  }
43  }
44 };
45 
46 }
47 
48 #endif /* WDLSSOLVER_HPP_ */
#define A
@ DLS_LAMBDA_MAX
Definition: Solver.hpp:20
virtual bool init(unsigned int nq, unsigned int nc, const std::vector< bool > &gc)
Definition: WDLSSolver.cpp:22
virtual void setParam(SolverParam param, double value)
Definition: WDLSSolver.hpp:30
virtual ~WDLSSolver()
Definition: WDLSSolver.cpp:19
virtual bool solve(const e_matrix &A, const e_vector &Wy, const e_vector &ydot, const e_matrix &Wq, e_vector &qdot, e_scalar &nlcoef)
Definition: WDLSSolver.cpp:46
#define e_vector
Definition: eigen_types.hpp:38
#define e_scalar
Definition: eigen_types.hpp:37
#define e_matrix
Definition: eigen_types.hpp:40