RobWorkProject
Public Types | Public Member Functions | Static Public Member Functions | Related Functions | List of all members
Jacobian Class Reference

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

#include <Jacobian.hpp>

Public Types

typedef boost::numeric::ublas::matrix< double > BoostBase
 The type of legacy Boost matrix implementation.
 
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Base
 The type of the internal Eigen matrix implementation.
 
typedef boost::numeric::ublas::zero_matrix< double > BoostZeroBase
 The Boost matrix expression for initialization to zero.
 
typedef boost::numeric::ublas::zero_matrix< double > BoostIdentityBase
 The Boost matrix expression for initialization to the identity matrix.
 

Public Member Functions

 Jacobian (size_t m, size_t n)
 Creates an empty $ m\times n $ (uninitialized) Jacobian matrix. More...
 
size_t size1 () const
 The number of rows.
 
size_t size2 () const
 The number of columns.
 
 Jacobian (size_t n)
 Creates an empty $ 6\times n $ (uninitialized) Jacobian matrix. More...
 
template<class R >
 Jacobian (const boost::numeric::ublas::matrix_expression< R > &r)
 Creates a Jacobian from a matrix_expression. More...
 
template<class R >
 Jacobian (const Eigen::MatrixBase< R > &r)
 Creates a Jacobian from a Eigen::MatrixBase. More...
 
BoostBase m () const
 Returns Boost matrix.
 
Basee ()
 Accessor for the internal Eigen matrix state.
 
const Basee () const
 Accessor for the internal Eigen matrix state.
 
double & operator() (size_t row, size_t column)
 Returns reference to matrix element. More...
 
const double & operator() (size_t row, size_t column) const
 Returns reference to matrix element. More...
 
double & elem (size_t row, size_t col)
 Get an element of the jacobian. More...
 
 Jacobian (const Transform3D<> &aTb)
 Creates the velocity transform jacobian $ \robabcdx{a}{b}{a}{b}{\bf{J_v}} $ for transforming both the reference frame and the velocity reference point from one frame b to another frame a. More...
 
 Jacobian (const Rotation3D<> &aRb)
 Creates the velocity transform jacobian $ \robabcdx{a}{b}{i}{i}{\bf{J_v}} $ for transforming a velocity screw from one frame of reference b to another frame a. More...
 
 Jacobian (const Vector3D<> &aPb)
 Creates the velocity transform jacobian $ \robabcdx{i}{i}{b}{a}{\bf{J}_v} $ for transforming the reference point of a velocity screw from one frame b to another frame a. More...
 
void addRotation (const Vector3D<> &part, size_t row, size_t col)
 add rotation jacobian to a specific row and column in this jacobian More...
 
void addPosition (const Vector3D<> &part, size_t row, size_t col)
 add position jacobian to a specific row and column in this jacobian More...
 

Static Public Member Functions

static Jacobian zero (size_t size1, size_t size2)
 Construct zero initialized Jacobian. More...
 

Related Functions

(Note that these are not member functions.)

const VelocityScrew6D operator* (const Jacobian &Jq, const Q &dq)
 Calculates velocity vector. More...
 
const Q operator* (const Jacobian &JqInv, const VelocityScrew6D<> &v)
 Calculates joint velocities. More...
 
const Jacobian operator* (const Jacobian &j1, const Jacobian &j2)
 Multiplies jacobians $ \mathbf{J} = \mathbf{J}_1 * \mathbf{J}_2 $. More...
 
std::ostream & operator<< (std::ostream &out, const Jacobian &v)
 Streaming operator.
 
const Jacobian operator* (const Rotation3D<> &r, const Jacobian &v)
 Rotates each column of v by r. More...
 
template<>
void write (const rw::math::Jacobian &sobject, rw::common::OutputArchive &oarchive, const std::string &id)
 
template<>
void read (rw::math::Jacobian &sobject, rw::common::InputArchive &iarchive, const std::string &id)
 

Detailed Description

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

An ordinary robot jacobian defined over the joints 0 to n with configuration q is expressed as a $ 6\times n $ matrix:

\[ \robabx{0}{n}{\bf{J}}(\bf{q}) = [ \robabx{0}{1}{\bf{J}}(\bf{q}), \robabx{1}{2}{\bf{J}}(\bf{q}),..., \robabx{n-1}{n}{\bf{J}}(\bf{q}) ] \]

Constructor & Destructor Documentation

◆ Jacobian() [1/7]

Jacobian ( size_t  m,
size_t  n 
)
inline

Creates an empty $ m\times n $ (uninitialized) Jacobian matrix.

Parameters
m[in] number of rows
n[in] number of columns

◆ Jacobian() [2/7]

Jacobian ( size_t  n)
inlineexplicit

Creates an empty $ 6\times n $ (uninitialized) Jacobian matrix.

Parameters
n[in] number of columns

◆ Jacobian() [3/7]

Jacobian ( const boost::numeric::ublas::matrix_expression< R > &  r)
inlineexplicit

Creates a Jacobian from a matrix_expression.

Parameters
r[in] an ublas matrix_expression

◆ Jacobian() [4/7]

Jacobian ( const Eigen::MatrixBase< R > &  r)
inlineexplicit

Creates a Jacobian from a Eigen::MatrixBase.

Parameters
r[in] an Eigen Matrix

◆ Jacobian() [5/7]

Jacobian ( const Transform3D<> &  aTb)
explicit

Creates the velocity transform jacobian $ \robabcdx{a}{b}{a}{b}{\bf{J_v}} $ for transforming both the reference frame and the velocity reference point from one frame b to another frame a.

Parameters
aTb[in] $ \robabx{a}{b}{\bf{T}} $
Returns
$ \robabcdx{a}{b}{a}{b}{\bf{J_v}} $

\[ \robabcdx{a}{b}{a}{b}{\bf{J_v}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{R}} & S(\robabx{a}{b}{\mathbf{d}})\robabx{a}{b}{\mathbf{R}} \\ \mathbf{0}^{3x3} & \robabx{a}{b}{\mathbf{R}} \end{array} \right] \]

Change the frame of reference from b to frame a and reference point from frame a to frame b: $ \robabx{a}{b}{\bf{J}} = \robabcdx{a}{b}{a}{b}{\bf{J}_v} \cdot \robabx{b}{a}{\bf{J}} $

◆ Jacobian() [6/7]

Jacobian ( const Rotation3D<> &  aRb)
explicit

Creates the velocity transform jacobian $ \robabcdx{a}{b}{i}{i}{\bf{J_v}} $ for transforming a velocity screw from one frame of reference b to another frame a.

Parameters
aRb[in] $ \robabx{a}{b}{\bf{R}} $
Returns
$ \robabcdx{a}{b}{i}{i}{\bf{J}_v} $

\[ \robabcdx{a}{b}{i}{i}{\bf{J_v}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{R}} & \mathbf{0}^{3x3} \\ \mathbf{0}^{3x3} & \robabx{a}{b}{\mathbf{R}} \end{array} \right] \]

Change the frame of reference from b to frame a : $ \robabx{a}{c}{\bf{J}} = \robabcdx{a}{b}{c}{c}{\bf{J}_v} \cdot \robabx{b}{c}{\bf{J}} $

◆ Jacobian() [7/7]

Jacobian ( const Vector3D<> &  aPb)
explicit

Creates the velocity transform jacobian $ \robabcdx{i}{i}{b}{a}{\bf{J}_v} $ for transforming the reference point of a velocity screw from one frame b to another frame a.

Parameters
aPb[in] $ \robabx{a}{b}{\bf{P}} $
Returns
$ \robabcdx{i}{i}{b}{a}{\bf{J}_v} $

\[ \robabcdx{i}{i}{b}{a}{\bf{J}_v} = \left[ \begin{array}{cc} \bf{I}^{3x3} & S(\robabx{a}{b}{\bf{P}}) \\ \bf{0}^{3x3} & \bf{I}^{3x3} \end{array} \right] \]

transforming the reference point of a Jacobian from frame c to frame d : $ \robabx{a}{d}{\mathbf{J}} = \robabcdx{a}{a}{c}{d}{\mathbf{J_v}} \cdot \robabx{a}{c}{\mathbf{J}} $

Member Function Documentation

◆ addPosition()

void addPosition ( const Vector3D<> &  part,
size_t  row,
size_t  col 
)

add position jacobian to a specific row and column in this jacobian

Parameters
part
row
col

◆ addRotation()

void addRotation ( const Vector3D<> &  part,
size_t  row,
size_t  col 
)

add rotation jacobian to a specific row and column in this jacobian

Parameters
part
row
col

◆ elem()

double& elem ( size_t  row,
size_t  col 
)
inline

Get an element of the jacobian.

Parameters
row[in] the row.
col[in] the column.
Returns
reference to the element.

◆ operator()() [1/2]

double& operator() ( size_t  row,
size_t  column 
)
inline

Returns reference to matrix element.

Parameters
row[in] row
column[in] column
Returns
reference to the element

◆ operator()() [2/2]

const double& operator() ( size_t  row,
size_t  column 
) const
inline

Returns reference to matrix element.

Parameters
row[in] row
column[in] column
Returns
reference to the element

◆ zero()

static Jacobian zero ( size_t  size1,
size_t  size2 
)
inlinestatic

Construct zero initialized Jacobian.

Parameters
size1[in] number of rows.
size2[in] number of columns.
Returns
zero-initialized jacobian.

Friends And Related Function Documentation

◆ read()

void read ( rw::math::Jacobian sobject,
rw::common::InputArchive iarchive,
const std::string &  id 
)
related

Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.

Parameters
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.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

◆ write()

void write ( const rw::math::Jacobian sobject,
rw::common::OutputArchive oarchive,
const std::string &  id 
)
related

Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.

Parameters
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.
Note
the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.

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