RobWorkProject
0.7.0

Class for representing 6 degrees of freedom wrenches. More...
#include <Wrench6D.hpp>
Public Member Functions  
Wrench6D (T fx, T fy, T fz, T tx, T ty, T tz)  
Constructs a 6 degrees of freedom velocity screw. More...  
template<class R >  
Wrench6D (const Eigen::MatrixBase< R > &v)  
Constructs based on Eigen data type.  
Wrench6D ()  
Default Constructor. Initialized the wrench to 0.  
Wrench6D (const Vector3D< T > &force, const Vector3D< T > &torque)  
Constructs a wrench from a force and torque. More...  
template<class R >  
Wrench6D (const boost::numeric::ublas::vector_expression< R > &r)  
Construct a wrench from a Boost vector expression.  
void  setForce (const Vector3D< T > &force) 
Sets the force component. More...  
void  setTorque (const Vector3D< T > &torque) 
Sets the torque component. More...  
const Vector3D< T >  force () const 
Extracts the force. More...  
const Vector3D< T >  torque () const 
Extracts the torque and represents it using an Vector3D<T> More...  
T &  operator() (std::size_t index) 
Returns reference to wrench element. More...  
const T &  operator() (std::size_t index) const 
Returns const reference to wrench element. More...  
const T &  operator[] (size_t i) const 
T &  operator[] (size_t i) 
Wrench6D< T > &  operator+= (const Wrench6D< T > &wrench) 
Adds the wrench given as a parameter to the wrench. More...  
Wrench6D< T > &  operator= (const Wrench6D< T > &wrench) 
Subtracts the wrench given as a parameter from the wrench. More...  
Wrench6D< T > &  operator*= (T s) 
Scales wrench with s. More...  
const Wrench6D< T >  operator* (T s) const 
Scales wrench and returns scaled version. More...  
const Wrench6D< T >  operator+ (const Wrench6D< T > &rhs) const 
Adds two wrenches together . More...  
const Wrench6D< T >  operator (const Wrench6D< T > &rhs) const 
Subtracts two velocity screws . More...  
T  norm1 () const 
Takes the 1norm of the wrench. All elements both force and torque are given the same weight. More...  
T  norm2 () const 
Takes the 2norm of the wrench. All elements both force and torque are given the same weight. More...  
T  normInf () const 
Takes the infinite norm of the wrench. All elements both force and torque are given the same weight. More...  
boost::numeric::ublas::bounded_vector< T, 6 >  m () const 
Converter to Boost type.  
Eigen::Matrix< T, 6, 1 >  e () const 
Converter to Eigen data type.  
bool  operator== (const Wrench6D< T > &b) const 
Compares a and b for equality. More...  
bool  operator!= (const Wrench6D< T > &b) const 
Compares a and b for inequality. More...  
Friends  
const Wrench6D< T >  operator* (const Transform3D< T > &aTb, const Wrench6D< T > &bV) 
Changes frame of reference and referencepoint of wrench: . More...  
const Wrench6D< T >  operator* (const Vector3D< T > &aPb, const Wrench6D< T > &bV) 
Changes wrench referencepoint of wrench: . More...  
const Wrench6D< T >  operator* (const Rotation3D< T > &aRb, const Wrench6D< T > &bV) 
Changes frame of reference for wrench: . More...  
std::ostream &  operator<< (std::ostream &os, const Wrench6D< T > &wrench) 
Ouputs wrench to stream. More...  
Related Functions  
(Note that these are not member functions.)  
template<>  
void  write (const rw::math::Wrench6D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) 
template<>  
void  write (const rw::math::Wrench6D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) 
template<>  
void  read (rw::math::Wrench6D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id) 
template<>  
void  read (rw::math::Wrench6D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id) 
Class for representing 6 degrees of freedom wrenches.
A Wrench is the description of a frames linear force and rotational torque with respect to some reference frame.
Wrench6D  (  T  fx, 
T  fy,  
T  fz,  
T  tx,  
T  ty,  
T  tz  
) 
Constructs a 6 degrees of freedom velocity screw.
fx  [in] 
fy  [in] 
fz  [in] 
tx  [in] 
ty  [in] 
tz  [in] 
Constructs a wrench from a force and torque.
force  [in] linear force 
torque  [in] angular torque 

inline 
Extracts the force.

inline 
Takes the 1norm of the wrench. All elements both force and torque are given the same weight.

inline 
Takes the 2norm of the wrench. All elements both force and torque are given the same weight.

inline 
Takes the infinite norm of the wrench. All elements both force and torque are given the same weight.

inline 
Compares a and b for inequality.
b  [in] other wrench to compare with. 

inline 
Returns reference to wrench element.
index  [in] index in the wrench, index must be . 

inline 
Returns const reference to wrench element.
index  [in] index in the wrench, index must be . 

inline 
Scales wrench and returns scaled version.
s  [in] scaling value 

inline 
Scales wrench with s.
s  [in] scaling value 
Adds two wrenches together .
rhs  [in] 
Adds the wrench given as a parameter to the wrench.
Assumes the wrenches are represented in the same coordinate system.
wrench  [in] Wrench to add 
Subtracts two velocity screws .
rhs  [in] 
Subtracts the wrench given as a parameter from the wrench.
Assumes the wrenches are represented in the same coordinate system.
wrench  [in] Velocity screw to subtract 

inline 
Compares a and b for equality.
b  [in] other wrench to compare with. 

inline 

inline 

inline 
Sets the force component.
force  [in] linear force 

inline 
Sets the torque component.
torque  [in] angular torque 

inline 
Extracts the torque and represents it using an Vector3D<T>

friend 
Changes frame of reference and referencepoint of wrench: .
The frames and are rigidly connected.
aTb  [in] the location of frame wrt. frame : 
bV  [in] wrench wrt. frame : 
Transformation of both the wrench reference point and of the base to which the wrench is expressed
Changes wrench referencepoint of wrench: .
The frames and are rigidly connected.
aPb  [in] the location of frame wrt. frame : 
bV  [in] wrench wrt. frame : 
Transformation of both the velocity reference point and of the base to which the wrench is expressed

friend 
Changes frame of reference for wrench: .
aRb  [in] the change in orientation between frame and frame : 
bV  [in] velocity screw wrt. frame : 
Transformation of the base to which the wrench is expressed. The wrench reference point is left intact

friend 
Ouputs wrench to stream.
os  [in/out] stream to use 
wrench  [in] the wrench 

related 
Enable readserialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
sobject  [out] the object in which the data should be streamed into 
iarchive  [in] the InputArchive from which to read data. 
id  [in] The id of the serialized sobject. 

related 
Enable readserialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
sobject  [out] the object in which the data should be streamed into 
iarchive  [in] the InputArchive from which to read data. 
id  [in] The id of the serialized sobject. 

related 
Enable writeserialization of class T by overloading this method. Data is written to oarchive from the sobject.
sobject  [in] the object from which the data should be streamed. 
oarchive  [out] the OutputArchive in which data should be written. 
id  [in] The id of the serialized sobject. 

related 
Enable writeserialization of class T by overloading this method. Data is written to oarchive from the sobject.
sobject  [in] the object from which the data should be streamed. 
oarchive  [out] the OutputArchive in which data should be written. 
id  [in] The id of the serialized sobject. 