hpp-constraints: hpp::constraints::ConvexShapeContact Class Reference

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

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
hpp::constraints::ConvexShapeContact Class Reference
Constraints

`#include <hpp/constraints/convex-shape-contact.hh>`

Inheritance diagram for hpp::constraints::ConvexShapeContact:
[legend]
Collaboration diagram for hpp::constraints::ConvexShapeContact:
[legend]

## Classes
struct | ForceData

## Public Types
enum | ContactType { POINT_ON_PLANE , LINE_ON_PLANE , PLANE_ON_PLANE }
| The type of contact between each pair (object shape, floor shape). More...

## Public Member Functions
const ConvexShapes_t & | floorContactSurfaces () const
| Get vector of floor contact surfaces.
const ConvexShapes_t & | objectContactSurfaces () const
| Get vector of object contact surfaces.
value_type | radius () const
void | setNormalMargin (const value_type &margin)
std::vector< ForceData > | computeContactPoints (ConfigurationIn_t q, const value_type &normalMargin) const
| Compute the contact points.
std::ostream & | print (std::ostream &o) const
| Display object in a stream.
std::pair< JointConstPtr_t, JointConstPtr_t > | dependsOnRelPoseBetween (DeviceConstPtr_t) const
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 ConvexShapeContactPtr_t | create (const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces)
static ConvexShapeContactPtr_t | create (const DevicePtr_t &robot)
Static Public Member Functions inherited from hpp::constraints::DifferentiableFunction
static DifferentiableFunctionPtr_t | extract (DifferentiableFunctionPtr_t original, interval_t interval)

## Protected Member Functions
| ConvexShapeContact (const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces)
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 ()

## Friends
class | ConvexShapeContactComplement
class | ConvexShapeContactHold

## 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

The function returns a relative transformation between the two "closest" convex shapes it contains.

Two sets of convex shapes can be given to this class:

- a set of object contact surfaces, , which can be in contact with the environment,
- a set of floor contact surfaces, , which can support objects.

      The distance \f$ d (f_j, o_i) \f$ between object surface
      \f$o_i\f$ and environment surface \f$ f_j \f$ is defined by:
      \f{equation*}
         d (f_j, o_i)^2 =
           \left\lbrace \begin{array}{cl}
             d_{\parallel}^2 + d_{\perp}^2 &, \text{ if } d_{\parallel} > 0 \\
             d_{\perp}^2                   &, \text{ otherwise}
           \end{array} \right.
      \f}
      where
      \li \f$P (C_{o_i}, f_j)\f$ is the projection of the center \f$C_{o_i}\f$ of

  onto the plane containing ,
- is the normal of ,
- is the distance returned by ConvexShapeData::distance,
- is the distance along the normal of ,

      \image html convex-shape-contact.svg

      The function first selects the pair \f$(o_i,f_j)\f$ with shortest distance.
      \f$o_i\f$ is \em inside \f$f_j\f$ if \f$d(i,j) < 0\f$.
      It returns a value that depends on the contact types:

      | Contact type   | Inside   | Outside |
      | -------------- | -------- | ------- |
      | ConvexShapeContact::POINT_ON_PLANE | \f$(x+m,0,0,0,0)\f$ |

  | | ConvexShapeContact::LINE_ON_PLANE (Unsupported) | | | | ConvexShapeContact::PLANE_ON_PLANE | | |

      where
      \li \f$m\f$ is the normal margin (used to avoid collisions),
      \li \f$x,y,z,rx,ry,rz\f$ represents the output of the RelativeTransformation
          between the element of the pair.

      \sa ConvexShapeContactComplement

## Member Enumeration Documentation

## ◆ ContactType

enum hpp::constraints::ConvexShapeContact::ContactType

The type of contact between each pair (object shape, floor shape).

Enumerator
POINT_ON_PLANE | The object shape is a single point,.
LINE_ON_PLANE | The object shape degenerates to a line,.
PLANE_ON_PLANE | The object shape is included in a plane and none of the above case apply.

## Constructor & Destructor Documentation

## ◆ ConvexShapeContact()

hpp::constraints::ConvexShapeContact::ConvexShapeContact | ( | const std::string & | name,
|  | DevicePtr_t | robot,
|  | const JointAndShapes_t & | floorSurfaces,
|  | const JointAndShapes_t & | objectSurfaces )
| protected

Constructor

Parameters

  name | name of the constraint,
  robot | robot that holds the contact surface
  floorSurfaces,objectSurfaces | set of plane polygonal contact surfaces.

## Member Function Documentation

## ◆ computeContactPoints()

std::vector< ForceData > hpp::constraints::ConvexShapeContact::computeContactPoints | ( | ConfigurationIn_t | q,
|  | const value_type & | normalMargin ) const

Compute the contact points.

## ◆ create() [1/2]

static ConvexShapeContactPtr_t hpp::constraints::ConvexShapeContact::create | ( | const DevicePtr_t & | robot | ) |
| static

## ◆ create() [2/2]

static ConvexShapeContactPtr_t hpp::constraints::ConvexShapeContact::create | ( | const std::string & | name,
|  | DevicePtr_t | robot,
|  | const JointAndShapes_t & | floorSurfaces,
|  | const JointAndShapes_t & | objectSurfaces )
| static

Create instance and return shared pointer

Parameters

  name | name of the constraint,
  robot | robot that holds the contact surface
  floorSurfaces,objectSurfaces | set of plane polygonal contact surfaces.

## ◆ dependsOnRelPoseBetween()

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

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

Currently only supports the case when all the joints for floors are the same and all the joints for objects involved are the same

Returns
  pair of joints whose relative pose determines the value of the contact function, arranged in order of increasing joint index, or a pair of empty shared pointers.

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ floorContactSurfaces()

const ConvexShapes_t & hpp::constraints::ConvexShapeContact::floorContactSurfaces | ( |  | ) | const
| inline

Get vector of floor contact surfaces.

## ◆ isEqual()

bool hpp::constraints::ConvexShapeContact::isEqual | ( | const DifferentiableFunction & | other | ) | const
| protected virtual

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ objectContactSurfaces()

const ConvexShapes_t & hpp::constraints::ConvexShapeContact::objectContactSurfaces | ( |  | ) | const
| inline

Get vector of object contact surfaces.

## ◆ print()

std::ostream & hpp::constraints::ConvexShapeContact::print | ( | std::ostream & | o | ) | const
| virtual

Display object in a stream.

Reimplemented from hpp::constraints::DifferentiableFunction.

## ◆ radius()

value_type hpp::constraints::ConvexShapeContact::radius | ( |  | ) | const
| inline

Get radius See class documentation for a definition.

## ◆ setNormalMargin()

void hpp::constraints::ConvexShapeContact::setNormalMargin | ( | const value_type & | margin | ) |

Set the normal margin, i.e. the desired distance between matching object and nd floor shapes. Default to 0

## Friends And Related Symbol Documentation

## ◆ ConvexShapeContactComplement

friend class ConvexShapeContactComplement
| friend

## ◆ ConvexShapeContactHold

friend class ConvexShapeContactHold
| friend

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

- include/hpp/constraints/convex-shape-contact.hh