hpp-constraints
4.10.1
Definition of basic geometric constraints for motion planning
|
#include <hpp/constraints/convex-shape-contact.hh>
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. More... | |
const ConvexShapes_t & | objectContactSurfaces () const |
Get vector of object contact surfaces. More... | |
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. More... | |
std::ostream & | print (std::ostream &o) const |
Display object in a stream. More... | |
![]() | |
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. More... | |
size_type | inputDerivativeSize () const |
LiegroupSpacePtr_t | outputSpace () const |
Get output space. More... | |
size_type | outputSize () const |
Get dimension of output vector. More... | |
size_type | outputDerivativeSize () const |
Get dimension of output derivative vector. More... | |
const std::string & | name () const |
Get function name. More... | |
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 |
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) |
Protected Member Functions | |
ConvexShapeContact (const std::string &name, DevicePtr_t robot, const JointAndShapes_t &floorSurfaces, const JointAndShapes_t &objectSurfaces) | |
![]() | |
DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, size_type sizeOutput, std::string name=std::string()) | |
Concrete class constructor should call this constructor. More... | |
DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, const LiegroupSpacePtr_t &outputSpace, std::string name=std::string()) | |
Concrete class constructor should call this constructor. More... | |
virtual void | impl_compute (LiegroupElementRef result, vectorIn_t argument) const =0 |
User implementation of function evaluation. More... | |
virtual void | impl_jacobian (matrixOut_t jacobian, vectorIn_t arg) const =0 |
DifferentiableFunction () | |
Friends | |
class | ConvexShapeContactComplement |
class | ConvexShapeContactHold |
Additional Inherited Members | |
![]() | |
size_type | inputSize_ |
Dimension of input vector. More... | |
size_type | inputDerivativeSize_ |
Dimension of input derivative. More... | |
LiegroupSpacePtr_t | outputSpace_ |
Dimension of output vector. More... | |
ArrayXb | activeParameters_ |
ArrayXb | activeDerivativeParameters_ |
The function returns a relative transformation between the two "closest" convex shapes it contains.
Twos set of convex shapes can be given to this class:
The distance \( d (f_j, o_i) \) between object surface \(o_i\) and environment surface \( f_j \) is defined by:
\begin{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. \end{equation*}
where
The function first selects the pair \((o_i,f_j)\) with shortest distance. \(o_i\) is inside \(f_j\) if \(d(i,j) < 0\). It returns a value that depends on the contact types:
Contact type | Inside | Outside |
---|---|---|
ConvexShapeContact::POINT_ON_PLANE | \((x+m,0,0,0,0)\) | \((x+m,y,z,0,0)\) |
ConvexShapeContact::LINE_ON_PLANE (Unsupported) | \((x+m,0,0,0,rz)\) | \((x+m,y,z,0,rz)\) |
ConvexShapeContact::PLANE_ON_PLANE | \((x+m,0,0,ry,rz)\) | \((x+m,y,z,ry,rz)\) |
where
|
protected |
Constructor
name | name of the constraint, |
robot | robot that holds the contact surface |
floorSurfaces,objectSurfaces | set of plane polygonal contact surfaces. |
std::vector<ForceData> hpp::constraints::ConvexShapeContact::computeContactPoints | ( | ConfigurationIn_t | q, |
const value_type & | normalMargin | ||
) | const |
Compute the contact points.
|
static |
Create instance and return shared pointer
name | name of the constraint, |
robot | robot that holds the contact surface |
floorSurfaces,objectSurfaces | set of plane polygonal contact surfaces. |
|
static |
|
inline |
Get vector of floor contact surfaces.
|
inline |
Get vector of object contact surfaces.
|
virtual |
Display object in a stream.
Reimplemented from hpp::constraints::DifferentiableFunction.
|
inline |
Get radius \(M\) See class documentation for a definition.
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
|
friend |
|
friend |