Orocos KDL
treeiksolverpos_online.hpp
1// Copyright (C) 2011 PAL Robotics S.L. All rights reserved.
2// Copyright (C) 2007-2008 Ruben Smits <ruben dot smits at mech dot kuleuven dot be>
3// Copyright (C) 2008 Mikael Mayer
4// Copyright (C) 2008 Julia Jesse
5
6// Version: 1.0
7// Author: Marcus Liebhardt
8// This class has been derived from the KDL::TreeIkSolverPos_NR_JL class
9// by Julia Jesse, Mikael Mayer and Ruben Smits
10
11// This library is free software; you can redistribute it and/or
12// modify it under the terms of the GNU Lesser General Public
13// License as published by the Free Software Foundation; either
14// version 2.1 of the License, or (at your option) any later version.
15
16// This library is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19// Lesser General Public License for more details.
20
21// You should have received a copy of the GNU Lesser General Public
22// License along with this library; if not, write to the Free Software
23// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25#ifndef KDLTREEIKSOLVERPOS_ONLINE_HPP
26#define KDLTREEIKSOLVERPOS_ONLINE_HPP
27
28#include <vector>
29#include <string>
30#include "treeiksolver.hpp"
31#include "treefksolver.hpp"
32
33namespace KDL {
34
45public:
63
64 TreeIkSolverPos_Online(const double& nr_of_jnts,
65 const std::vector<std::string>& endpoints,
66 const JntArray& q_min,
67 const JntArray& q_max,
68 const JntArray& q_dot_max,
69 const double x_dot_trans_max,
70 const double x_dot_rot_max,
71 TreeFkSolverPos& fksolver,
72 TreeIkSolverVel& iksolver);
73
75
76 virtual double CartToJnt(const JntArray& q_in, const Frames& p_in, JntArray& q_out);
77
78private:
83 void enforceJointVelLimits();
84
90 void enforceCartVelLimits();
91
92 JntArray q_min_;
93 JntArray q_max_;
94 JntArray q_dot_max_;
95 double x_dot_trans_max_;
96 double x_dot_rot_max_;
97 TreeFkSolverPos& fksolver_;
98 TreeIkSolverVel& iksolver_;
99 JntArray q_dot_;
100 Twist twist_;
101 Frames frames_;
102 Twists delta_twists_;
103};
104
105} // namespace
106
107#endif /* KDLTREEIKSOLVERPOS_ONLINE_HPP */
108
Definition jntarray.hpp:70
This abstract class encapsulates a solver for the forward position kinematics for a KDL::Tree.
Definition treefksolver.hpp:45
virtual double CartToJnt(const JntArray &q_in, const Frames &p_in, JntArray &q_out)
TreeIkSolverPos_Online(const double &nr_of_jnts, const std::vector< std::string > &endpoints, const JntArray &q_min, const JntArray &q_max, const JntArray &q_dot_max, const double x_dot_trans_max, const double x_dot_rot_max, TreeFkSolverPos &fksolver, TreeIkSolverVel &iksolver)
This abstract class encapsulates the inverse position solver for a KDL::Chain.
Definition treeiksolver.hpp:28
This abstract class encapsulates the inverse velocity solver for a KDL::Tree.
Definition treeiksolver.hpp:54
represents both translational and rotational velocities.
Definition frames.hpp:723
Definition articulatedbodyinertia.hpp:32
std::map< std::string, Frame > Frames
Definition treeiksolver.hpp:20
std::map< std::string, Twist > Twists
Definition treeiksolver.hpp:18