| 1 | // Copyright (C) 2007-2008 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>cxx . . $ `<file>/orocos_kdl/src/treeiksolverpos_nr_jl.hpp`/ |
| 2 | // Copyright (C) 2008 Mikael Mayer |
| 3 | // Copyright (C) 2008 Julia Jesse |
| 4 | |
| 5 | // Version: 1.0 |
| 6 | // Author: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> |
| 7 | // Maintainer: Ruben Smits <ruben dot smits at mech dot kuleuven dot be> |
| 8 | // URL: http://www.orocos.org/kdl |
| 9 | |
| 10 | // This library is free software; you can redistribute it and/or |
| 11 | // modify it under the terms of the GNU Lesser General Public |
| 12 | // License as published by the Free Software Foundation; either |
| 13 | // version 2.1 of the License, or (at your option) any later version. |
| 14 | |
| 15 | // This library is distributed in the hope that it will be useful, |
| 16 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | // Lesser General Public License for more details. |
| 19 | |
| 20 | // You should have received a copy of the GNU Lesser General Public |
| 21 | // License along with this library; if not, write to the Free Software |
| 22 | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 23 | |
| 24 | #ifndef KDLTREEIKSOLVERPOS_NR_JL_HPP |
| 25 | #define KDLTREEIKSOLVERPOS_NR_JL_HPPcxx . . $ `orocos_kdl/src/treeiksolverpos_nr_jl.hpp:25:9`! |
| 26 | |
| 27 | #include "treeiksolver.hpp"cxx . . $ `<file>/orocos_kdl/src/treeiksolver.hpp`/ |
| 28 | #include "treefksolver.hpp"cxx . . $ `<file>/orocos_kdl/src/treefksolver.hpp`/ |
| 29 | #include <vector> |
| 30 | #include <string> |
| 31 | |
| 32 | namespace KDLcxx . . $ KDL/ { |
| 33 | |
| 34 | /** |
| 35 | * Implementation of a general inverse position kinematics |
| 36 | * algorithm based on Newton-Raphson iterations to calculate the |
| 37 | * position transformation from Cartesian to joint space of a general |
| 38 | * KDL::Tree. Takes joint limits into account. |
| 39 | * |
| 40 | * @ingroup KinematicFamily |
| 41 | */ |
| 42 | class TreeIkSolverPos_NR_JLcxx . . $ KDL/TreeIkSolverPos_NR_JL#: public TreeIkSolverPoscxx . . $ KDL/TreeIkSolverPos# { |
| 43 | public: |
| 44 | /** |
| 45 | * Constructor of the solver, it needs the tree, a forward |
| 46 | * position kinematics solver and an inverse velocity |
| 47 | * kinematics solver for that tree, and a list of the segments you are interested in. |
| 48 | * |
| 49 | * @param tree the tree to calculate the inverse position for |
| 50 | * @param endpoints the list of endpoints you are interested in. |
| 51 | * @param q_max the maximum joint positions |
| 52 | * @param q_min the minimum joint positions |
| 53 | * @param fksolver a forward position kinematics solver |
| 54 | * @param iksolver an inverse velocity kinematics solver |
| 55 | * @param maxiter the maximum Newton-Raphson iterations, |
| 56 | * default: 100 |
| 57 | * @param eps the precision for the position, used to end the |
| 58 | * iterations, default: epsilon (defined in kdl.hpp) |
| 59 | * |
| 60 | * @return |
| 61 | */ |
| 62 | TreeIkSolverPos_NR_JLcxx . . $ KDL/TreeIkSolverPos_NR_JL#TreeIkSolverPos_NR_JL(8f7cd09f6f39e847).(const Treecxx . . $ KDL/Tree#& tree, const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#>& endpoints, const JntArraycxx . . $ KDL/JntArray#& q_min, const JntArraycxx . . $ KDL/JntArray#& q_max, TreeFkSolverPoscxx . . $ KDL/TreeFkSolverPos#& fksolver,TreeIkSolverVelcxx . . $ KDL/TreeIkSolverVel#& iksolver,unsigned int maxiter=100,double eps=1e-6); |
| 63 | ~cxx . . $ KDL/TreeIkSolverPos_NR_JL#`~TreeIkSolverPos_NR_JL`(ced63f7c635d850d).TreeIkSolverPos_NR_JLcxx . . $ KDL/TreeIkSolverPos_NR_JL#(); |
| 64 | |
| 65 | virtual double CartToJntcxx . . $ KDL/TreeIkSolverPos_NR_JL#CartToJnt(4de30b2056fa66ca).(const JntArraycxx . . $ KDL/JntArray#& q_init, const Framescxx . . $ KDL/Frames#& p_in, JntArraycxx . . $ KDL/JntArray#& q_out); |
| 66 | |
| 67 | private: |
| 68 | const Treecxx . . $ KDL/Tree# treecxx . . $ KDL/TreeIkSolverPos_NR_JL#tree.; |
| 69 | JntArraycxx . . $ KDL/JntArray# q_mincxx . . $ KDL/TreeIkSolverPos_NR_JL#q_min.; |
| 70 | JntArraycxx . . $ KDL/JntArray# q_maxcxx . . $ KDL/TreeIkSolverPos_NR_JL#q_max.; |
| 71 | TreeIkSolverVelcxx . . $ KDL/TreeIkSolverVel#& iksolvercxx . . $ KDL/TreeIkSolverPos_NR_JL#iksolver.; |
| 72 | TreeFkSolverPoscxx . . $ KDL/TreeFkSolverPos#& fksolvercxx . . $ KDL/TreeIkSolverPos_NR_JL#fksolver.; |
| 73 | JntArraycxx . . $ KDL/JntArray# delta_qcxx . . $ KDL/TreeIkSolverPos_NR_JL#delta_q.; |
| 74 | Framescxx . . $ KDL/Frames# framescxx . . $ KDL/TreeIkSolverPos_NR_JL#frames.; |
| 75 | Twistscxx . . $ KDL/Twists# delta_twistscxx . . $ KDL/TreeIkSolverPos_NR_JL#delta_twists.; |
| 76 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> endpointscxx . . $ KDL/TreeIkSolverPos_NR_JL#endpoints.; |
| 77 | |
| 78 | unsigned int maxitercxx . . $ KDL/TreeIkSolverPos_NR_JL#maxiter.; |
| 79 | double epscxx . . $ KDL/TreeIkSolverPos_NR_JL#eps.; |
| 80 | }; |
| 81 | |
| 82 | } |
| 83 | |
| 84 | #endif |