chainiksolvervel_wdls.hpp
Go to the documentation of this file.
1 // Copyright (C) 2007 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
2 
3 // Version: 1.0
4 // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
5 // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
6 // URL: http://www.orocos.org/kdl
7 
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef KDL_CHAIN_IKSOLVERVEL_WDLS_HPP
23 #define KDL_CHAIN_IKSOLVERVEL_WDLS_HPP
24 
25 #include "chainiksolver.hpp"
26 #include "chainjnttojacsolver.hpp"
27 #include <Eigen/Core>
28 
29 namespace KDL
30 {
64  {
65  public:
67  static const int E_CONVERGE_PINV_SINGULAR = +100;
68 
81  explicit ChainIkSolverVel_wdls(const Chain& chain,double eps=0.00001,int maxiter=150);
82  //=ublas::identity_matrix<double>
84 
100  virtual int CartToJnt(const JntArray& q_in, const Twist& v_in, JntArray& qdot_out);
105  virtual int CartToJnt(const JntArray& q_init, const FrameVel& v_in, JntArrayVel& q_out){return -1;};
106 
131  int setWeightJS(const Eigen::MatrixXd& Mq);
132 
158  int setWeightTS(const Eigen::MatrixXd& Mx);
159 
163  void setLambda(const double lambda);
167  void setEps(const double eps_in);
171  void setMaxIter(const int maxiter_in);
172 
178  unsigned int getNrZeroSigmas()const {return nrZeroSigmas;};
179 
183  double getSigmaMin()const {return sigmaMin;};
184 
188  int getSigma(Eigen::VectorXd& Sout);
189 
193  double getEps()const {return eps;};
194 
198  double getLambda()const {return lambda;};
199 
204  double getLambdaScaled()const {return lambda_scaled;};
205 
210  int getSVDResult()const {return svdResult;};
211 
213  virtual const char* strError(const int error) const;
214 
216  virtual void updateInternalDataStructures();
217 
218  private:
219  const Chain& chain;
221  unsigned int nj;
223  Eigen::MatrixXd U;
224  Eigen::VectorXd S;
225  Eigen::MatrixXd V;
226  double eps;
227  int maxiter;
228  Eigen::VectorXd tmp;
229  Eigen::MatrixXd tmp_jac;
230  Eigen::MatrixXd tmp_jac_weight1;
231  Eigen::MatrixXd tmp_jac_weight2;
232  Eigen::MatrixXd tmp_ts;
233  Eigen::MatrixXd tmp_js;
234  Eigen::MatrixXd weight_ts;
235  Eigen::MatrixXd weight_js;
236  double lambda;
238  unsigned int nrZeroSigmas ;
240  double sigmaMin;
241  };
242 }
243 #endif
244 
ChainIkSolverVel_wdls(const Chain &chain, double eps=0.00001, int maxiter=150)
int setWeightJS(const Eigen::MatrixXd &Mq)
int setWeightTS(const Eigen::MatrixXd &Mx)
This class encapsulates a serial kinematic interconnection structure. It is built out of segments...
Definition: chain.hpp:35
This class represents an fixed size array containing joint values of a KDL::Chain.
Definition: jntarray.hpp:69
virtual const char * strError(const int error) const
static const int E_CONVERGE_PINV_SINGULAR
solution converged but (pseudo)inverse is singular
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
Class to calculate the jacobian of a general KDL::Chain, it is used by other solvers. It should not be used outside of KDL.
represents both translational and rotational velocities.
Definition: frames.hpp:720
virtual int CartToJnt(const JntArray &q_init, const FrameVel &v_in, JntArrayVel &q_out)
void setEps(const double eps_in)
int getSigma(Eigen::VectorXd &Sout)
void setLambda(const double lambda)
unsigned int getNrZeroSigmas() const
int error
Latest error, initialized to E_NOERROR in constructor.
Definition: solveri.hpp:149
void setMaxIter(const int maxiter_in)
This abstract class encapsulates the inverse velocity solver for a KDL::Chain.


orocos_kdl
Author(s):
autogenerated on Sat Jun 15 2019 19:07:36