hpp::constraints::Orientation Class Reference

Constraint on the orientation of a robot joint. More...

#include <hpp/constraints/orientation.hh>

Inheritance diagram for hpp::constraints::Orientation:
Collaboration diagram for hpp::constraints::Orientation:

List of all members.

Public Member Functions

virtual ~Orientation () throw ()
void reference (const matrix3_t &reference)
 Set desired orientation as a rotation matrix.
const matrix3_treference () const
 Get desired orientation.
 Orientation (const std::string &name, const DevicePtr_t &, const JointPtr_t &joint, const matrix3_t &reference, std::vector< bool > mask)
 Constructor.

Static Public Member Functions

static
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
OrientationPtr_t 
create (const std::string &name, const DevicePtr_t &robot, const JointPtr_t &joint, const matrix3_t &reference, std::vector< bool > mask=boost::assign::list_of(true)(true)(true))
 Return a shared pointer to a new instance.
static OrientationPtr_t create (const DevicePtr_t &robot, const JointPtr_t &joint, const matrix3_t &reference, std::vector< bool > mask=boost::assign::list_of(true)(true)(true))
 Return a shared pointer to a new instance.
static size_type size (std::vector< bool > mask)
 Get size of error with respect to mask.

Protected Member Functions

virtual void impl_compute (vectorOut_t result, ConfigurationIn_t argument) const throw ()
 Compute value of error.
virtual void impl_jacobian (matrixOut_t jacobian, ConfigurationIn_t arg) const throw ()

Detailed Description

Constraint on the orientation of a robot joint.

The value of the function is defined as the rotation vector of the reference orientation expressed in the frame of the current orientation.

\begin{eqnarray*} \mathbf{r} (\mathbf{q}) &=& \log \left(R(\mathbf{q})^TR^*)\right)\\ \mathbf{\dot{r}} &=& -J_{\log}(\left(R(\mathbf{q})^TR^*)\right)) R(\mathbf{q})^T J^{\omega}_{joint}(\mathbf{q}) \mathbf{\dot{q}}\\ \end{eqnarray*}

where

\begin{eqnarray*} J_{\log} (R) &=& \frac{\|\mathbf{r}\|\sin\|\mathbf{r}\|} {2(1-\cos\|\mathbf{r}\|)}I_3 -\frac{1}{2}[\mathbf{r}]_{\times} + \left(\frac{1}{\|\mathbf{r}\|^2} - \frac{\sin\|\mathbf{r}\|}{2\|\mathbf{r}\| (1-\cos\|\mathbf{r}\|)}\right) \mathbf{r}\mathbf{r}^T \end{eqnarray*}


Constructor & Destructor Documentation

virtual hpp::constraints::Orientation::~Orientation ( ) throw () [inline, virtual]
hpp::constraints::Orientation::Orientation ( const std::string &  name,
const DevicePtr_t ,
const JointPtr_t joint,
const matrix3_t reference,
std::vector< bool >  mask 
)

Constructor.

Parameters:
namethe name of the constraints,
robotthe robot the constraints is applied to,
jointthe joint the orientation of which is constrained
referencereference orientation of the joint,
maskwhich component of the error vector to take into account.

Member Function Documentation

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW OrientationPtr_t hpp::constraints::Orientation::create ( const std::string &  name,
const DevicePtr_t robot,
const JointPtr_t joint,
const matrix3_t reference,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true) 
) [static]

Return a shared pointer to a new instance.

Parameters:
namethe name of the constraints,
robotthe robot the constraints is applied to,
jointthe joint the orientation of which is constrained
referencereference orientation of the joint,
maskwhich component of the error vector to take into account.
static OrientationPtr_t hpp::constraints::Orientation::create ( const DevicePtr_t robot,
const JointPtr_t joint,
const matrix3_t reference,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true) 
) [static]

Return a shared pointer to a new instance.

Parameters:
robotthe robot the constraints is applied to,
jointthe joint the orientation of which is constrained
referencereference orientation of the joint,
maskwhich component of the error vector to take into account.
virtual void hpp::constraints::Orientation::impl_compute ( vectorOut_t  result,
ConfigurationIn_t  argument 
) const throw () [protected, virtual]

Compute value of error.

Parameters:
argumentconfiguration of the robot,
Return values:
resulterror vector
virtual void hpp::constraints::Orientation::impl_jacobian ( matrixOut_t  jacobian,
ConfigurationIn_t  arg 
) const throw () [protected, virtual]
void hpp::constraints::Orientation::reference ( const matrix3_t reference) [inline]

Set desired orientation as a rotation matrix.

const matrix3_t& hpp::constraints::Orientation::reference ( ) const [inline]

Get desired orientation.

static size_type hpp::constraints::Orientation::size ( std::vector< bool >  mask) [static]

Get size of error with respect to mask.