hpp-constraints: hpp::constraints::GenericTransformation< _Options > Class Template Reference

hpp-constraints 9.0.2 Definition of basic geometric constraints for motion planning

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hpp::constraints::GenericTransformation< _Options > Class Template Reference
Constraints

`#include <hpp/constraints/generic-transformation.hh>`

Inheritance diagram for hpp::constraints::GenericTransformation< _Options >:
[legend]
Collaboration diagram for hpp::constraints::GenericTransformation< _Options >:
[legend]

## Public Types
enum | { IsRelative = _Options & RelativeBit , ComputeOrientation = _Options & OrientationBit , ComputePosition = _Options & PositionBit , OutputR3xSO3 = _Options & OutputR3xSO3Bit , IsPosition = ComputePosition && !ComputeOrientation , IsOrientation = !ComputePosition && ComputeOrientation , IsTransform = ComputePosition && ComputeOrientation , ValueSize , DerSize = (ComputePosition ? 3 : 0) + (ComputeOrientation ? 3 : 0) }
typedef shared_ptr< GenericTransformation > | Ptr_t
typedef weak_ptr< GenericTransformation > | WkPtr_t

## Public Member Functions
virtual | ~GenericTransformation ()
void | reference (const Transform3s &reference)
Transform3s | reference () const
| Get desired relative orientation.
void | joint1 (const JointConstPtr_t &joint)
| Set joint 1.
JointConstPtr_t | joint1 () const
| Get joint 1.
void | joint2 (const JointConstPtr_t &joint)
| Set joint 2.
JointConstPtr_t | joint2 () const
| Get joint 2.
void | frame1InJoint1 (const Transform3s &M)
| Set position of frame 1 in joint 1.
const Transform3s & | frame1InJoint1 () const
| Get position of frame 1 in joint 1.
void | frame2InJoint2 (const Transform3s &M)
| Set position of frame 2 in joint 2.
const Transform3s & | frame2InJoint2 () const
| Get position of frame 2 in joint 2.
std::pair< JointConstPtr_t, JointConstPtr_t > | dependsOnRelPoseBetween (DeviceConstPtr_t) const
virtual std::ostream & | print (std::ostream &o) const
| Display object in a stream.
| GenericTransformation (const std::string &name, const DevicePtr_t &robot, std::vector< bool > mask)
Public Member Functions inherited from hpp::constraints::DifferentiableFunction
virtual | ~DifferentiableFunction ()
LiegroupElement | operator() (vectorIn_t argument) const
void | value (LiegroupElementRef result, vectorIn_t argument) const
void | jacobian (matrixOut_t jacobian, vectorIn_t argument) const
const ArrayXb & | activeParameters () const
const ArrayXb & | activeDerivativeParameters () const
size_type | inputSize () const
| Get dimension of input vector.
size_type | inputDerivativeSize () const
LiegroupSpacePtr_t | outputSpace () const
| Get output space.
size_type | outputSize () const
| Get dimension of output vector.
size_type | outputDerivativeSize () const
| Get dimension of output derivative vector.
const std::string & | name () const
| Get function name.
std::string | context () const
void | context (const std::string &c)
void | finiteDifferenceForward (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
void | finiteDifferenceCentral (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
bool | operator== (DifferentiableFunction const &other) const
bool | operator!= (DifferentiableFunction const &b) const

## Static Public Member Functions
static Ptr_t | create (const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint2, const Transform3s &reference, std::vector< bool > mask=std::vector< bool >(DerSize, true))
static Ptr_t | create (const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint2, const Transform3s &frame2, const Transform3s &frame1, std::vector< bool > mask=std::vector< bool >(DerSize, true))
static Ptr_t | create (const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint1, const JointConstPtr_t &joint2, const Transform3s &reference, std::vector< bool > mask=std::vector< bool >(DerSize, true))
static Ptr_t | create (const std::string &name, const DevicePtr_t &robot, const JointConstPtr_t &joint1, const JointConstPtr_t &joint2, const Transform3s &frame1, const Transform3s &frame2, std::vector< bool > mask=std::vector< bool >(DerSize, true))
Static Public Member Functions inherited from hpp::constraints::DifferentiableFunction
static DifferentiableFunctionPtr_t | extract (DifferentiableFunctionPtr_t original, interval_t interval)

## Protected Member Functions
void | init (const WkPtr_t &self)
virtual void | impl_compute (LiegroupElementRef result, ConfigurationIn_t argument) const
virtual void | impl_jacobian (matrixOut_t jacobian, ConfigurationIn_t arg) const
bool | isEqual (const DifferentiableFunction &other) const
Protected Member Functions inherited from hpp::constraints::DifferentiableFunction
| DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, size_type sizeOutput, std::string name=std::string())
| Concrete class constructor should call this constructor.
| DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, const LiegroupSpacePtr_t &outputSpace, std::string name=std::string())
| Concrete class constructor should call this constructor.
virtual void | impl_compute (LiegroupElementRef result, vectorIn_t argument) const =0
| User implementation of function evaluation.
virtual void | impl_jacobian (matrixOut_t jacobian, vectorIn_t arg) const =0
| DifferentiableFunction ()

## Additional Inherited Members
Protected Attributes inherited from hpp::constraints::DifferentiableFunction
size_type | inputSize_
| Dimension of input vector.
size_type | inputDerivativeSize_
| Dimension of input derivative.
LiegroupSpacePtr_t | outputSpace_
| Dimension of output vector.
ArrayXb | activeParameters_
ArrayXb | activeDerivativeParameters_

## Detailed Description

template<int _Options>
class hpp::constraints::GenericTransformation< _Options >

GenericTransformation class encapsulates 10 possible differentiable functions: Position, Orientation, OrientationSO3, Transformation, TransformationR3xSO3 and their relative versions RelativeTransformationR3xSO3, RelativePosition, RelativeOrientation, RelativeOrientationSO3, RelativeTransformation.

These functions compute the position of frame GenericTransformation::frame2InJoint2 in joint GenericTransformation::joint2 frame, in the frame GenericTransformation::frame1InJoint1 in GenericTransformation::joint1 frame. For absolute functions, GenericTransformation::joint1 is NULL and joint1 frame is the world frame.

The value of the RelativeTransformation function is a 6-dimensional vector. The 3 first coordinates are the position of the center of the second frame expressed in the first frame. The 3 last coordinates are the log of the orientation of frame 2 in frame 1. The values of RelativePosition and RelativeOrientation are respectively the 3 first and the 3 last components of the above 6 dimensional vector.

The Jacobian is given by

For RelativeTransformationR3xSO3, OrientationSO3, the 3 last components are replaced by a quaternion.

## Member Typedef Documentation

## ◆ Ptr_t

template<int _Options>

typedef shared_ptr<GenericTransformation> hpp::constraints::GenericTransformation< _Options >::Ptr_t

## ◆ WkPtr_t

template<int _Options>

typedef weak_ptr<GenericTransformation> hpp::constraints::GenericTransformation< _Options >::WkPtr_t

## Member Enumeration Documentation

## ◆ anonymous enum

template<int _Options>

anonymous enum

Enumerator
IsRelative |
ComputeOrientation |
ComputePosition |
OutputR3xSO3 |
IsPosition |
IsOrientation |
IsTransform |
ValueSize |
DerSize |

## Constructor & Destructor Documentation

## ◆ ~GenericTransformation()

template<int _Options>

virtual hpp::constraints::GenericTransformation< _Options >::~GenericTransformation | ( |  | ) |
| inline virtual

## ◆ GenericTransformation()

template<int _Options>

hpp::constraints::GenericTransformation< _Options >::GenericTransformation | ( | const std::string & | name,
|  | const DevicePtr_t & | robot,
|  | std::vector< bool > | mask )

Constructor

Parameters

  name | the name of the constraints,
  robot | the robot the constraints is applied to, between the joints.
  mask | vector of 6 boolean defining which coordinates of the error vector to take into account.

## Member Function Documentation

## ◆ create() [1/4]

template<int _Options>

static Ptr_t hpp::constraints::GenericTransformation< _Options >::create | ( | const std::string & | name,
|  | const DevicePtr_t & | robot,
|  | const JointConstPtr_t & | joint1,
|  | const JointConstPtr_t & | joint2,
|  | const Transform3s & | frame1,
|  | const Transform3s & | frame2,
|  | std::vector< bool > | mask = std::vector< bool >(DerSize, true) )
| static

Object builder for relative functions.

Parameters

  name | the name of the constraints,
  robot | the robot the constraints is applied to,
  joint1 | the first joint the transformation of which is constrained,
  joint2 | the second joint the transformation of which is constrained,
  frame1 | position of a fixed frame in joint 1,
  frame2 | position of a fixed frame in joint 2,
  mask | vector of 6 boolean defining which coordinates of the error vector to take into account.

Note
  if joint1 is 0x0, joint 1 frame is considered to be the global frame.
  For RelativePosition, the rotation part of frame1 defines the frame in which the error is expressed and the rotation of frame2 has no effect.

## ◆ create() [2/4]

template<int _Options>

static Ptr_t hpp::constraints::GenericTransformation< _Options >::create | ( | const std::string & | name,
|  | const DevicePtr_t & | robot,
|  | const JointConstPtr_t & | joint1,
|  | const JointConstPtr_t & | joint2,
|  | const Transform3s & | reference,
|  | std::vector< bool > | mask = std::vector< bool >(DerSize, true) )
| static

Object builder for relative functions.

Parameters

  name | the name of the constraints,
  robot | the robot the constraints is applied to,
  joint1 | the first joint the transformation of which is constrained,
  joint2 | the second joint the transformation of which is constrained,
  reference | desired relative transformation between the joints.
  mask | which component of the error vector to take into account.

## ◆ create() [3/4]

template<int _Options>

static Ptr_t hpp::constraints::GenericTransformation< _Options >::create | ( | const std::string & | name,
|  | const DevicePtr_t & | robot,
|  | const JointConstPtr_t & | joint2,
|  | const Transform3s & | frame2,
|  | const Transform3s & | frame1,
|  | std::vector< bool > | mask = std::vector< bool >(DerSize, true) )
| static

Object builder for absolute functions.

Parameters

  name | the name of the constraints,
  robot | the robot the constraints is applied to,
  joint2 | the second joint the transformation of which is constrained,
  frame2 | position of a fixed frame in joint 2,
  frame1 | position of a fixed frame in the world,
  mask | vector of 6 boolean defining which coordinates of the error vector to take into account.

Note
  For Position, the rotation part of frame1 defines the frame in which the error is expressed and the rotation of frame2 has no effect.

## ◆ create() [4/4]

template<int _Options>

static Ptr_t hpp::constraints::GenericTransformation< _Options >::create | ( | const std::string & | name,
|  | const DevicePtr_t & | robot,
|  | const JointConstPtr_t & | joint2,
|  | const Transform3s & | reference,
|  | std::vector< bool > | mask = std::vector< bool >(DerSize, true) )
| static

Object builder for absolute functions.

Parameters

  name | the name of the constraints,
  robot | the robot the constraints is applied to,
  joint2 | the second joint the transformation of which is constrained,
  reference | desired relative transformation between the joints.
  mask | which component of the error vector to take into account.

## ◆ dependsOnRelPoseBetween()

template<int _Options>

std::pair< JointConstPtr_t, JointConstPtr_t > hpp::constraints::GenericTransformation< _Options >::dependsOnRelPoseBetween | ( | DeviceConstPtr_t |  | ) | const
| inline virtual

Return pair of joints the relative pose between which modifies the function value if any

This method is useful to know whether an instance of Implicit constrains the relative pose between two joints.

Returns
  the pair of joints involved, arranged in order of increasing joint index, or a pair of empty shared pointers. or a pair of empty shared pointers.

Note
  if absolute pose (relative pose with respect to "universe"), "universe" is returned as empty shared pointer

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ frame1InJoint1() [1/2]

template<int _Options>

const Transform3s & hpp::constraints::GenericTransformation< _Options >::frame1InJoint1 | ( |  | ) | const
| inline

Get position of frame 1 in joint 1.

## ◆ frame1InJoint1() [2/2]

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::frame1InJoint1 | ( | const Transform3s & | M | ) |
| inline

Set position of frame 1 in joint 1.

## ◆ frame2InJoint2() [1/2]

template<int _Options>

const Transform3s & hpp::constraints::GenericTransformation< _Options >::frame2InJoint2 | ( |  | ) | const
| inline

Get position of frame 2 in joint 2.

## ◆ frame2InJoint2() [2/2]

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::frame2InJoint2 | ( | const Transform3s & | M | ) |
| inline

Set position of frame 2 in joint 2.

## ◆ impl_compute()

template<int _Options>

virtual void hpp::constraints::GenericTransformation< _Options >::impl_compute | ( | LiegroupElementRef | result,
|  | ConfigurationIn_t | argument ) const
| protected virtual

Compute value of error

Parameters

  argument | configuration of the robot,

Return values

  result | error vector

## ◆ impl_jacobian()

template<int _Options>

virtual void hpp::constraints::GenericTransformation< _Options >::impl_jacobian | ( | matrixOut_t | jacobian,
|  | ConfigurationIn_t | arg ) const
| protected virtual

## ◆ init()

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::init | ( | const WkPtr_t & | self | ) |
| inline protected

## ◆ isEqual()

template<int _Options>

bool hpp::constraints::GenericTransformation< _Options >::isEqual | ( | const DifferentiableFunction & | other | ) | const
| inline protected virtual

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ joint1() [1/2]

template<int _Options>

JointConstPtr_t hpp::constraints::GenericTransformation< _Options >::joint1 | ( |  | ) | const
| inline

Get joint 1.

## ◆ joint1() [2/2]

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::joint1 | ( | const JointConstPtr_t & | joint | ) |
| inline

Set joint 1.

## ◆ joint2() [1/2]

template<int _Options>

JointConstPtr_t hpp::constraints::GenericTransformation< _Options >::joint2 | ( |  | ) | const
| inline

Get joint 2.

## ◆ joint2() [2/2]

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::joint2 | ( | const JointConstPtr_t & | joint | ) |
| inline

Set joint 2.

## ◆ print()

template<int _Options>

virtual std::ostream & hpp::constraints::GenericTransformation< _Options >::print | ( | std::ostream & | o | ) | const
| virtual

Display object in a stream.

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ reference() [1/2]

template<int _Options>

Transform3s hpp::constraints::GenericTransformation< _Options >::reference | ( |  | ) | const
| inline

Get desired relative orientation.

## ◆ reference() [2/2]

template<int _Options>

void hpp::constraints::GenericTransformation< _Options >::reference | ( | const Transform3s & | reference | ) |
| inline

Set desired relative transformation of joint2 in joint1

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

- include/hpp/constraints/fwd.hh
- include/hpp/constraints/generic-transformation.hh