chainjnttojacdotsolver.hpp
Go to the documentation of this file.
1 /*
2  Computes the Jacobian time derivative
3  Copyright (C) 2015 Antoine Hoarau <hoarau [at] isir.upmc.fr>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 
21 #ifndef KDL_CHAINJNTTOJACDOTSOLVER_HPP
22 #define KDL_CHAINJNTTOJACDOTSOLVER_HPP
23 
24 #include "solveri.hpp"
25 #include "frames.hpp"
26 #include "jntarrayvel.hpp"
27 #include "jacobian.hpp"
28 #include "chain.hpp"
29 #include "framevel.hpp"
30 #include "chainjnttojacsolver.hpp"
32 
33 namespace KDL
34 {
35 
49 {
50 public:
51  static const int E_JAC_DOT_FAILED = -100;
52  static const int E_JACSOLVER_FAILED = -101;
53  static const int E_FKSOLVERPOS_FAILED = -102;
54 
55  // Hybrid representation ref Frame: base, ref Point: end-effector
56  static const int HYBRID = 0;
57  // Body-fixed representation ref Frame: end-effector, ref Point: end-effector
58  static const int BODYFIXED = 1;
59  // Inertial representation ref Frame: base, ref Point: base
60  static const int INERTIAL = 2;
61 
62  explicit ChainJntToJacDotSolver(const Chain& chain);
63  virtual ~ChainJntToJacDotSolver();
72  virtual int JntToJacDot(const KDL::JntArrayVel& q_in, KDL::Twist& jac_dot_q_dot, int seg_nr = -1);
82  virtual int JntToJacDot(const KDL::JntArrayVel& q_in, KDL::Jacobian& jdot, int seg_nr = -1);
83  int setLockedJoints(const std::vector<bool>& locked_joints);
84 
110  void setRepresentation(const int& representation);
111 
113  virtual void updateInternalDataStructures();
114 
116  virtual const char* strError(const int error) const;
117 
118 
119 protected:
128  const Twist& getPartialDerivativeHybrid(const Jacobian& bs_J_ee,
129  const unsigned int& joint_idx,
130  const unsigned int& column_idx);
139  const Twist& getPartialDerivativeBodyFixed(const Jacobian& ee_J_ee,
140  const unsigned int& joint_idx,
141  const unsigned int& column_idx);
150  const Twist& getPartialDerivativeInertial(const Jacobian& bs_J_bs,
151  const unsigned int& joint_idx,
152  const unsigned int& column_idx);
162  const Twist& getPartialDerivative(const Jacobian& J,
163  const unsigned int& joint_idx,
164  const unsigned int& column_idx,
165  const int& representation);
166 private:
167 
168  const Chain& chain;
169  std::vector<bool> locked_joints_;
180 };
181 
182 }
183 #endif
void setRepresentation(const int &representation)
Sets the internal variable for the representation (with a check on the value)
int setLockedJoints(const std::vector< bool > &locked_joints)
Computes the Jacobian time derivative (Jdot) by calculating the partial derivatives regarding to a jo...
const Twist & getPartialDerivativeHybrid(const Jacobian &bs_J_ee, const unsigned int &joint_idx, const unsigned int &column_idx)
Computes .
This class encapsulates a serial kinematic interconnection structure. It is built out of segments...
Definition: chain.hpp:35
const Twist & getPartialDerivativeBodyFixed(const Jacobian &ee_J_ee, const unsigned int &joint_idx, const unsigned int &column_idx)
Computes .
ChainFkSolverPos_recursive fk_solver_
virtual const char * strError(const int error) const
void setBodyFixedRepresentation()
JntToJacDot() will compute in the Body-fixed representation (ref Frame: end-effector, ref Point: end-effector)
Class to calculate the jacobian of a general KDL::Chain, it is used by other solvers.
represents both translational and rotational velocities.
Definition: frames.hpp:720
void setInertialRepresentation()
JntToJacDot() will compute in the Inertial representation (ref Frame: base, ref Point: base) ...
void setHybridRepresentation()
JntToJacDot() will compute in the Hybrid representation (ref Frame: base, ref Point: end-effector) ...
ChainJntToJacDotSolver(const Chain &chain)
virtual int JntToJacDot(const KDL::JntArrayVel &q_in, KDL::Twist &jac_dot_q_dot, int seg_nr=-1)
Computes .
represents a frame transformation in 3D space (rotation + translation)
Definition: frames.hpp:570
const Twist & getPartialDerivative(const Jacobian &J, const unsigned int &joint_idx, const unsigned int &column_idx, const int &representation)
Computes .
int error
Latest error, initialized to E_NOERROR in constructor.
Definition: solveri.hpp:149
const Twist & getPartialDerivativeInertial(const Jacobian &bs_J_bs, const unsigned int &joint_idx, const unsigned int &column_idx)
Computes .


orocos_kdl
Author(s):
autogenerated on Fri Mar 12 2021 03:05:43