KDL 1.5.1
Loading...
Searching...
No Matches
framevel.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 * \file
3 * This file contains the definition of classes for a
4 * Rall Algebra of (subset of) the classes defined in frames,
5 * i.e. classes that contain a pair (value,derivative) and define operations on that pair
6 * this classes are useful for automatic differentiation ( <-> symbolic diff , <-> numeric diff)
7 * Defines VectorVel, RotationVel, FrameVel. Look at Frames.h for details on how to work
8 * with Frame objects.
9 * \author
10 * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
11 *
12 * \version
13 * ORO_Geometry V0.2
14 *
15 * \par History
16 * - $log$
17 *
18 * \par Release
19 * $Id: rframes.h,v 1.1.1.1 2002/08/26 14:14:21 rmoreas Exp $
20 * $Name: $
21 ****************************************************************************/
22
23#ifndef KDL_FRAMEVEL_H
24#define KDL_FRAMEVEL_H
25
26#include "utilities/utility.h"
27#include "utilities/rall1d.h"
28#include "utilities/traits.h"
29
30#include "frames.hpp"
31
32
33
34namespace KDL {
35
36typedef Rall1d<double> doubleVel;
37
38IMETHOD doubleVel diff(const doubleVel& a,const doubleVel& b,double dt=1.0) {
39 return doubleVel((b.t-a.t)/dt,(b.grad-a.grad)/dt);
40}
41
42IMETHOD doubleVel addDelta(const doubleVel& a,const doubleVel&da,double dt=1.0) {
43 return doubleVel(a.t+da.t*dt,a.grad+da.grad*dt);
44}
45
46IMETHOD void random(doubleVel& F) {
47 random(F.t);
48 random(F.grad);
49}
50IMETHOD void posrandom(doubleVel& F) {
51 posrandom(F.t);
52 posrandom(F.grad);
53}
54
55}
56
57template <>
58struct Traits<KDL::doubleVel> {
59 typedef double valueType;
61};
62
63namespace KDL {
64
65class TwistVel;
66class VectorVel;
67class FrameVel;
68class RotationVel;
69
70// Equal is friend function, but default arguments for friends are forbidden (ยง8.3.6.4)
71IMETHOD bool Equal(const VectorVel& r1,const VectorVel& r2,double eps=epsilon);
72IMETHOD bool Equal(const Vector& r1,const VectorVel& r2,double eps=epsilon);
73IMETHOD bool Equal(const VectorVel& r1,const Vector& r2,double eps=epsilon);
74IMETHOD bool Equal(const RotationVel& r1,const RotationVel& r2,double eps=epsilon);
75IMETHOD bool Equal(const Rotation& r1,const RotationVel& r2,double eps=epsilon);
76IMETHOD bool Equal(const RotationVel& r1,const Rotation& r2,double eps=epsilon);
77IMETHOD bool Equal(const FrameVel& r1,const FrameVel& r2,double eps=epsilon);
78IMETHOD bool Equal(const Frame& r1,const FrameVel& r2,double eps=epsilon);
79IMETHOD bool Equal(const FrameVel& r1,const Frame& r2,double eps=epsilon);
80IMETHOD bool Equal(const TwistVel& a,const TwistVel& b,double eps=epsilon);
81IMETHOD bool Equal(const Twist& a,const TwistVel& b,double eps=epsilon);
82IMETHOD bool Equal(const TwistVel& a,const Twist& b,double eps=epsilon);
83
85// = TITLE
86// An VectorVel is a Vector and its first derivative
87// = CLASS TYPE
88// Concrete
89{
90public:
91 Vector p; // position vector
92 Vector v; // velocity vector
93public:
94 VectorVel():p(),v(){}
95 VectorVel(const Vector& _p,const Vector& _v):p(_p),v(_v) {}
96 explicit VectorVel(const Vector& _p):p(_p),v(Vector::Zero()) {}
97
98 Vector value() const { return p;}
99 Vector deriv() const { return v;}
100
101 IMETHOD VectorVel& operator = (const VectorVel& arg);
102 IMETHOD VectorVel& operator = (const Vector& arg);
103 IMETHOD VectorVel& operator += (const VectorVel& arg);
104 IMETHOD VectorVel& operator -= (const VectorVel& arg);
105 IMETHOD static VectorVel Zero();
106 IMETHOD void ReverseSign();
107 IMETHOD doubleVel Norm(double eps=epsilon) const;
108 IMETHOD friend VectorVel operator + (const VectorVel& r1,const VectorVel& r2);
109 IMETHOD friend VectorVel operator - (const VectorVel& r1,const VectorVel& r2);
110 IMETHOD friend VectorVel operator + (const Vector& r1,const VectorVel& r2);
111 IMETHOD friend VectorVel operator - (const Vector& r1,const VectorVel& r2);
112 IMETHOD friend VectorVel operator + (const VectorVel& r1,const Vector& r2);
113 IMETHOD friend VectorVel operator - (const VectorVel& r1,const Vector& r2);
114 IMETHOD friend VectorVel operator * (const VectorVel& r1,const VectorVel& r2);
115 IMETHOD friend VectorVel operator * (const VectorVel& r1,const Vector& r2);
116 IMETHOD friend VectorVel operator * (const Vector& r1,const VectorVel& r2);
117 IMETHOD friend VectorVel operator * (const VectorVel& r1,double r2);
118 IMETHOD friend VectorVel operator * (double r1,const VectorVel& r2);
119 IMETHOD friend VectorVel operator * (const doubleVel& r1,const VectorVel& r2);
120 IMETHOD friend VectorVel operator * (const VectorVel& r2,const doubleVel& r1);
121 IMETHOD friend VectorVel operator*(const Rotation& R,const VectorVel& x);
122
123 IMETHOD friend VectorVel operator / (const VectorVel& r1,double r2);
124 IMETHOD friend VectorVel operator / (const VectorVel& r2,const doubleVel& r1);
125 IMETHOD friend void SetToZero(VectorVel& v);
126
127
128 IMETHOD friend bool Equal(const VectorVel& r1,const VectorVel& r2,double eps);
129 IMETHOD friend bool Equal(const Vector& r1,const VectorVel& r2,double eps);
130 IMETHOD friend bool Equal(const VectorVel& r1,const Vector& r2,double eps);
131
132 IMETHOD friend bool operator==(const VectorVel& r1,const VectorVel& r2);
133 IMETHOD friend bool operator!=(const VectorVel& r1,const VectorVel& r2);
134 IMETHOD friend bool operator==(const Vector& r1,const VectorVel& r2);
135 IMETHOD friend bool operator!=(const Vector& r1,const VectorVel& r2);
136 IMETHOD friend bool operator==(const VectorVel& r1,const Vector& r2);
137 IMETHOD friend bool operator!=(const VectorVel& r1,const Vector& r2);
138
139 IMETHOD friend VectorVel operator - (const VectorVel& r);
140 IMETHOD friend doubleVel dot(const VectorVel& lhs,const VectorVel& rhs);
141 IMETHOD friend doubleVel dot(const VectorVel& lhs,const Vector& rhs);
142 IMETHOD friend doubleVel dot(const Vector& lhs,const VectorVel& rhs);
143};
144
145
146
148// = TITLE
149// An RotationVel is a Rotation and its first derivative, a rotation vector
150// = CLASS TYPE
151// Concrete
152{
153public:
154 Rotation R; // Rotation matrix
155 Vector w; // rotation vector
156public:
157 RotationVel():R(),w() {}
158 explicit RotationVel(const Rotation& _R):R(_R),w(Vector::Zero()){}
159 RotationVel(const Rotation& _R,const Vector& _w):R(_R),w(_w){}
160
161
162 Rotation value() const { return R;}
163 Vector deriv() const { return w;}
164
165
166 IMETHOD RotationVel& operator = (const RotationVel& arg);
167 IMETHOD RotationVel& operator = (const Rotation& arg);
168 IMETHOD VectorVel UnitX() const;
169 IMETHOD VectorVel UnitY() const;
170 IMETHOD VectorVel UnitZ() const;
171 IMETHOD static RotationVel Identity();
172 IMETHOD RotationVel Inverse() const;
173 IMETHOD VectorVel Inverse(const VectorVel& arg) const;
174 IMETHOD VectorVel Inverse(const Vector& arg) const;
175 IMETHOD VectorVel operator*(const VectorVel& arg) const;
176 IMETHOD VectorVel operator*(const Vector& arg) const;
177 IMETHOD void DoRotX(const doubleVel& angle);
178 IMETHOD void DoRotY(const doubleVel& angle);
179 IMETHOD void DoRotZ(const doubleVel& angle);
180 IMETHOD static RotationVel RotX(const doubleVel& angle);
181 IMETHOD static RotationVel RotY(const doubleVel& angle);
182 IMETHOD static RotationVel RotZ(const doubleVel& angle);
183 IMETHOD static RotationVel Rot(const Vector& rotvec,const doubleVel& angle);
184 // rotvec has arbitrary norm
185 // rotation around a constant vector !
186 IMETHOD static RotationVel Rot2(const Vector& rotvec,const doubleVel& angle);
187 // rotvec is normalized.
188 // rotation around a constant vector !
189 IMETHOD friend RotationVel operator* (const RotationVel& r1,const RotationVel& r2);
190 IMETHOD friend RotationVel operator* (const Rotation& r1,const RotationVel& r2);
191 IMETHOD friend RotationVel operator* (const RotationVel& r1,const Rotation& r2);
192 IMETHOD friend bool Equal(const RotationVel& r1,const RotationVel& r2,double eps);
193 IMETHOD friend bool Equal(const Rotation& r1,const RotationVel& r2,double eps);
194 IMETHOD friend bool Equal(const RotationVel& r1,const Rotation& r2,double eps);
195
196 IMETHOD friend bool operator==(const RotationVel& r1,const RotationVel& r2);
197 IMETHOD friend bool operator!=(const RotationVel& r1,const RotationVel& r2);
198 IMETHOD friend bool operator==(const Rotation& r1,const RotationVel& r2);
199 IMETHOD friend bool operator!=(const Rotation& r1,const RotationVel& r2);
200 IMETHOD friend bool operator==(const RotationVel& r1,const Rotation& r2);
201 IMETHOD friend bool operator!=(const RotationVel& r1,const Rotation& r2);
202
203 IMETHOD TwistVel Inverse(const TwistVel& arg) const;
204 IMETHOD TwistVel Inverse(const Twist& arg) const;
205 IMETHOD TwistVel operator * (const TwistVel& arg) const;
206 IMETHOD TwistVel operator * (const Twist& arg) const;
207};
208
209
210
211
213// = TITLE
214// An FrameVel is a Frame and its first derivative, a Twist vector
215// = CLASS TYPE
216// Concrete
217// = CAVEATS
218//
219{
220public:
223public:
225
226 explicit FrameVel(const Frame& _T):
227 M(_T.M),p(_T.p) {}
228
229 FrameVel(const Frame& _T,const Twist& _t):
230 M(_T.M,_t.rot),p(_T.p,_t.vel) {}
231
232 FrameVel(const RotationVel& _M,const VectorVel& _p):
233 M(_M),p(_p) {}
234
235
236 Frame value() const { return Frame(M.value(),p.value());}
237 Twist deriv() const { return Twist(p.deriv(),M.deriv());}
238
239
240 IMETHOD FrameVel& operator = (const Frame& arg);
241 IMETHOD FrameVel& operator = (const FrameVel& arg);
242 IMETHOD static FrameVel Identity();
243 IMETHOD FrameVel Inverse() const;
244 IMETHOD VectorVel Inverse(const VectorVel& arg) const;
245 IMETHOD VectorVel operator*(const VectorVel& arg) const;
246 IMETHOD VectorVel operator*(const Vector& arg) const;
247 IMETHOD VectorVel Inverse(const Vector& arg) const;
248 IMETHOD Frame GetFrame() const;
249 IMETHOD Twist GetTwist() const;
250 IMETHOD friend FrameVel operator * (const FrameVel& f1,const FrameVel& f2);
251 IMETHOD friend FrameVel operator * (const Frame& f1,const FrameVel& f2);
252 IMETHOD friend FrameVel operator * (const FrameVel& f1,const Frame& f2);
253 IMETHOD friend bool Equal(const FrameVel& r1,const FrameVel& r2,double eps);
254 IMETHOD friend bool Equal(const Frame& r1,const FrameVel& r2,double eps);
255 IMETHOD friend bool Equal(const FrameVel& r1,const Frame& r2,double eps);
256
257 IMETHOD friend bool operator==(const FrameVel& a,const FrameVel& b);
258 IMETHOD friend bool operator!=(const FrameVel& a,const FrameVel& b);
259 IMETHOD friend bool operator==(const Frame& a,const FrameVel& b);
260 IMETHOD friend bool operator!=(const Frame& a,const FrameVel& b);
261 IMETHOD friend bool operator==(const FrameVel& a,const Frame& b);
262 IMETHOD friend bool operator!=(const FrameVel& a,const Frame& b);
263
264 IMETHOD TwistVel Inverse(const TwistVel& arg) const;
265 IMETHOD TwistVel Inverse(const Twist& arg) const;
266 IMETHOD TwistVel operator * (const TwistVel& arg) const;
267 IMETHOD TwistVel operator * (const Twist& arg) const;
268};
269
270
271
272
273
274//very similar to Wrench class.
276// = TITLE
277// This class represents a TwistVel. This is a velocity and rotational velocity together
278{
279public:
282public:
283
284// = Constructors
285 TwistVel():vel(),rot() {};
286 TwistVel(const VectorVel& _vel,const VectorVel& _rot):vel(_vel),rot(_rot) {};
287 TwistVel(const Twist& p,const Twist& v):vel(p.vel, v.vel), rot( p.rot, v.rot) {};
288 TwistVel(const Twist& p):vel(p.vel), rot( p.rot) {};
289
290 Twist value() const {
291 return Twist(vel.value(),rot.value());
292 }
293 Twist deriv() const {
294 return Twist(vel.deriv(),rot.deriv());
295 }
296// = Operators
297 IMETHOD TwistVel& operator-=(const TwistVel& arg);
298 IMETHOD TwistVel& operator+=(const TwistVel& arg);
299
300// = External operators
301 IMETHOD friend TwistVel operator*(const TwistVel& lhs,double rhs);
302 IMETHOD friend TwistVel operator*(double lhs,const TwistVel& rhs);
303 IMETHOD friend TwistVel operator/(const TwistVel& lhs,double rhs);
304
305 IMETHOD friend TwistVel operator*(const TwistVel& lhs,const doubleVel& rhs);
306 IMETHOD friend TwistVel operator*(const doubleVel& lhs,const TwistVel& rhs);
307 IMETHOD friend TwistVel operator/(const TwistVel& lhs,const doubleVel& rhs);
308
309 IMETHOD friend TwistVel operator+(const TwistVel& lhs,const TwistVel& rhs);
310 IMETHOD friend TwistVel operator-(const TwistVel& lhs,const TwistVel& rhs);
311 IMETHOD friend TwistVel operator-(const TwistVel& arg);
312 IMETHOD friend void SetToZero(TwistVel& v);
313
314
315// = Zero
316 static IMETHOD TwistVel Zero();
317
318// = Reverse Sign
319 IMETHOD void ReverseSign();
320
321// = Change Reference point
322 IMETHOD TwistVel RefPoint(const VectorVel& v_base_AB);
323 // Changes the reference point of the TwistVel.
324 // The VectorVel v_base_AB is expressed in the same base as the TwistVel
325 // The VectorVel v_base_AB is a VectorVel from the old point to
326 // the new point.
327 // Complexity : 6M+6A
328
329 // = Equality operators
330 // do not use operator == because the definition of Equal(.,.) is slightly
331 // different. It compares whether the 2 arguments are equal in an eps-interval
332 IMETHOD friend bool Equal(const TwistVel& a,const TwistVel& b,double eps);
333 IMETHOD friend bool Equal(const Twist& a,const TwistVel& b,double eps);
334 IMETHOD friend bool Equal(const TwistVel& a,const Twist& b,double eps);
335
336 IMETHOD friend bool operator==(const TwistVel& a,const TwistVel& b);
337 IMETHOD friend bool operator!=(const TwistVel& a,const TwistVel& b);
338 IMETHOD friend bool operator==(const Twist& a,const TwistVel& b);
339 IMETHOD friend bool operator!=(const Twist& a,const TwistVel& b);
340 IMETHOD friend bool operator==(const TwistVel& a,const Twist& b);
341 IMETHOD friend bool operator!=(const TwistVel& a,const Twist& b);
342
343// = Conversion to other entities
344 IMETHOD Twist GetTwist() const;
345 IMETHOD Twist GetTwistDot() const;
346// = Friends
347 friend class RotationVel;
348 friend class FrameVel;
349
350};
351
352IMETHOD VectorVel diff(const VectorVel& a,const VectorVel& b,double dt=1.0) {
353 return VectorVel(diff(a.p,b.p,dt),diff(a.v,b.v,dt));
354}
355
356IMETHOD VectorVel addDelta(const VectorVel& a,const VectorVel&da,double dt=1.0) {
357 return VectorVel(addDelta(a.p,da.p,dt),addDelta(a.v,da.v,dt));
358}
359IMETHOD VectorVel diff(const RotationVel& a,const RotationVel& b,double dt = 1.0) {
360 return VectorVel(diff(a.R,b.R,dt),diff(a.w,b.w,dt));
361}
362
363IMETHOD RotationVel addDelta(const RotationVel& a,const VectorVel&da,double dt=1.0) {
364 return RotationVel(addDelta(a.R,da.p,dt),addDelta(a.w,da.v,dt));
365}
366
367IMETHOD TwistVel diff(const FrameVel& a,const FrameVel& b,double dt=1.0) {
368 return TwistVel(diff(a.M,b.M,dt),diff(a.p,b.p,dt));
369}
370
371IMETHOD FrameVel addDelta(const FrameVel& a,const TwistVel& da,double dt=1.0) {
372 return FrameVel(
373 addDelta(a.M,da.rot,dt),
374 addDelta(a.p,da.vel,dt)
375 );
376}
377
378IMETHOD void random(VectorVel& a) {
379 random(a.p);
380 random(a.v);
381}
382IMETHOD void random(TwistVel& a) {
383 random(a.vel);
384 random(a.rot);
385}
386
387IMETHOD void random(RotationVel& R) {
388 random(R.R);
389 random(R.w);
390}
391
392IMETHOD void random(FrameVel& F) {
393 random(F.M);
394 random(F.p);
395}
396IMETHOD void posrandom(VectorVel& a) {
397 posrandom(a.p);
398 posrandom(a.v);
399}
400IMETHOD void posrandom(TwistVel& a) {
401 posrandom(a.vel);
402 posrandom(a.rot);
403}
404
405IMETHOD void posrandom(RotationVel& R) {
406 posrandom(R.R);
407 posrandom(R.w);
408}
409
410IMETHOD void posrandom(FrameVel& F) {
411 posrandom(F.M);
412 posrandom(F.p);
413}
414
415#ifdef KDL_INLINE
416#include "framevel.inl"
417#endif
418
419} // namespace
420
421#endif
422
423
424
425
Definition: framevel.hpp:219
IMETHOD friend FrameVel operator*(const FrameVel &f1, const FrameVel &f2)
FrameVel(const RotationVel &_M, const VectorVel &_p)
Definition: framevel.hpp:232
IMETHOD friend bool operator==(const Frame &a, const FrameVel &b)
IMETHOD friend bool operator!=(const FrameVel &a, const Frame &b)
IMETHOD friend bool Equal(const FrameVel &r1, const FrameVel &r2, double eps)
Frame value() const
Definition: framevel.hpp:236
IMETHOD friend bool operator==(const FrameVel &a, const FrameVel &b)
IMETHOD FrameVel & operator=(const Frame &arg)
Definition: framevel.inl:70
FrameVel(const Frame &_T)
Definition: framevel.hpp:226
Twist deriv() const
Definition: framevel.hpp:237
FrameVel(const Frame &_T, const Twist &_t)
Definition: framevel.hpp:229
IMETHOD Twist GetTwist() const
Definition: framevel.inl:124
IMETHOD friend bool Equal(const Frame &r1, const FrameVel &r2, double eps)
IMETHOD friend bool Equal(const FrameVel &r1, const Frame &r2, double eps)
VectorVel p
Definition: framevel.hpp:222
FrameVel()
Definition: framevel.hpp:224
IMETHOD Frame GetFrame() const
Definition: framevel.inl:120
IMETHOD friend bool operator!=(const FrameVel &a, const FrameVel &b)
IMETHOD friend bool operator==(const FrameVel &a, const Frame &b)
IMETHOD FrameVel Inverse() const
Definition: framevel.inl:65
RotationVel M
Definition: framevel.hpp:221
static IMETHOD FrameVel Identity()
Definition: framevel.inl:28
IMETHOD friend bool operator!=(const Frame &a, const FrameVel &b)
Definition: frames.hpp:570
Definition: framevel.hpp:152
IMETHOD friend bool operator!=(const Rotation &r1, const RotationVel &r2)
IMETHOD VectorVel UnitY() const
Definition: framevel.inl:156
static IMETHOD RotationVel RotZ(const doubleVel &angle)
Definition: framevel.inl:224
RotationVel(const Rotation &_R, const Vector &_w)
Definition: framevel.hpp:159
IMETHOD RotationVel & operator=(const RotationVel &arg)
Definition: framevel.inl:141
IMETHOD RotationVel Inverse() const
Definition: framevel.inl:170
IMETHOD friend bool operator==(const RotationVel &r1, const RotationVel &r2)
Vector deriv() const
Definition: framevel.hpp:163
IMETHOD VectorVel UnitX() const
Definition: framevel.inl:152
static IMETHOD RotationVel Identity()
Definition: framevel.inl:166
static IMETHOD RotationVel RotX(const doubleVel &angle)
Definition: framevel.inl:208
IMETHOD friend bool Equal(const RotationVel &r1, const RotationVel &r2, double eps)
static IMETHOD RotationVel Rot(const Vector &rotvec, const doubleVel &angle)
Definition: framevel.inl:229
IMETHOD friend bool operator!=(const RotationVel &r1, const Rotation &r2)
IMETHOD friend bool Equal(const Rotation &r1, const RotationVel &r2, double eps)
IMETHOD VectorVel UnitZ() const
Definition: framevel.inl:160
IMETHOD friend bool operator!=(const RotationVel &r1, const RotationVel &r2)
RotationVel()
Definition: framevel.hpp:157
IMETHOD friend bool Equal(const RotationVel &r1, const Rotation &r2, double eps)
IMETHOD void DoRotX(const doubleVel &angle)
Definition: framevel.inl:204
IMETHOD friend bool operator==(const RotationVel &r1, const Rotation &r2)
IMETHOD void DoRotY(const doubleVel &angle)
Definition: framevel.inl:212
Vector w
Definition: framevel.hpp:155
static IMETHOD RotationVel Rot2(const Vector &rotvec, const doubleVel &angle)
Definition: framevel.inl:238
Rotation R
Definition: framevel.hpp:154
IMETHOD void DoRotZ(const doubleVel &angle)
Definition: framevel.inl:220
IMETHOD friend RotationVel operator*(const RotationVel &r1, const RotationVel &r2)
RotationVel(const Rotation &_R)
Definition: framevel.hpp:158
static IMETHOD RotationVel RotY(const doubleVel &angle)
Definition: framevel.inl:216
Rotation value() const
Definition: framevel.hpp:162
IMETHOD friend bool operator==(const Rotation &r1, const RotationVel &r2)
represents rotations in 3 dimensional space.
Definition: frames.hpp:302
Definition: framevel.hpp:278
IMETHOD friend bool operator==(const TwistVel &a, const TwistVel &b)
IMETHOD friend bool operator==(const TwistVel &a, const Twist &b)
IMETHOD friend bool Equal(const Twist &a, const TwistVel &b, double eps)
IMETHOD friend TwistVel operator/(const TwistVel &lhs, double rhs)
IMETHOD friend bool operator!=(const Twist &a, const TwistVel &b)
Twist deriv() const
Definition: framevel.hpp:293
static IMETHOD TwistVel Zero()
Definition: framevel.inl:505
IMETHOD friend void SetToZero(TwistVel &v)
IMETHOD friend bool operator!=(const TwistVel &a, const Twist &b)
TwistVel(const Twist &p, const Twist &v)
Definition: framevel.hpp:287
IMETHOD TwistVel & operator+=(const TwistVel &arg)
Definition: framevel.inl:534
IMETHOD friend TwistVel operator-(const TwistVel &lhs, const TwistVel &rhs)
IMETHOD friend TwistVel operator*(double lhs, const TwistVel &rhs)
Twist value() const
Definition: framevel.hpp:290
IMETHOD friend TwistVel operator*(const doubleVel &lhs, const TwistVel &rhs)
IMETHOD Twist GetTwist() const
Definition: framevel.inl:655
IMETHOD void ReverseSign()
Definition: framevel.inl:511
VectorVel vel
Definition: framevel.hpp:280
TwistVel(const Twist &p)
Definition: framevel.hpp:288
IMETHOD Twist GetTwistDot() const
Definition: framevel.inl:659
IMETHOD friend bool operator==(const Twist &a, const TwistVel &b)
IMETHOD friend TwistVel operator+(const TwistVel &lhs, const TwistVel &rhs)
IMETHOD TwistVel & operator-=(const TwistVel &arg)
Definition: framevel.inl:527
IMETHOD friend TwistVel operator-(const TwistVel &arg)
IMETHOD friend TwistVel operator*(const TwistVel &lhs, double rhs)
IMETHOD friend bool Equal(const TwistVel &a, const Twist &b, double eps)
IMETHOD friend bool operator!=(const TwistVel &a, const TwistVel &b)
IMETHOD TwistVel RefPoint(const VectorVel &v_base_AB)
Definition: framevel.inl:517
VectorVel rot
Definition: framevel.hpp:281
IMETHOD friend TwistVel operator*(const TwistVel &lhs, const doubleVel &rhs)
IMETHOD friend TwistVel operator/(const TwistVel &lhs, const doubleVel &rhs)
TwistVel()
Definition: framevel.hpp:285
IMETHOD friend bool Equal(const TwistVel &a, const TwistVel &b, double eps)
TwistVel(const VectorVel &_vel, const VectorVel &_rot)
Definition: framevel.hpp:286
represents both translational and rotational velocities.
Definition: frames.hpp:720
Definition: framevel.hpp:89
static IMETHOD VectorVel Zero()
Definition: framevel.inl:346
IMETHOD friend doubleVel dot(const VectorVel &lhs, const Vector &rhs)
VectorVel(const Vector &_p, const Vector &_v)
Definition: framevel.hpp:95
IMETHOD friend VectorVel operator+(const VectorVel &r1, const VectorVel &r2)
IMETHOD friend void SetToZero(VectorVel &v)
Vector value() const
Definition: framevel.hpp:98
IMETHOD friend bool Equal(const Vector &r1, const VectorVel &r2, double eps)
Vector p
Definition: framevel.hpp:91
IMETHOD friend VectorVel operator*(const Rotation &R, const VectorVel &x)
Vector v
Definition: framevel.hpp:92
Vector deriv() const
Definition: framevel.hpp:99
IMETHOD friend VectorVel operator-(const VectorVel &r1, const VectorVel &r2)
VectorVel(const Vector &_p)
Definition: framevel.hpp:96
IMETHOD friend doubleVel dot(const Vector &lhs, const VectorVel &rhs)
IMETHOD friend VectorVel operator/(const VectorVel &r1, double r2)
IMETHOD VectorVel & operator=(const VectorVel &arg)
Definition: framevel.inl:325
IMETHOD friend bool Equal(const VectorVel &r1, const Vector &r2, double eps)
IMETHOD friend bool operator!=(const Vector &r1, const VectorVel &r2)
IMETHOD friend bool operator==(const VectorVel &r1, const VectorVel &r2)
IMETHOD friend bool operator!=(const VectorVel &r1, const VectorVel &r2)
IMETHOD friend doubleVel dot(const VectorVel &lhs, const VectorVel &rhs)
IMETHOD friend bool operator==(const VectorVel &r1, const Vector &r2)
IMETHOD doubleVel Norm(double eps=epsilon) const
Definition: framevel.inl:353
IMETHOD friend bool operator==(const Vector &r1, const VectorVel &r2)
IMETHOD friend VectorVel operator*(const VectorVel &r1, const VectorVel &r2)
IMETHOD friend bool Equal(const VectorVel &r1, const VectorVel &r2, double eps)
IMETHOD VectorVel & operator-=(const VectorVel &arg)
Definition: framevel.inl:340
VectorVel()
Definition: framevel.hpp:94
IMETHOD void ReverseSign()
Definition: framevel.inl:349
IMETHOD friend bool operator!=(const VectorVel &r1, const Vector &r2)
IMETHOD VectorVel & operator+=(const VectorVel &arg)
Definition: framevel.inl:335
A concrete implementation of a 3 dimensional vector class.
Definition: frames.hpp:161
Definition: articulatedbodyinertia.cpp:26
Rall1d< double > doubleVel
Definition: framevel.hpp:36
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
determines the difference of vector b with vector a.
IMETHOD void random(doubleVel &F)
Definition: framevel.hpp:46
IMETHOD void posrandom(doubleVel &F)
Definition: framevel.hpp:50
IMETHOD Vector addDelta(const Vector &p_w_a, const Vector &p_w_da, double dt=1)
adds vector da to vector a.
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
double valueType
Definition: framevel.hpp:59
KDL::doubleVel derivType
Definition: framevel.hpp:60