132 #include <functional> 167 inline Vector() {data[0]=data[1]=data[2] = 0.0;}
170 inline Vector(
double x,
double y,
double z);
196 inline double x()
const;
197 inline double y()
const;
198 inline double z()
const;
199 inline void x(
double);
200 inline void y(
double);
201 inline void z(
double);
311 inline Rotation(
double Xx,
double Yx,
double Zx,
312 double Xy,
double Yy,
double Zy,
313 double Xz,
double Yz,
double Zz);
333 inline void SetInverse();
353 inline static Rotation RotX(
double angle);
355 inline static Rotation RotY(
double angle);
357 inline static Rotation RotZ(
double angle);
360 inline void DoRotX(
double angle);
363 inline void DoRotY(
double angle);
366 inline void DoRotZ(
double angle);
400 static Rotation EulerZYZ(
double Alfa,
double Beta,
double Gamma);
417 void GetEulerZYZ(
double& alpha,
double& beta,
double& gamma)
const;
421 static Rotation Quaternion(
double x,
double y,
double z,
double w);
425 void GetQuaternion(
double&
x,
double&
y,
double&
z,
double& w)
const;
437 static Rotation RPY(
double roll,
double pitch,
double yaw);
457 void GetRPY(
double& roll,
double& pitch,
double& yaw)
const;
472 return RPY(Gamma,Beta,Alfa);
495 inline void GetEulerZYX(
double& Alfa,
double& Beta,
double& Gamma)
const {
496 GetRPY(Gamma,Beta,Alfa);
592 void Make4x4(
double* d);
604 inline Frame Inverse()
const;
642 inline static Frame Identity();
647 inline void Integrate(
const Twist& t_this,
double frequency);
695 static Frame DH_Craig1989(
double a,
double alpha,
double d,
double theta);
703 static Frame DH(
double a,
double alpha,
double d,
double theta);
779 inline Twist RefPoint(
const Vector& v_base_AB)
const;
989 inline double x()
const;
990 inline double y()
const;
991 inline void x(
double);
992 inline void y(
double);
1022 inline void Set3DXY(
const Vector& v);
1025 inline void Set3DYZ(
const Vector& v);
1028 inline void Set3DZX(
const Vector& v);
1033 inline void Set3DPlane(
const Frame& F_someframe_XY,
const Vector& v_someframe);
1073 inline void SetInverse();
1077 inline void SetIdentity();
1082 inline void SetRot(
double angle);
1088 inline double GetRot()
const;
1111 inline void Make4x4(
double* d);
1119 inline double operator() (
int i,
int j)
const;
1121 inline void SetInverse();
1122 inline Frame2 Inverse()
const;
1127 inline void SetIdentity();
1128 inline void Integrate(
const Twist& t_this,
double frequency);
1280 r.GetQuaternion(x, y, z, w);
1300 template<>
struct std::hash<
KDL::Wrench>
1311 template<>
struct std::hash<
KDL::Twist>
1322 template<>
struct std::hash<
KDL::Vector2>
1333 template<>
struct std::hash<
KDL::Rotation2>
1343 template<>
struct std::hash<
KDL::Frame2>
Rotation2 M
Orientation of the Frame.
friend Vector operator+(const Vector &lhs, const Vector &rhs)
represents rotations in 3 dimensional space.
void UnitZ(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
double operator[](int index) const
Equivalent to double operator()(int index) const.
void GetEulerZYX(double &Alfa, double &Beta, double &Gamma) const
std::size_t operator()(KDL::Twist const &t) const noexcept
void UnitX(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
void Set2DXY(const Vector2 &v)
a 3D vector where the 2D vector v is put in the XY plane
void UnitY(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
IMETHOD Rotation Rot(const Vector &axis_a_b)
double Normalize(double eps=epsilon)
Vector vel
The velocity of that point.
Vector & operator+=(const Vector &arg)
Adds a vector from the Vector object itself.
Wrench()
Does initialise force and torque to zero via the underlying constructor of Vector.
std::size_t operator()(KDL::Frame2 const &f) const noexcept
friend double dot(const Vector &lhs, const Vector &rhs)
IMETHOD Vector diff(const Vector &p_w_a, const Vector &p_w_b, double dt=1)
Vector2()
Does not initialise to Zero().
void Set2DYZ(const Vector2 &v)
a 3D vector where the 2D vector v is put in the YZ plane
Vector & operator-=(const Vector &arg)
subtracts a vector from the Vector object itself
Twist()
The default constructor initialises to Zero via the constructor of Vector.
Vector torque
Torque that is applied at the origin of the current ref frame.
double operator()(int index) const
Access to elements, range checked when NDEBUG is not set, from 0..2.
Vector()
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that. ...
friend bool operator==(const Vector &a, const Vector &b)
The literal equality operator==(), also identical.
friend bool Equal(const Vector &a, const Vector &b, double eps)
Rotation M
Orientation of the Frame.
std::size_t operator()(KDL::Vector2 const &v) const noexcept
Rotation2(double ca, double sa)
static Rotation EulerZYX(double Alfa, double Beta, double Gamma)
represents both translational and rotational velocities.
friend Vector operator*(const Vector &lhs, double rhs)
Scalar multiplication is defined.
IMETHOD bool Equal(const FrameAcc &r1, const FrameAcc &r2, double eps=epsilon)
A concrete implementation of a 3 dimensional vector class.
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
void Set2DZX(const Vector2 &v)
a 3D vector where the 2D vector v is put in the ZX plane
Vector p
origine of the Frame
std::size_t operator()(KDL::Rotation2 const &r) const noexcept
friend Vector operator-(const Vector &lhs, const Vector &rhs)
Vector UnitX() const
Access to the underlying unitvectors of the rotation matrix.
Vector & operator=(const Vector &arg)
Assignment operator. The normal copy by value semantics.
std::size_t operator()(KDL::Wrench const &w) const noexcept
Vector force
Force that is applied at the origin of the current ref frame.
friend Vector operator/(const Vector &lhs, double rhs)
Scalar division is defined.
void Set2DPlane(const Frame &F_someframe_XY, const Vector2 &v_XY)
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.
friend bool operator!=(const Vector &a, const Vector &b)
The literal inequality operator!=().
std::size_t operator()(KDL::Frame const &f) const noexcept
represents a frame transformation in 3D space (rotation + translation)
Vector2 p
origine of the Frame
static Rotation Identity()
Gives back an identity rotaton matrix.
represents both translational and rotational acceleration.
IMETHOD Vector addDelta(const Vector &p_w_a, const Vector &p_w_da, double dt=1)
adds vector da to vector a. see also the corresponding diff() routine.
void ReverseSign()
Reverses the sign of the Vector object itself.
Vector UnitZ() const
Access to the underlying unitvectors of the rotation matrix.
void hash_combine(std::size_t &seed, const T &v)
Combine hash of object v to the seed.
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
Vector UnitY() const
Access to the underlying unitvectors of the rotation matrix.
double Norm(double eps=epsilon) const
friend void SetToZero(Vector &v)
Wrench(const Vector &_force, const Vector &_torque)
std::size_t operator()(KDL::Vector const &v) const noexcept
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
Rotation2()
Default constructor does NOT initialise to Zero().