Main Page
Namespaces
Classes
Files
File List
File Members
include
value_setter.h
Go to the documentation of this file.
1
19
#ifndef __INC_VALUE_SETTER
20
#define __INC_VALUE_SETTER
21
22
#include <vector>
23
#include <
frame.h
>
24
#include <
vecmath.h
>
25
#include <
utils.h
>
26
27
namespace
robotLibPbD
28
{
29
30
class
ValueSetter
31
{
32
public
:
33
CFrame
*
frame
;
34
int
x
,
y
,
z
;
35
int
a
,
b
,
g
;
36
int
qx
,
qy
,
qz
,
qw
;
37
38
ValueSetter
()
39
{
40
a = b = g = x = y = z = qx = qw = qy = qz = -1;
41
}
42
43
bool
set
(std::vector<double> &values)
44
{
45
if
(frame == NULL)
46
return
false
;
47
48
CMatrix
pose;
49
if
(a != -1 || b != -1 || g != -1)
50
{
51
/*double alpha, beta, gamma = 0.0;
52
if (a >= 0)
53
alpha = values[a];
54
if (b >= 0)
55
beta = values[b];
56
if (g >= 0)
57
gamma = values[g];*/
58
}
59
else
60
{
61
CVec
quater;
62
63
if
(qw >= 0)
64
quater.
w
= values[
qw
];
65
if
(qx >= 0)
66
quater.
x
= values[
qx
];
67
if
(qy >= 0)
68
quater.
y
= values[
qy
];
69
if
(qz >= 0)
70
quater.
z
= values[
qz
];
71
72
CMathLib::matrixFromQuaternion
(quater, pose);
73
}
74
75
if
(x >= 0)
76
pose.
a
[12] = values[
x
];
77
if
(y >= 0)
78
pose.
a
[13] = values[
y
];
79
if
(z >= 0)
80
pose.
a
[14] = values[
z
];
81
82
frame->
setPose
(pose);
83
return
true
;
84
}
85
};
86
}
87
88
#endif
robotLibPbD::CVec::z
PRECISION z
Definition:
vecmath.h:60
robotLibPbD::ValueSetter::qy
int qy
Definition:
value_setter.h:36
robotLibPbD::ValueSetter::x
int x
Definition:
value_setter.h:34
robotLibPbD::ValueSetter::z
int z
Definition:
value_setter.h:34
vecmath.h
robotLibPbD::ValueSetter::qw
int qw
Definition:
value_setter.h:36
robotLibPbD::ValueSetter::g
int g
Definition:
value_setter.h:35
robotLibPbD::CMatrix::a
PRECISION a[16]
Definition:
vecmath.h:190
robotLibPbD::CMathLib::matrixFromQuaternion
static void matrixFromQuaternion(CVec &quaternion, CMatrix &matrix)
Transforms a quaternion into homogenous matrix representation.
Definition:
vecmath.cpp:372
robotLibPbD::ValueSetter
Definition:
value_setter.h:30
robotLibPbD
Definition:
config.h:22
robotLibPbD::ValueSetter::y
int y
Definition:
value_setter.h:34
robotLibPbD::ValueSetter::ValueSetter
ValueSetter()
Definition:
value_setter.h:38
robotLibPbD::CVec::w
PRECISION w
Definition:
vecmath.h:60
utils.h
robotLibPbD::ValueSetter::qz
int qz
Definition:
value_setter.h:36
robotLibPbD::ValueSetter::b
int b
Definition:
value_setter.h:35
robotLibPbD::ValueSetter::qx
int qx
Definition:
value_setter.h:36
frame.h
robotLibPbD::CVec
Homogenous vector.
Definition:
vecmath.h:57
robotLibPbD::CMatrix
Homogenous matrix.
Definition:
vecmath.h:187
robotLibPbD::CFrame::setPose
virtual void setPose(const CMatrix &pose)
Definition:
frame.h:120
robotLibPbD::ValueSetter::frame
CFrame * frame
Definition:
value_setter.h:33
robotLibPbD::CFrame
Robot types with implemented inverse kinematics.
Definition:
frame.h:39
robotLibPbD::CVec::y
PRECISION y
Definition:
vecmath.h:60
robotLibPbD::CVec::x
PRECISION x
Definition:
vecmath.h:60
robotLibPbD::ValueSetter::a
int a
Definition:
value_setter.h:35
asr_kinematic_chain_optimizer
Author(s): Aumann Florian, Heller Florian, Jäkel Rainer, Wittenbeck Valerij
autogenerated on Mon Jun 10 2019 12:35:36