kinematics-dynamics
Loading...
Searching...
No Matches
ScrewTheoryIkSubproblems.hpp
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3#ifndef __SCREW_THEORY_IK_SUBPROBLEMS_HPP__
4#define __SCREW_THEORY_IK_SUBPROBLEMS_HPP__
5
6#include <kdl/frames.hpp>
7
8#include "ScrewTheoryIkProblem.hpp"
9#include "MatrixExponential.hpp"
10
11namespace roboticslab
12{
13
24{
25public:
27
34 PadenKahanOne(const MatrixExponential & exp, const KDL::Vector & p);
35
36 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
37
38 int solutions() const override
39 { return 1; }
40
41 const char * describe() const override
42 { return "PK1"; }
43
44private:
45 const MatrixExponential exp;
46 const KDL::Vector p;
47 const KDL::Rotation axisPow;
48};
49
60{
61public:
63
72 PadenKahanTwo(const MatrixExponential & exp1, const MatrixExponential & exp2, const KDL::Vector & p, const KDL::Vector & r);
73
74 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
75
76 int solutions() const override
77 { return 2; }
78
79 const char * describe() const override
80 { return "PK2"; }
81
82private:
83 const MatrixExponential exp1, exp2;
84 const KDL::Vector p, r, axesCross;
85 const KDL::Rotation axisPow1, axisPow2;
86 const double axesDot;
87};
88
99{
100public:
102
110 PadenKahanThree(const MatrixExponential & exp, const KDL::Vector & p, const KDL::Vector & k);
111
112 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
113
114 int solutions() const override
115 { return 2; }
116
117 const char * describe() const override
118 { return "PK3"; }
119
120private:
121 const MatrixExponential exp;
122 const KDL::Vector p, k;
123 const KDL::Rotation axisPow;
124};
125
137{
138public:
140
147 PardosGotorOne(const MatrixExponential & exp, const KDL::Vector & p);
148
149 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
150
151 int solutions() const override
152 { return 1; }
153
154 const char * describe() const override
155 { return "PG1"; }
156
157private:
158 const MatrixExponential exp;
159 const KDL::Vector p;
160};
161
173{
174public:
176
184 PardosGotorTwo(const MatrixExponential & exp1, const MatrixExponential & exp2, const KDL::Vector & p);
185
186 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
187
188 int solutions() const override
189 { return 1; }
190
191 const char * describe() const override
192 { return "PG2"; }
193
194private:
195 const MatrixExponential exp1, exp2;
196 const KDL::Vector p, crossPr2;
197 const double crossPr2Norm;
198};
199
211{
212public:
214
222 PardosGotorThree(const MatrixExponential & exp, const KDL::Vector & p, const KDL::Vector & k);
223
224 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
225
226 int solutions() const override
227 { return 2; }
228
229 const char * describe() const override
230 { return "PG3"; }
231
232private:
233 const MatrixExponential exp;
234 const KDL::Vector p, k;
235};
236
248{
249public:
251
259 PardosGotorFour(const MatrixExponential & exp1, const MatrixExponential & exp2, const KDL::Vector & p);
260
261 bool solve(const KDL::Frame & rhs, const KDL::Frame & pointTransform, const JointConfig & reference, Solutions & solutions) const override;
262
263 int solutions() const override
264 { return 2; }
265
266 const char * describe() const override
267 { return "PG4"; }
268
269private:
270 const MatrixExponential exp1, exp2;
271 const KDL::Vector p, n;
272 const KDL::Rotation axisPow;
273};
274
275} // namespace roboticslab
276
277#endif // __SCREW_THEORY_IK_SUBPROBLEMS_HPP__
Abstraction of a term in a product of exponentials (POE) formula.
Definition MatrixExponential.hpp:19
First Paden-Kahan subproblem.
Definition ScrewTheoryIkSubproblems.hpp:24
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PadenKahanSubproblems.cpp:21
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:41
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:38
Third Paden-Kahan subproblem.
Definition ScrewTheoryIkSubproblems.hpp:99
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:117
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:114
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PadenKahanSubproblems.cpp:162
Second Paden-Kahan subproblem.
Definition ScrewTheoryIkSubproblems.hpp:60
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:79
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PadenKahanSubproblems.cpp:62
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:76
Fourth Pardos-Gotor subproblem.
Definition ScrewTheoryIkSubproblems.hpp:248
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:263
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:266
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PardosGotorSubproblems.cpp:135
First Pardos-Gotor subproblem.
Definition ScrewTheoryIkSubproblems.hpp:137
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:151
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:154
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PardosGotorSubproblems.cpp:31
Third Pardos-Gotor subproblem.
Definition ScrewTheoryIkSubproblems.hpp:211
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:229
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PardosGotorSubproblems.cpp:92
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:226
Second Pardos-Gotor subproblem.
Definition ScrewTheoryIkSubproblems.hpp:173
bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const override
Finds a closed geometric solution for this IK subproblem.
Definition PardosGotorSubproblems.cpp:55
int solutions() const override
Number of local IK solutions.
Definition ScrewTheoryIkSubproblems.hpp:188
const char * describe() const override
Return a human-readable description of this IK subproblem.
Definition ScrewTheoryIkSubproblems.hpp:191
Interface shared by all IK subproblems found in Screw Theory applied to Robotics.
Definition ScrewTheoryIkProblem.hpp:26
virtual bool solve(const KDL::Frame &rhs, const KDL::Frame &pointTransform, const JointConfig &reference, Solutions &solutions) const =0
Finds a closed geometric solution for this IK subproblem.
std::vector< double > JointConfig
Joint configurations.
Definition ScrewTheoryIkProblem.hpp:29
std::vector< JointConfig > Solutions
Collection of local IK solutions.
Definition ScrewTheoryIkProblem.hpp:32
The main, catch-all namespace for Robotics Lab UC3M.
Definition groups.dox:6