Orocos KDL
chainiksolvervel_pinv.hpp
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_PINV_HPP
23#define KDL_CHAIN_IKSOLVERVEL_PINV_HPP
24
25#include "chainiksolver.hpp"
26#include "chainjnttojacsolver.hpp"
27#include "utilities/svd_HH.hpp"
28
29namespace KDL
30{
41 {
42 public:
44 static const int E_CONVERGE_PINV_SINGULAR = +100;
45
57 explicit ChainIkSolverVel_pinv(const Chain& chain,double eps=0.00001,int maxiter=150);
59
75 virtual int CartToJnt(const JntArray& q_in, const Twist& v_in, JntArray& qdot_out);
80 virtual int CartToJnt(const JntArray& /*q_init*/, const FrameVel& /*v_in*/, JntArrayVel& /*q_out*/){return (error = E_NOT_IMPLEMENTED);};
81
87 unsigned int getNrZeroSigmas()const {return nrZeroSigmas;};
88
93 int getSVDResult()const {return svdResult;};
94
96 virtual const char* strError(const int error) const;
97
100 private:
101 const Chain& chain;
102 ChainJntToJacSolver jnt2jac;
103 unsigned int nj;
104 Jacobian jac;
105 SVD_HH svd;
106 std::vector<JntArray> U;
107 JntArray S;
108 std::vector<JntArray> V;
109 JntArray tmp;
110 double eps;
111 int maxiter;
112 unsigned int nrZeroSigmas;
113 int svdResult;
114
115 };
116}
117#endif
118
unsigned int getNrZeroSigmas() const
Definition chainiksolvervel_pinv.hpp:87
virtual int CartToJnt(const JntArray &, const FrameVel &, JntArrayVel &)
Definition chainiksolvervel_pinv.hpp:80
ChainIkSolverVel_pinv(const Chain &chain, double eps=0.00001, int maxiter=150)
int getSVDResult() const
Definition chainiksolvervel_pinv.hpp:93
static const int E_CONVERGE_PINV_SINGULAR
solution converged but (pseudo)inverse is singular
Definition chainiksolvervel_pinv.hpp:44
virtual void updateInternalDataStructures()
virtual const char * strError(const int error) const
virtual int CartToJnt(const JntArray &q_in, const Twist &v_in, JntArray &qdot_out)
This abstract class encapsulates the inverse velocity solver for a KDL::Chain.
Definition chainiksolver.hpp:66
Class to calculate the jacobian of a general KDL::Chain, it is used by other solvers.
Definition chainjnttojacsolver.hpp:39
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
Definition chain.hpp:35
Definition framevel.hpp:216
Definition jacobian.hpp:37
Definition jntarrayvel.hpp:46
Definition jntarray.hpp:70
Definition svd_HH.hpp:33
@ E_NOT_IMPLEMENTED
Not yet implemented.
Definition solveri.hpp:105
int error
Latest error, initialized to E_NOERROR in constructor.
Definition solveri.hpp:149
represents both translational and rotational velocities.
Definition frames.hpp:723
Definition articulatedbodyinertia.hpp:32