RobWorkProject
rw::math Namespace Reference

Matrices, vectors, configurations, and more. More...

## Classes

class  CameraMatrix
The PerspectiveTransform2D is a perspective transform in 2D. The homographic transform can be used to map one arbitrary 2D quadrilateral into another. More...

class  EAA
A class for representing an equivalent angle-axis rotation. More...

struct  EigenDecomposition
Type representing a set of eigen values and eigen vectors. More...

class  EuclideanMetric
Euclidean distance metric for vector types. More...

class  Function
Interface for functions. More...

class  Function1Diff
Interface for functions which are 1 time differentiable. More...

class  InertiaMatrix
A 3x3 inertia matrix. More...

class  InfinityMetric
Infinity norm distance metric for vector types. More...

class  Jacobian
A Jacobian class. A jacobian with m rows and n columns. More...

class  Line2D
Describes a line segment in 2D. More...

class  Line2DPolar
Describes a line in 2D in polar coordinates. More...

class  LinearAlgebra
Collection of Linear Algebra functions. More...

class  MahalanobisMetric
Mahalanobis distance metric for vector types. More...

class  ManhattanMetric
Manhattan distance metric for vector types. More...

class  Math
Utility functions for the rw::math module. More...

class  Metric
Template interface for metrics on type T. More...

class  MetricFactory
Metric constructor functions. More...

class  MetricUtil
Various metrics and other distance measures. More...

class  PerspectiveTransform2D
The PerspectiveTransform2D is a perspective transform in 2D. More...

class  Polynomial
Representation of an ordinary polynomial with scalar coefficients (that can be both real and complex). More...

class  PolynomialND
Representation of a polynomial that can have non-scalar coefficients (polynomial matrix). More...

class  PolynomialSolver
Find solutions for roots of real and complex polynomial equations. More...

class  Pose2D
A Pose3D describes a position and orientation in 3-dimensions. More...

class  Pose6D
A Pose6D describes a position and orientation in 3-dimensions. More...

class  ProjectionMatrix
projection matrix More...

class  Q
Configuration vector. More...

class  Quaternion
A Quaternion a complex number used to describe rotations in 3-dimensional space. . More...

class  Random
Generation of random numbers. More...

class  Rotation2D
A 2x2 rotation matrix . More...

class  Rotation2DVector

class  Rotation3D
A 3x3 rotation matrix . More...

class  Rotation3DAngleMetric
a distance metric over rotations. The distance between two rotations is the smalles angle that rotates the one into the other. More...

class  Rotation3DVector
An abstract base class for Rotation3D parameterisations. More...

class  RPY
A class for representing Roll-Pitch-Yaw Euler angle rotations. More...

class  Statistics
Class for collecting data and calculating simple statistics. More...

class  Transform2D
A 4x4 homogeneous transform matrix . More...

class  Transform3D
A 4x4 homogeneous transform matrix . More...

class  Transform3DAngleMetric
distance metrics between points in SE3. More...

class  Vector
Configuration vector. More...

class  Vector2D
A 2D vector . More...

class  Vector3D
A 3D vector . More...

class  VectorND
A N-Dimensional Vector. More...

class  VelocityScrew6D
Class for representing 6 degrees of freedom velocity screws. More...

class  WeightedEuclideanMetric
Weighted Euclidean metric for vector types. More...

class  WeightedInfinityMetric
Weighted infinity norm metric for vector types. More...

class  WeightedManhattanMetric
Weighted Manhattan distance metric for vector types. More...

class  Wrench6D
Class for representing 6 degrees of freedom wrenches. More...

## Typedefs

typedef Metric< QQMetric
Metrics on configurations.

typedef Metric< Transform3D<> > Transform3DMetric
Metric on Transdform3D.

## Functions

template<class T >
const Vector3D< T > cross (const Vector3D< T > &v, const EAA< T > &eaa)
Calculates the cross product. More...

template<class Q , class T >
const EAA< Qcast (const EAA< T > &eaa)
Casts EAA<T> to EAA<Q> More...

template<class Q >
InertiaMatrix< Qinverse (const InertiaMatrix< Q > &aRb)
Calculates the inverse of a rotation matrix. More...

template<class Q , class T >
InertiaMatrix< Qcast (const InertiaMatrix< T > &rot)
Casts InertiaMatrix<T> to InertiaMatrix<Q> More...

Polynomial operator* (const PolynomialND< Eigen::Matrix< double, 1, 3 > > &a, const PolynomialND< Eigen::Matrix< double, 3, 1 > > &b)
Multiply 3D polynomial vector with 3D polynomial vector. More...

PolynomialND< Eigen::Vector3d > operator* (const PolynomialND< Eigen::Vector3d > &polynomial, const Polynomial<> &p)
Multiply 3D polynomial vector with a polynomial with scalar coefficients. More...

PolynomialND< Eigen::Matrix< double, 1, 3 > > operator* (const PolynomialND< Eigen::Matrix< double, 1, 3 > > &polynomial, const Polynomial<> &p)
Multiply 3D polynomial vector with a polynomial with scalar coefficients. More...

PolynomialND< Eigen::Matrix3d > operator* (const PolynomialND< Eigen::Matrix3d > &polynomial, const Polynomial<> &p)
Multiply 3D polynomial matrix with a polynomial with scalar coefficients. More...

Polynomial< float > operator* (const PolynomialND< Eigen::Matrix< float, 1, 3 >, float > &a, const PolynomialND< Eigen::Matrix< float, 3, 1 >, float > &b)
Multiply 3D polynomial vector with 3D polynomial vector. More...

PolynomialND< Eigen::Vector3f, float > operator* (const PolynomialND< Eigen::Vector3f, float > &polynomial, const Polynomial< float > &p)
Multiply 3D polynomial vector with a polynomial with scalar coefficients. More...

PolynomialND< Eigen::Matrix< float, 1, 3 >, float > operator* (const PolynomialND< Eigen::Matrix< float, 1, 3 >, float > &polynomial, const Polynomial< float > &p)
Multiply 3D polynomial vector with a polynomial with scalar coefficients. More...

PolynomialND< Eigen::Matrix3f, float > operator* (const PolynomialND< Eigen::Matrix3f, float > &polynomial, const Polynomial< float > &p)
Multiply 3D polynomial matrix with a polynomial with scalar coefficients. More...

PolynomialND< Eigen::Vector3d > operator* (const PolynomialND< Eigen::Matrix3d > &A, const PolynomialND< Eigen::Vector3d > &b)
Multiply 3D polynomial matrix with 3D polynomial vector. More...

PolynomialND< Eigen::Matrix< double, 1, 3 > > operator* (const PolynomialND< Eigen::Matrix< double, 1, 3 > > &a, const PolynomialND< Eigen::Matrix3d > &A)
Multiply 3D polynomial vector with 3D polynomial matrix. More...

PolynomialND< Eigen::Vector3d > operator* (const PolynomialND< Eigen::Matrix3d > &A, const Eigen::Vector3d &b)
Multiply 3D polynomial matrix with 3D polynomial vector. More...

PolynomialND< Eigen::Matrix< double, 1, 3 > > operator* (const PolynomialND< Eigen::Matrix< double, 1, 3 > > &a, const Eigen::Matrix3d &A)
Multiply 3D polynomial vector with 3D polynomial matrix. More...

PolynomialND< Eigen::Vector3f, float > operator* (const PolynomialND< Eigen::Matrix3f, float > &A, const PolynomialND< Eigen::Vector3f, float > &b)
Multiply 3D polynomial matrix with 3D polynomial vector. More...

PolynomialND< Eigen::Matrix< float, 1, 3 >, float > operator* (const PolynomialND< Eigen::Matrix< float, 1, 3 >, float > &a, const PolynomialND< Eigen::Matrix3f, float > &A)
Multiply 3D polynomial vector with 3D polynomial matrix. More...

PolynomialND< Eigen::Vector3f, float > operator* (const PolynomialND< Eigen::Matrix3f, float > &A, const Eigen::Vector3f &b)
Multiply 3D polynomial matrix with 3D polynomial vector. More...

PolynomialND< Eigen::Matrix< float, 1, 3 >, float > operator* (const PolynomialND< Eigen::Matrix< float, 1, 3 >, float > &a, const Eigen::Matrix3f &A)
Multiply 3D polynomial vector with 3D polynomial matrix. More...

template<class Q , class T >
const Pose6D< Qcast (const Pose6D< T > &pose)
Casts Pose6D<T> to Pose6D<Q> More...

bool operator!= (const Q &q1, const Q &q2)
Inequality operator. More...

rw::math::Q concat (const Q &q1, const Q &q2)
concatenates q1 onto q2 such that the returned q has the configurations of q1 in [0;q1.size()[ and has q2 in [q1.size();q1.size()+q2.size()[ More...

template<class Q , class T >
const Quaternion< Qcast (const Quaternion< T > &quaternion)
Casts Quaternion<T> to Quaternion<Q> More...

template<class R , class T >
const Rotation2D< R > cast (const Rotation2D< T > &rot)
Casts Rotation2D<T> to Rotation2D<Q> More...

template<class T >
const Rotation2D< T > transpose (const Rotation2D< T > &aRb)
Find the transpose of aRb. More...

template<class Q , class T >
const RPY< Qcast (const RPY< T > &rpy)
Casts RPY<T> to RPY<Q> More...

template<class Q , class T >
const Transform2D< Qcast (const Transform2D< T > &trans)
Cast Transform2D<T> to Transform2D<Q> More...

template<class Q , class T >
const Transform3D< Qcast (const Transform3D< T > &trans)
Cast Transform3D<T> to Transform3D<Q> More...

template<class A >
bool operator!= (const Vector< A > &q1, const Vector< A > &q2)
Inequality operator. More...

template<class A >
rw::math::Vector< A > concat (const Vector< A > &q1, const Vector< A > &q2)
concatenates q1 onto q2 such that the returned q has the configurations of q1 in [0;q1.size()[ and has q2 in [q1.size();q1.size()+q2.size()[ More...

template<class T >
cross (const Vector2D< T > &v1, const Vector2D< T > &v2)
Calculates the 2D vector cross product . More...

template<class T >
double dot (const Vector2D< T > &v1, const Vector2D< T > &v2)
Calculates the dot product . More...

template<class T >
double angle (const Vector2D< T > &v1, const Vector2D< T > &v2)
calculates the counter clock-wise angle from v1 to v2. the value returned will be in the interval [-2Pi,2Pi]

template<class T >
const Vector2D< T > normalize (const Vector2D< T > &v)
Returns the normalized vector . More...

template<class Q , class T >
const Vector2D< Qcast (const Vector2D< T > &v)
Casts Vector2D<T> to Vector2D<Q> More...

template<class T >
norm1 (const VelocityScrew6D< T > &screw)
Takes the 1-norm of the velocity screw. All elements both angular and linear are given the same weight. More...

template<class T >
norm2 (const VelocityScrew6D< T > &screw)
Takes the 2-norm of the velocity screw. All elements both angular and linear are given the same weight. More...

template<class T >
normInf (const VelocityScrew6D< T > &screw)
Takes the infinite norm of the velocity screw. All elements both angular and linear are given the same weight. More...

template<class Q , class T >
const VelocityScrew6D< Qcast (const VelocityScrew6D< T > &vs)
Casts VelocityScrew6D<T> to VelocityScrew6D<Q> More...

template<class T >
norm1 (const Wrench6D< T > &wrench)
Takes the 1-norm of the wrench. All elements both force and torque are given the same weight. More...

template<class T >
norm2 (const Wrench6D< T > &wrench)
Takes the 2-norm of the wrench. All elements both force and tporque are given the same weight. More...

template<class T >
normInf (const Wrench6D< T > &wrench)
Takes the infinite norm of the wrench. All elements both force and torque are given the same weight. More...

template<class Q , class T >
const Wrench6D< Qcast (const Wrench6D< T > &vs)
Casts Wrench6D<T> to Wrench6D<Q> More...

## Variables

const double Pi = 3.1415926535897932384626433832795

const double Inch2Meter = 0.0254

const double Meter2Inch = 1 / Inch2Meter

const double Deg2Rad = Pi / 180

const double Rad2Deg = 180 / Pi

## Detailed Description

Matrices, vectors, configurations, and more.

## ◆ concat() [1/2]

concatenates q1 onto q2 such that the returned q has the configurations of q1 in [0;q1.size()[ and has q2 in [q1.size();q1.size()+q2.size()[

Parameters
 q1 [in] the first Vector q2 [in] the second Vector
Returns
the concatenation of q1 and q2

## ◆ concat() [2/2]

 rw::math::Q rw::math::concat ( const Q & q1, const Q & q2 )

concatenates q1 onto q2 such that the returned q has the configurations of q1 in [0;q1.size()[ and has q2 in [q1.size();q1.size()+q2.size()[

Parameters
 q1 [in] the first Q q2 [in] the second Q
Returns
the concatenation of q1 and q2

## ◆ operator!=() [1/2]

 bool rw::math::operator!= ( const Vector< A > & q1, const Vector< A > & q2 )
inline

Inequality operator.

The inverse of operator==().

## ◆ operator!=() [2/2]

 bool rw::math::operator!= ( const Q & q1, const Q & q2 )
inline

Inequality operator.

The inverse of operator==().