kdl
KDLTypes.hpp
Go to the documentation of this file.
1 #ifndef KDL_WRAPPERS_KDL_TYPES_HPP
2 #define KDL_WRAPPERS_KDL_TYPES_HPP
3 
4 #include <string>
5 #include <vector>
6 #include <base/wrappers/Eigen.hpp>
7 #include <kdl/kdl.hpp>
8 #include <kdl/frames.hpp>
9 #include <kdl/chain.hpp>
10 #include <kdl/jacobian.hpp>
11 #include <kdl/jntarray.hpp>
12 
13 
14 namespace KDL
15 {
16  class Vector;
17  class Vector2;
18  class Rotation;
19  class Rotation2;
20  class Frame;
21  class Frame2;
22  class Wrench;
23  class Twist;
24 
25  class Jacobian;
26  class Joint;
27  class JntArray;
28 
29  class RotationalInertia;
30  class RigidBodyInertia;
31  class Segment;
32  class Chain;
33 }
34 
35 namespace wrappers
36 {
37 
38  struct KDLVector
39  {
40  double data[3];
41 
42  KDLVector() {}
43 
44  KDLVector(::KDL::Vector const&);
45  };
46 
47  struct KDLVector2
48  {
49  double data[2];
50 
52 
53  KDLVector2(::KDL::Vector2 const&);
54  };
55 
56  struct KDLRotation
57  {
58  double data[9];
59 
61 
62  KDLRotation(::KDL::Rotation const&);
63  };
64 
65  struct KDLRotation2
66  {
67  double rotationInRad;
68 
70 
71  KDLRotation2(::KDL::Rotation2 const&);
72  };
73 
74  struct KDLFrame
75  {
76  // origin of the frame
78 
79  // rotation of the frame
81 
82  KDLFrame() {}
83 
84  KDLFrame(::KDL::Frame const&);
85  };
86 
87  struct KDLFrame2
88  {
89  // origin of the frame
91 
92  // rotation of the frame
94 
95  KDLFrame2() {}
96 
97  KDLFrame2(::KDL::Frame2 const&);
98  };
99 
100  struct KDLTwist
101  {
104 
105  KDLTwist() {}
106 
107  KDLTwist(::KDL::Twist const&);
108  };
109 
110  struct KDLWrench
111  {
114 
116 
117  KDLWrench(::KDL::Wrench const&);
118  };
119 
120  struct KDLJacobian
121  {
122  MatrixXd data;
123  };
124 
126 
127  struct KDLJoint
128  {
129 
130  std::string name;
132 // double scale;
133 // double offset;
134 // double inertia;
135 // double damping;
136 // double stiffness;
137 
138  // variables for RotAxis joint
140 
141  // Frame joint_pose;
142  // double q_previous;
143 
144  KDLJoint() {}
145 
146  KDLJoint(::KDL::Joint const&);
147  };
148 
149  struct KDLJntArray
150  {
151  VectorXd data;
152  };
153 
155  {
156  double data[9];
157 
159 
160  KDLRotationalInertia(::KDL::RotationalInertia const&);
161  };
162 
164  {
165  double m;
168 
170 
171  KDLRigidBodyInertia(::KDL::RigidBodyInertia const&);
172  };
173 
174  struct KDLSegment
175  {
176  std::string name;
180 
182 
183  KDLSegment(::KDL::Segment const&);
184  };
185 
186  struct KDLChain
187  {
188  std::vector<KDLSegment> segments;
189 
190  KDLChain() {}
191 
192  KDLChain(::KDL::Chain const&);
193  };
194 
195 } // end namespace wrappers
196 #endif // KDL_WRAPPERS_KDL_TYPES_HPP
197 
Definition: KDLTypes.hpp:174
KDLJoint joint
Definition: KDLTypes.hpp:177
Definition: KDLTypes.hpp:186
KDLRotation2()
Definition: KDLTypes.hpp:69
Definition: KDLTypes.hpp:154
VectorXd data
Definition: KDLTypes.hpp:151
MatrixXd data
Definition: KDLTypes.hpp:122
Definition: KDLTypes.cpp:12
KDLJoint()
Definition: KDLTypes.hpp:144
KDLVector force
Definition: KDLTypes.hpp:112
KDLVector()
Definition: KDLTypes.hpp:42
std::vector< KDLSegment > segments
Definition: KDLTypes.hpp:188
KDLRotation()
Definition: KDLTypes.hpp:60
KDLVector2()
Definition: KDLTypes.hpp:51
Definition: KDLTypes.hpp:163
Definition: KDLTypes.hpp:125
Definition: KDLTypes.hpp:56
Definition: KDLTypes.hpp:125
Definition: KDLTypes.hpp:125
KDLVector cog
Definition: KDLTypes.hpp:167
double m
Definition: KDLTypes.hpp:165
Definition: KDLTypes.hpp:125
KDLVector torque
Definition: KDLTypes.hpp:113
KDLVector origin
Definition: KDLTypes.hpp:139
KDLRotation M
Definition: KDLTypes.hpp:80
Definition: KDLTypes.hpp:125
Definition: KDLTypes.hpp:65
KDLJointType
Definition: KDLTypes.hpp:125
KDLVector rot
Definition: KDLTypes.hpp:103
KDLRotationalInertia()
Definition: KDLTypes.hpp:158
Definition: KDLTypes.hpp:74
KDLRotationalInertia I
Definition: KDLTypes.hpp:166
Definition: KDLTypes.hpp:14
double rotationInRad
Definition: KDLTypes.hpp:67
KDLRigidBodyInertia I
Definition: KDLTypes.hpp:178
Definition: KDLTypes.hpp:149
Definition: KDLTypes.hpp:125
KDLSegment()
Definition: KDLTypes.hpp:181
KDLWrench()
Definition: KDLTypes.hpp:115
KDLFrame()
Definition: KDLTypes.hpp:82
Definition: KDLTypes.hpp:125
Definition: KDLTypes.hpp:120
Definition: KDLTypes.hpp:87
KDLFrame f_tip
Definition: KDLTypes.hpp:179
Definition: KDLTypes.hpp:38
std::string name
Definition: KDLTypes.hpp:176
Definition: KDLTypes.hpp:47
Definition: KDLTypes.hpp:125
KDLRigidBodyInertia()
Definition: KDLTypes.hpp:169
std::string name
Definition: KDLTypes.hpp:130
KDLVector p
Definition: KDLTypes.hpp:77
Definition: KDLTypes.hpp:125
KDLJointType type
Definition: KDLTypes.hpp:131
KDLVector vel
Definition: KDLTypes.hpp:102
KDLRotation2 M
Definition: KDLTypes.hpp:93
KDLVector2 p
Definition: KDLTypes.hpp:90
Definition: KDLTypes.hpp:127
KDLFrame2()
Definition: KDLTypes.hpp:95
KDLChain()
Definition: KDLTypes.hpp:190
Definition: KDLTypes.hpp:100
KDLTwist()
Definition: KDLTypes.hpp:105
Definition: KDLTypes.hpp:110