orocos_kdl
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
KDL::Twist Class Reference

represents both translational and rotational velocities. More...

#include <frames.hpp>

Public Member Functions

double & operator() (int i)
 index-based access to components, first vel(0..2), then rot(3..5) More...
 
double operator() (int i) const
 
Twistoperator+= (const Twist &arg)
 
Twistoperator-= (const Twist &arg)
 
double & operator[] (int index)
 
double operator[] (int index) const
 
Twist RefPoint (const Vector &v_base_AB) const
 
void ReverseSign ()
 Reverses the sign of the twist. More...
 
 Twist ()
 The default constructor initialises to Zero via the constructor of Vector. More...
 
 Twist (const Vector &_vel, const Vector &_rot)
 

Static Public Member Functions

static Twist Zero ()
 

Public Attributes

Vector rot
 The rotational velocity of that point. More...
 
Vector vel
 The velocity of that point. More...
 

Friends

double dot (const Twist &lhs, const Wrench &rhs)
 
double dot (const Wrench &rhs, const Twist &lhs)
 
bool Equal (const Twist &a, const Twist &b, double eps)
 
class Frame
 
bool operator!= (const Twist &a, const Twist &b)
 The literal inequality operator!=(). More...
 
Twist operator* (const Twist &lhs, const Twist &rhs)
 Spatial cross product for 6d motion vectors, beware all of them have to be expressed in the same reference frame/point. More...
 
Wrench operator* (const Twist &lhs, const Wrench &rhs)
 Spatial cross product for 6d force vectors, beware all of them have to be expressed in the same reference frame/point. More...
 
Twist operator* (const Twist &lhs, double rhs)
 
Twist operator* (double lhs, const Twist &rhs)
 
Twist operator+ (const Twist &lhs, const Twist &rhs)
 
Twist operator- (const Twist &arg)
 
Twist operator- (const Twist &lhs, const Twist &rhs)
 
Twist operator/ (const Twist &lhs, double rhs)
 
bool operator== (const Twist &a, const Twist &b)
 The literal equality operator==(), also identical. More...
 
class Rotation
 
void SetToZero (Twist &v)
 

Detailed Description

represents both translational and rotational velocities.

This class represents a twist. A twist is the combination of translational velocity and rotational velocity applied at one point.

Definition at line 723 of file frames.hpp.

Constructor & Destructor Documentation

◆ Twist() [1/2]

KDL::Twist::Twist ( )
inline

The default constructor initialises to Zero via the constructor of Vector.

Definition at line 730 of file frames.hpp.

◆ Twist() [2/2]

KDL::Twist::Twist ( const Vector _vel,
const Vector _rot 
)
inline

Definition at line 732 of file frames.hpp.

Member Function Documentation

◆ operator()() [1/2]

double & Twist::operator() ( int  i)
inline

index-based access to components, first vel(0..2), then rot(3..5)

Definition at line 326 of file frames.inl.

◆ operator()() [2/2]

double Twist::operator() ( int  i) const
inline

index-based access to components, first vel(0..2), then rot(3..5) For use with a const Twist

Definition at line 335 of file frames.inl.

◆ operator+=()

Twist & Twist::operator+= ( const Twist arg)
inline

Definition at line 319 of file frames.inl.

◆ operator-=()

Twist & Twist::operator-= ( const Twist arg)
inline

Definition at line 312 of file frames.inl.

◆ operator[]() [1/2]

double& KDL::Twist::operator[] ( int  index)
inline

Definition at line 748 of file frames.hpp.

◆ operator[]() [2/2]

double KDL::Twist::operator[] ( int  index) const
inline

Definition at line 743 of file frames.hpp.

◆ RefPoint()

Twist Twist::RefPoint ( const Vector v_base_AB) const
inline

Changes the reference point of the twist. The vector v_base_AB is expressed in the same base as the twist The vector v_base_AB is a vector from the old point to the new point.

Complexity : 6M+6A

Definition at line 302 of file frames.inl.

◆ ReverseSign()

void Twist::ReverseSign ( )
inline

Reverses the sign of the twist.

Definition at line 296 of file frames.inl.

◆ Zero()

Twist Twist::Zero ( )
inlinestatic
Returns
a zero Twist : Twist(Vector::Zero(),Vector::Zero())

Definition at line 290 of file frames.inl.

Friends And Related Function Documentation

◆ dot [1/2]

double dot ( const Twist lhs,
const Wrench rhs 
)
friend

◆ dot [2/2]

double dot ( const Wrench rhs,
const Twist lhs 
)
friend

◆ Equal

bool Equal ( const Twist a,
const Twist b,
double  eps 
)
friend

do not use operator == because the definition of Equal(.,.) is slightly different. It compares whether the 2 arguments are equal in an eps-interval

◆ Frame

friend class Frame
friend

Definition at line 793 of file frames.hpp.

◆ operator!=

bool operator!= ( const Twist a,
const Twist b 
)
friend

The literal inequality operator!=().

◆ operator* [1/4]

Twist operator* ( const Twist lhs,
const Twist rhs 
)
friend

Spatial cross product for 6d motion vectors, beware all of them have to be expressed in the same reference frame/point.

◆ operator* [2/4]

Wrench operator* ( const Twist lhs,
const Wrench rhs 
)
friend

Spatial cross product for 6d force vectors, beware all of them have to be expressed in the same reference frame/point.

◆ operator* [3/4]

Twist operator* ( const Twist lhs,
double  rhs 
)
friend

◆ operator* [4/4]

Twist operator* ( double  lhs,
const Twist rhs 
)
friend

◆ operator+

Twist operator+ ( const Twist lhs,
const Twist rhs 
)
friend

◆ operator- [1/2]

Twist operator- ( const Twist arg)
friend

◆ operator- [2/2]

Twist operator- ( const Twist lhs,
const Twist rhs 
)
friend

◆ operator/

Twist operator/ ( const Twist lhs,
double  rhs 
)
friend

◆ operator==

bool operator== ( const Twist a,
const Twist b 
)
friend

The literal equality operator==(), also identical.

◆ Rotation

friend class Rotation
friend

Definition at line 792 of file frames.hpp.

◆ SetToZero

void SetToZero ( Twist v)
friend

Member Data Documentation

◆ rot

Vector KDL::Twist::rot

The rotational velocity of that point.

Definition at line 726 of file frames.hpp.

◆ vel

Vector KDL::Twist::vel

The velocity of that point.

Definition at line 725 of file frames.hpp.


The documentation for this class was generated from the following files: