18 CPPUNIT_ASSERT_EQUAL(2*v-v,v);
19 CPPUNIT_ASSERT_EQUAL(v*2-v,v);
20 CPPUNIT_ASSERT_EQUAL(v+v+v-2*v,v);
22 CPPUNIT_ASSERT_EQUAL(v,v2);
24 CPPUNIT_ASSERT_EQUAL(2*v,v2);
26 CPPUNIT_ASSERT_EQUAL(v,v2);
28 CPPUNIT_ASSERT_EQUAL(v,-v2);
38 CPPUNIT_ASSERT_EQUAL(nu.
Norm(),0.0);
40 CPPUNIT_ASSERT_EQUAL(nu2.
Norm(),10.0);
45 CPPUNIT_ASSERT_EQUAL(nu.
Norm(), 0.0);
56 CPPUNIT_ASSERT_EQUAL(2*t-t,t);
57 CPPUNIT_ASSERT_EQUAL(t*2-t,t);
58 CPPUNIT_ASSERT_EQUAL(t+t+t-2*t,t);
60 CPPUNIT_ASSERT_EQUAL(t,t2);
62 CPPUNIT_ASSERT_EQUAL(2*t,t2);
64 CPPUNIT_ASSERT_EQUAL(t,t2);
66 CPPUNIT_ASSERT_EQUAL(t,-t2);
81 CPPUNIT_ASSERT_EQUAL(2*w-w,w);
82 CPPUNIT_ASSERT_EQUAL(w*2-w,w);
83 CPPUNIT_ASSERT_EQUAL(w+w+w-2*w,w);
85 CPPUNIT_ASSERT_EQUAL(w,w2);
87 CPPUNIT_ASSERT_EQUAL(2*w,w2);
89 CPPUNIT_ASSERT_EQUAL(w,w2);
91 CPPUNIT_ASSERT_EQUAL(w,-w2);
123 CPPUNIT_ASSERT_EQUAL(R,R2);
124 CPPUNIT_ASSERT_DOUBLES_EQUAL((R*v).
Norm(),v.Norm(),
epsilon);
125 CPPUNIT_ASSERT_EQUAL(R.
Inverse(R*v),v);
126 CPPUNIT_ASSERT_EQUAL(R.
Inverse(R*t),t);
127 CPPUNIT_ASSERT_EQUAL(R.
Inverse(R*w),w);
128 CPPUNIT_ASSERT_EQUAL(R*R.
Inverse(v),v);
131 CPPUNIT_ASSERT_EQUAL(R*(R*(R*v)),(R*R*R)*v);
132 CPPUNIT_ASSERT_EQUAL(R*(R*(R*t)),(R*R*R)*t);
133 CPPUNIT_ASSERT_EQUAL(R*(R*(R*w)),(R*R*R)*w);
136 CPPUNIT_ASSERT_EQUAL(R.Inverse()*v,R.Inverse(v));
138 CPPUNIT_ASSERT_DOUBLES_EQUAL(ra,a,
epsilon);
139 CPPUNIT_ASSERT_DOUBLES_EQUAL(rb,b,
epsilon);
140 CPPUNIT_ASSERT_DOUBLES_EQUAL(rc,c,
epsilon);
142 R.GetEulerZYX(ra,rb,rc);
143 CPPUNIT_ASSERT_DOUBLES_EQUAL(ra,a,
epsilon);
144 CPPUNIT_ASSERT_DOUBLES_EQUAL(rb,b,
epsilon);
145 CPPUNIT_ASSERT_DOUBLES_EQUAL(rc,c,
epsilon);
147 R.GetEulerZYZ(ra,rb,rc);
148 CPPUNIT_ASSERT_DOUBLES_EQUAL(ra,a,
epsilon);
149 CPPUNIT_ASSERT_DOUBLES_EQUAL(rb,b,
epsilon);
150 CPPUNIT_ASSERT_DOUBLES_EQUAL(rc,c,
epsilon);
151 double angle= R.GetRotAngle(v2);
153 CPPUNIT_ASSERT_EQUAL(R2,R);
155 CPPUNIT_ASSERT_EQUAL(R,R2);
164 const double expectedAngle,
171 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(msg, expectedAngle, angle,
epsilon);
172 CPPUNIT_ASSERT_EQUAL_MESSAGE(msg, expectedAxis, axis);
173 CPPUNIT_ASSERT_EQUAL_MESSAGE(msg, expectedAngle * expectedAxis, R.
GetRot());
174 CPPUNIT_ASSERT_EQUAL_MESSAGE(msg,
Rotation::Rot(axis, angle), R);
176 CPPUNIT_ASSERT_EQUAL_MESSAGE(msg,
Rotation::Rot2(axis, angle), R);
184 const double expectedAngle,
187 std::stringstream ss;
188 ss <<
"rot(" << msg <<
"],(" << angle <<
")";
193 #define TESTEULERZYX(a,b,g) \ 196 Rotation R = Rotation::EulerZYX((a),(b),(g));\ 197 double alpha,beta,gamma;\ 198 R.GetEulerZYX(alpha,beta,gamma);\ 199 CPPUNIT_ASSERT_DOUBLES_EQUAL((a),alpha,eps);\ 200 CPPUNIT_ASSERT_DOUBLES_EQUAL((b),beta,eps);\ 201 CPPUNIT_ASSERT_DOUBLES_EQUAL((g),gamma,eps);\ 204 #define TESTEULERZYZ(a,b,g) \ 207 Rotation R = Rotation::EulerZYZ((a),(b),(g));\ 208 double alpha,beta,gamma;\ 209 R.GetEulerZYZ(alpha,beta,gamma);\ 210 CPPUNIT_ASSERT_DOUBLES_EQUAL((a),alpha,eps);\ 211 CPPUNIT_ASSERT_DOUBLES_EQUAL((b),beta,eps);\ 212 CPPUNIT_ASSERT_DOUBLES_EQUAL((g),gamma,eps);\ 214 #define TESTEULERZYX_INVARIANT(a,b,g,a2,b2,g2)\ 217 Rotation R1=Rotation::EulerZYX(a,b,g);\ 218 Rotation R2=Rotation::EulerZYX(a2,b2,g2);\ 219 CPPUNIT_ASSERT_DOUBLES_EQUAL(0,diff(R2,R1).Norm(),eps);\ 221 #define TESTEULERZYZ_INVARIANT(a,b,g,a2,b2,g2)\ 224 Rotation R1=Rotation::EulerZYZ(a,b,g);\ 225 Rotation R2=Rotation::EulerZYZ(a2,b2,g2);\ 226 CPPUNIT_ASSERT_DOUBLES_EQUAL(0,diff(R2,R1).Norm(),eps);\ 302 TestArbitraryRotation(msg, v, 0, 0,
Vector(0,0,1));
303 TestArbitraryRotation(msg, v, 45, 45, expectedVector);
304 TestArbitraryRotation(msg, v, 90, 90, expectedVector);
305 TestArbitraryRotation(msg, v, 179, 179, expectedVector);
310 TestArbitraryRotation(msg, v, 181, 179, -expectedVector);
311 TestArbitraryRotation(msg, v, 270, 90, -expectedVector);
312 TestArbitraryRotation(msg, v, 359, 1, -expectedVector);
313 TestArbitraryRotation(msg, v, 360, 0,
Vector(0,0,1));
314 TestArbitraryRotation(msg, v, 361, 1, expectedVector);
315 TestArbitraryRotation(msg, v, 450, 90, expectedVector);
316 TestArbitraryRotation(msg, v, 539, 179, expectedVector);
318 TestArbitraryRotation(msg, v, 541, 179, -expectedVector);
319 TestArbitraryRotation(msg, v, 630, 90, -expectedVector);
320 TestArbitraryRotation(msg, v, 719, 1, -expectedVector);
321 TestArbitraryRotation(msg, v, 720, 0,
Vector(0,0,1));
323 TestArbitraryRotation(msg, v, -45, 45, -expectedVector);
324 TestArbitraryRotation(msg, v, -90, 90, -expectedVector);
325 TestArbitraryRotation(msg, v, -179, 179, -expectedVector);
327 TestArbitraryRotation(msg, v, -181, 179, expectedVector);
328 TestArbitraryRotation(msg, v, -270, 90, expectedVector);
329 TestArbitraryRotation(msg, v, -359, 1, expectedVector);
330 TestArbitraryRotation(msg, v, -360, 0,
Vector(0,0,1));
331 TestArbitraryRotation(msg, v, -361, 1, -expectedVector);
332 TestArbitraryRotation(msg, v, -450, 90, -expectedVector);
333 TestArbitraryRotation(msg, v, -539, 179, -expectedVector);
335 TestArbitraryRotation(msg, v, -541, 179, expectedVector);
336 TestArbitraryRotation(msg, v, -630, 90, expectedVector);
337 TestArbitraryRotation(msg, v, -719, 1, expectedVector);
338 TestArbitraryRotation(msg, v, -720, 0,
Vector(0,0,1));
345 TestRangeArbitraryRotation(
"[1,0,0]",
Vector(1,0,0),
Vector(1,0,0));
346 TestRangeArbitraryRotation(
"[-1,0,0]",
Vector(-1,0,0),
Vector(-1,0,0));
348 TestRangeArbitraryRotation(
"[0,1,0]",
Vector(0,1,0),
Vector(0,1,0));
349 TestRangeArbitraryRotation(
"[0,-1,0]",
Vector(0,-1,0),
Vector(0,-1,0));
351 TestRangeArbitraryRotation(
"[0,0,1]",
Vector(0,0,1),
Vector(0,0,1));
352 TestRangeArbitraryRotation(
"[0,0,-1]",
Vector(0,0,-1),
Vector(0,0,-1));
354 TestRangeArbitraryRotation(
"[1,1,0]",
Vector(1,1,0),
Vector(1,1,0)/
sqrt(2.0));
355 TestRangeArbitraryRotation(
"[-1,-1,0]",
Vector(-1,-1,0),
Vector(-1,-1,0)/
sqrt(2.0));
357 TestRangeArbitraryRotation(
"[1,0,1]",
Vector(1,0,1),
Vector(1,0,1)/
sqrt(2.0));
358 TestRangeArbitraryRotation(
"[-1,0,-1]",
Vector(-1,0,-1),
Vector(-1,0,-1)/
sqrt(2.0));
360 TestRangeArbitraryRotation(
"[0,1,1]",
Vector(0,1,1),
Vector(0,1,1)/
sqrt(2.0));
361 TestRangeArbitraryRotation(
"[0,-1,-1]",
Vector(0,-1,-1),
Vector(0,-1,-1)/
sqrt(2.0));
363 TestRangeArbitraryRotation(
"[1,1,1]",
Vector(1,1,1),
Vector(1,1,1)/
sqrt(3.0));
364 TestRangeArbitraryRotation(
"[-1,-1,-1]",
Vector(-1,-1,-1),
Vector(-1,-1,-1)/
sqrt(3.0));
368 TestOneRotation(
"rot([1,0,0],180)",
KDL::Rotation::Rot(
KDL::Vector(1,0,0),180*
deg2rad), 180*
deg2rad,
Vector(1,0,0));
370 TestOneRotation(
"rot([-1,0,0],180)",
KDL::Rotation::Rot(
KDL::Vector(-1,0,0),180*
deg2rad), 180*
deg2rad,
Vector(1,0,0));
371 TestOneRotation(
"rot([0,1,0],180)",
KDL::Rotation::Rot(
KDL::Vector(0,1,0),180*
deg2rad), 180*
deg2rad,
Vector(0,1,0));
373 TestOneRotation(
"rot([0,-1,0],180)",
KDL::Rotation::Rot(
KDL::Vector(0,-1,0),180*
deg2rad), 180*
deg2rad,
Vector(0,1,0));
375 TestOneRotation(
"rot([0,0,1],180)",
KDL::Rotation::Rot(
KDL::Vector(0,0,1),180*
deg2rad), 180*
deg2rad,
Vector(0,0,1));
377 TestOneRotation(
"rot([0,0,-1],180)",
KDL::Rotation::Rot(
KDL::Vector(0,0,-1),180*
deg2rad), 180*
deg2rad,
Vector(0,0,1));
379 TestOneRotation(
"rot([1,0,1],180)",
KDL::Rotation::Rot(
KDL::Vector(1,0,1),180*
deg2rad), 180*
deg2rad,
Vector(1,0,1)/
sqrt(2.0));
381 TestOneRotation(
"rot([1,0,1],-180)",
KDL::Rotation::Rot(
KDL::Vector(1,0,1),-180*
deg2rad), 180*
deg2rad,
Vector(1,0,1)/
sqrt(2.0));
382 TestOneRotation(
"rot([-1,0,-1],180)",
KDL::Rotation::Rot(
KDL::Vector(-1,0,-1),180*
deg2rad), 180*
deg2rad,
Vector(1,0,1)/
sqrt(2.0));
384 TestOneRotation(
"rot([-1,0,-1],-180)",
KDL::Rotation::Rot(
KDL::Vector(-1,0,-1),-180*
deg2rad), 180*
deg2rad,
Vector(1,0,1)/
sqrt(2.0));
386 TestOneRotation(
"rot([1,1,0],180)",
KDL::Rotation::Rot(
KDL::Vector(1,1,0),180*
deg2rad), 180*
deg2rad,
Vector(1,1,0)/
sqrt(2.0));
388 TestOneRotation(
"rot([1,1,0],-180)",
KDL::Rotation::Rot(
KDL::Vector(1,1,0),-180*
deg2rad), 180*
deg2rad,
Vector(1,1,0)/
sqrt(2.0));
389 TestOneRotation(
"rot([-1,-1,0],180)",
KDL::Rotation::Rot(
KDL::Vector(-1,-1,0),180*
deg2rad), 180*
deg2rad,
Vector(1,1,0)/
sqrt(2.0));
391 TestOneRotation(
"rot([-1,-1,0],-180)",
KDL::Rotation::Rot(
KDL::Vector(-1,-1,0),-180*
deg2rad), 180*
deg2rad,
Vector(1,1,0)/
sqrt(2.0));
393 TestOneRotation(
"rot([0,1,1],180)",
KDL::Rotation::Rot(
KDL::Vector(0,1,1),180*
deg2rad), 180*
deg2rad,
Vector(0,1,1)/
sqrt(2.0));
395 TestOneRotation(
"rot([0,1,1],-180)",
KDL::Rotation::Rot(
KDL::Vector(0,1,1),-180*
deg2rad), 180*
deg2rad,
Vector(0,1,1)/
sqrt(2.0));
396 TestOneRotation(
"rot([0,-1,-1],180)",
KDL::Rotation::Rot(
KDL::Vector(0,-1,-1),180*
deg2rad), 180*
deg2rad,
Vector(0,1,1)/
sqrt(2.0));
398 TestOneRotation(
"rot([0,-1,-1],-180)",
KDL::Rotation::Rot(
KDL::Vector(0,-1,-1),-180*
deg2rad), 180*
deg2rad,
Vector(0,1,1)/
sqrt(2.0));
400 TestOneRotation(
"rot([1,1,1],180)",
KDL::Rotation::Rot(
KDL::Vector(1,1,1),180*
deg2rad), 180*
deg2rad,
Vector(1,1,1)/
sqrt(3.0));
402 TestOneRotation(
"rot([1,1,1],-180)",
KDL::Rotation::Rot(
KDL::Vector(1,1,1),-180*
deg2rad), 180*
deg2rad,
Vector(1,1,1)/
sqrt(3.0));
403 TestOneRotation(
"rot([-1,-1,-1],180)",
KDL::Rotation::Rot(
KDL::Vector(-1,-1,-1),180*
deg2rad), 180*
deg2rad,
Vector(1,1,1)/
sqrt(3.0));
405 TestOneRotation(
"rot([-1,-1,-1],-180)",
KDL::Rotation::Rot(
KDL::Vector(-1,-1,-1),-180*
deg2rad), 180*
deg2rad,
Vector(1,1,1)/
sqrt(3.0));
411 static const double pi =
atan(1)*4;
412 double roll = -2.9811968953315162;
413 double pitch = -pi/2;
414 double yaw = -0.1603957582582825;
424 CPPUNIT_ASSERT(0==isnan(theta));
425 CPPUNIT_ASSERT(0==isnan(kdlAxis[0]));
426 CPPUNIT_ASSERT(0==isnan(kdlAxis[1]));
427 CPPUNIT_ASSERT(0==isnan(kdlAxis[2]));
433 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"rot(NON-ORTHOGONAL, 0)", 0.0, angle,
epsilon);
439 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
"rot(NON-ORTHOGONAL, PI)", M_PI, angle,
epsilon);
451 det = +R(0,0)*(R(1,1)*R(2,2)-R(2,1)*R(1,2))-R(0,1)*(R(1,0)*R(2,2)-R(2,0)*R(1,2))+R(0,2)*(R(1,0)*R(2,1)-R(2,0)*R(1,1));
452 CPPUNIT_ASSERT_EQUAL(det,-1.0);
455 CPPUNIT_ASSERT_ASSERTION_FAIL(CPPUNIT_ASSERT_EQUAL(R,Rout));
458 det = +R(0,0)*(R(1,1)*R(2,2)-R(2,1)*R(1,2))-R(0,1)*(R(1,0)*R(2,2)-R(2,0)*R(1,2))+R(0,2)*(R(1,0)*R(2,1)-R(2,0)*R(1,1));
459 CPPUNIT_ASSERT_EQUAL(det,-1.0);
462 CPPUNIT_ASSERT_ASSERTION_FAIL(CPPUNIT_ASSERT_EQUAL(R,Rout));
476 CPPUNIT_ASSERT_EQUAL(R,R2);
482 CPPUNIT_ASSERT_DOUBLES_EQUAL(y, 0,
epsilon);
483 CPPUNIT_ASSERT_DOUBLES_EQUAL(z, 0,
epsilon);
486 CPPUNIT_ASSERT_EQUAL(R,R2);
490 CPPUNIT_ASSERT_EQUAL(R,R2);
492 CPPUNIT_ASSERT_DOUBLES_EQUAL(x, x2,
epsilon);
493 CPPUNIT_ASSERT_DOUBLES_EQUAL(y, y2,
epsilon);
494 CPPUNIT_ASSERT_DOUBLES_EQUAL(z, z2,
epsilon);
495 CPPUNIT_ASSERT_DOUBLES_EQUAL(w, w2,
epsilon);
501 CPPUNIT_ASSERT_EQUAL(R,R2);
503 CPPUNIT_ASSERT_DOUBLES_EQUAL(x, x2,
epsilon);
504 CPPUNIT_ASSERT_DOUBLES_EQUAL(y, y2,
epsilon);
505 CPPUNIT_ASSERT_DOUBLES_EQUAL(z, z2,
epsilon);
506 CPPUNIT_ASSERT_DOUBLES_EQUAL(w, w2,
epsilon);
574 CPPUNIT_ASSERT_EQUAL(F,F2);
575 CPPUNIT_ASSERT_EQUAL(F.
Inverse(F*v),v);
576 CPPUNIT_ASSERT_EQUAL(F.
Inverse(F*t),t);
577 CPPUNIT_ASSERT_EQUAL(F.
Inverse(F*w),w);
578 CPPUNIT_ASSERT_EQUAL(F*F.
Inverse(v),v);
579 CPPUNIT_ASSERT_EQUAL(F*F.
Inverse(t),t);
580 CPPUNIT_ASSERT_EQUAL(F*F.
Inverse(w),w);
583 CPPUNIT_ASSERT_EQUAL(F*(F*(F*v)),(F*F*F)*v);
584 CPPUNIT_ASSERT_EQUAL(F*(F*(F*t)),(F*F*F)*t);
585 CPPUNIT_ASSERT_EQUAL(F*(F*(F*w)),(F*F*F)*w);
588 CPPUNIT_ASSERT_EQUAL(F.Inverse()*v,F.Inverse(v));
599 CPPUNIT_ASSERT(
Equal(a2,a1));
602 CPPUNIT_ASSERT(!
Equal(a1,a2));
605 CPPUNIT_ASSERT(
Equal(a2,a3));
608 CPPUNIT_ASSERT(
Equal(a1,a3));
616 CPPUNIT_ASSERT(
Equal(a1,a3));
624 CPPUNIT_ASSERT(
Equal(a1,a3));
628 CPPUNIT_ASSERT(
Equal(a2,a3));
634 CPPUNIT_ASSERT(
Equal(a2,a1));
645 CPPUNIT_ASSERT_EQUAL((
unsigned int)0,a1.
rows());
646 CPPUNIT_ASSERT(
Equal(a2,a1));
649 CPPUNIT_ASSERT(
Equal(a2,a1));
652 CPPUNIT_ASSERT(
Equal(a2,a1));
655 CPPUNIT_ASSERT(
Equal(a1,a3));
658 CPPUNIT_ASSERT(
Equal(a1,a3));
661 CPPUNIT_ASSERT(
Equal(a1,a3));
664 CPPUNIT_ASSERT(
Equal(a1,a3));
676 CPPUNIT_ASSERT_EQUAL((
unsigned int)3,a1.
rows());
677 CPPUNIT_ASSERT(
Equal(a2,a1));
683 CPPUNIT_ASSERT(
Equal(a1,a2));
684 CPPUNIT_ASSERT_EQUAL(a1(1),a2(1));
689 CPPUNIT_ASSERT(
Equal(a1,a3));
void Subtract(const JntArray &src1, const JntArray &src2, JntArray &dest)
void TestWrench2(Wrench &w)
#define TESTEULERZYZ(a, b, g)
represents rotations in 3 dimensional space.
void Divide(const JntArray &src, const double &factor, JntArray &dest)
Vector UnitX() const
Access to the underlying unitvectors of the rotation matrix.
Vector UnitZ() const
Access to the underlying unitvectors of the rotation matrix.
double GetRotAngle(Vector &axis, double eps=epsilon) const
INLINE S Norm(const Rall1d< T, V, S > &value)
void ReverseSign()
Reverses the sign of the twist.
unsigned int rows() const
Vector UnitY() const
Access to the underlying unitvectors of the rotation matrix.
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Rotation Inverse() const
Gives back the inverse rotation matrix of *this.
#define TESTEULERZYZ_INVARIANT(a, b, g, a2, b2, g2)
#define TESTEULERZYX(a, b, g)
double Normalize(double eps=epsilon)
const double PI
the value of pi
static Rotation RotZ(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
static Rotation Quaternion(double x, double y, double z, double w)
This class represents an fixed size array containing joint values of a KDL::Chain.
CPPUNIT_TEST_SUITE_REGISTRATION(FramesTest)
static Rotation RotY(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
void ReverseSign()
Reverses the sign of the Vector object itself.
doubleAcc dot(const VectorAcc &lhs, const VectorAcc &rhs)
void ReverseSign()
Reverses the sign of the current Wrench.
void Add(const JntArray &src1, const JntArray &src2, JntArray &dest)
#define TESTEULERZYX_INVARIANT(a, b, g, a2, b2, g2)
void GetQuaternion(double &x, double &y, double &z, double &w) const
void TestArbitraryRotation(const std::string &msg, const KDL::Vector &v, const double angle, const double expectedAngle, const KDL::Vector &expectedVector)
static Rotation EulerZYX(double Alfa, double Beta, double Gamma)
represents both translational and rotational velocities.
IMETHOD void SetToZero(Vector &v)
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
A concrete implementation of a 3 dimensional vector class.
static Rotation RPY(double roll, double pitch, double yaw)
void TestRangeArbitraryRotation(const std::string &msg, const KDL::Vector &v, const KDL::Vector &expectedVector)
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
static Rotation Identity()
Gives back an identity rotaton matrix.
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
Frame Inverse() const
Gives back inverse transformation of a Frame.
void TestOneRotation(const std::string &msg, const KDL::Rotation &R, const double expectedAngle, const KDL::Vector &expectedAxis)
void resize(unsigned int newSize)
void TestJntArrayWhenEmpty()
static Rotation EulerZYZ(double Alfa, double Beta, double Gamma)
represents a frame transformation in 3D space (rotation + translation)
represents both translational and rotational acceleration.
void TestVector2(Vector &v)
static Rotation Rot(const Vector &rotvec, double angle)
const double deg2rad
the value pi/180
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
static Rotation Rot2(const Vector &rotvec, double angle)
Along an arbitrary axes. rotvec should be normalized.
void TestRotation2(const Vector &v, double a, double b, double c)
IMETHOD void random(Vector &a)
addDelta operator for displacement rotational velocity.
void TestTwist2(Twist &t)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
void Multiply(const JntArray &src, const double &factor, JntArray &dest)