tasks::qp::UnilateralContact Struct Reference

#include <Tasks/QPContacts.h>

Collaboration diagram for tasks::qp::UnilateralContact:

Public Member Functions

 UnilateralContact ()
 
 UnilateralContact (int r1Index, int r2Index, const std::string &r1BodyName, const std::string &r2BodyName, std::vector< Eigen::Vector3d > r1Points, const Eigen::Matrix3d &r1Frame, const sva::PTransformd &X_b1_b2, int nrGen, double mu, const sva::PTransformd &X_b1_cf=sva::PTransformd::Identity())
 
 UnilateralContact (int r1Index, int r2Index, const std::string &r1BodyName, const std::string &r2BodyName, int ambId, std::vector< Eigen::Vector3d > r1Points, const Eigen::Matrix3d &r1Frame, const sva::PTransformd &X_b1_b2, int nrGen, double mu, const sva::PTransformd &X_b1_cf=sva::PTransformd::Identity())
 
 UnilateralContact (const ContactId &cId, std::vector< Eigen::Vector3d > r1Points, const Eigen::Matrix3d &r1Frame, const sva::PTransformd &X_b1_b2, int nrGen, double mu, const sva::PTransformd &X_b1_cf=sva::PTransformd::Identity())
 
Eigen::Vector3d force (const Eigen::VectorXd &lambda, int p, const FrictionCone &c) const
 
Eigen::Vector3d force (const Eigen::VectorXd &lambda, const FrictionCone &c) const
 
sva::ForceVecd force (const Eigen::VectorXd &lambda, const std::vector< Eigen::Vector3d > &r_b_pi, const FrictionCone &c_pi_b) const
 
int nrLambda (int point) const
 
int nrLambda () const
 
Eigen::Vector3d sForce (const Eigen::VectorXd &lambda, int point, const FrictionCone &c) const
 
Eigen::Vector3d sForce (const Eigen::VectorXd &lambda, const FrictionCone &c) const
 
sva::ForceVecd sForce (const Eigen::VectorXd &lambda, const std::vector< Eigen::Vector3d > &r_b_pi, const FrictionCone &c_pi_b) const
 
int sNrLambda (int point) const
 

Public Attributes

ContactId contactId
 
std::vector< Eigen::Vector3d > r1Points
 
std::vector< Eigen::Vector3d > r2Points
 
FrictionCone r1Cone
 
FrictionCone r2Cone
 
sva::PTransformd X_b1_b2
 
sva::PTransformd X_b1_cf
 

Detailed Description

Model of a planar contacts. All friction cone are in the same direction.

Constructor & Destructor Documentation

◆ UnilateralContact() [1/4]

tasks::qp::UnilateralContact::UnilateralContact ( )
inline

◆ UnilateralContact() [2/4]

tasks::qp::UnilateralContact::UnilateralContact ( int  r1Index,
int  r2Index,
const std::string &  r1BodyName,
const std::string &  r2BodyName,
std::vector< Eigen::Vector3d >  r1Points,
const Eigen::Matrix3d &  r1Frame,
const sva::PTransformd &  X_b1_b2,
int  nrGen,
double  mu,
const sva::PTransformd &  X_b1_cf = sva::PTransformd::Identity() 
)
Parameters
r1IndexFirst robot imply in the contact.
r2IndexSecond robot imply in the contact.
r1BodyNameBody name of robot r1Index imply in the contact.
r2BodyNameBody name of robot r2Index imply in the contact.
r1PointsContact points in r1BodyId frame.
r1FrameFriction cone frame in rbBodyId frame.
X_b1_b2Transformation between r1BodyId and r2BodyId frame.
nrGenNumber of generatrix.
muCoefficient of friction.
X_b1_cfDefine the \( cf \) frame (common frame) used in the contact constraints.
See also
ContactConstrCommon::addDofContact

◆ UnilateralContact() [3/4]

tasks::qp::UnilateralContact::UnilateralContact ( int  r1Index,
int  r2Index,
const std::string &  r1BodyName,
const std::string &  r2BodyName,
int  ambId,
std::vector< Eigen::Vector3d >  r1Points,
const Eigen::Matrix3d &  r1Frame,
const sva::PTransformd &  X_b1_b2,
int  nrGen,
double  mu,
const sva::PTransformd &  X_b1_cf = sva::PTransformd::Identity() 
)
Parameters
r1IndexFirst robot imply in the contact.
r2IndexSecond robot imply in the contact.
r1BodyNameBody name of robot r1Index imply in the contact.
r2BodyNameBody name of robot r2Index imply in the contact.
ambIdambiguityId.
r1PointsContact points in r1BodyId frame.
r1FrameFriction cone frame in rbBodyId frame.
X_b1_b2Transformation between r1BodyId and r2BodyId frame.
nrGenNumber of generatrix.
muCoefficient of friction.
X_b1_cfDefine the \( cf \) frame (common frame) used in the contact constraints.
See also
ContactConstrCommon::addDofContact
ContactId::ContactId

◆ UnilateralContact() [4/4]

tasks::qp::UnilateralContact::UnilateralContact ( const ContactId cId,
std::vector< Eigen::Vector3d >  r1Points,
const Eigen::Matrix3d &  r1Frame,
const sva::PTransformd &  X_b1_b2,
int  nrGen,
double  mu,
const sva::PTransformd &  X_b1_cf = sva::PTransformd::Identity() 
)
Parameters
cIdContact id.
r1PointsContact points in r1BodyId frame.
r1FrameFriction cone frame in rbBodyId frame.
X_b1_b2Transformation between r1BodyId and r2BodyId frame.
nrGenNumber of generatrix.
muCoefficient of friction.
X_b1_cfDefine the \( cf \) frame (common frame) used in the contact constraints.
See also
ContactConstrCommon::addDofContact

Member Function Documentation

◆ force() [1/3]

Eigen::Vector3d tasks::qp::UnilateralContact::force ( const Eigen::VectorXd &  lambda,
const FrictionCone c 
) const
Returns
Cone c, force vector in body coordinate.

◆ force() [2/3]

sva::ForceVecd tasks::qp::UnilateralContact::force ( const Eigen::VectorXd &  lambda,
const std::vector< Eigen::Vector3d > &  r_b_pi,
const FrictionCone c_pi_b 
) const

Compute force applied on the body origin in the body frame.

Parameters
lambdaLinearized contact forces.
r_b_piList of transformation r_b_pi (body origin to point i).
c_pi_bFriction cone associated with each point in body frame.
Returns
F_b, the 6D force applied on the body origin at the body frame.

◆ force() [3/3]

Eigen::Vector3d tasks::qp::UnilateralContact::force ( const Eigen::VectorXd &  lambda,
int  p,
const FrictionCone c 
) const
Returns
Cone c, point p force vector in body coordinate.

◆ nrLambda() [1/2]

int tasks::qp::UnilateralContact::nrLambda ( ) const
Returns
Number of lambda needed to compute the force vector.

◆ nrLambda() [2/2]

int tasks::qp::UnilateralContact::nrLambda ( int  point) const
Returns
Number of lambda needed to compute the force vector of the contact point.

◆ sForce() [1/3]

Eigen::Vector3d tasks::qp::UnilateralContact::sForce ( const Eigen::VectorXd &  lambda,
const FrictionCone c 
) const

Safe version of

See also
force.
Exceptions
std::domain_errorIf lambda don't match the number of generator.

◆ sForce() [2/3]

sva::ForceVecd tasks::qp::UnilateralContact::sForce ( const Eigen::VectorXd &  lambda,
const std::vector< Eigen::Vector3d > &  r_b_pi,
const FrictionCone c_pi_b 
) const

Safe version of

See also
force.
Exceptions
std::domain_errorIf lambda don't match the number of generator.

◆ sForce() [3/3]

Eigen::Vector3d tasks::qp::UnilateralContact::sForce ( const Eigen::VectorXd &  lambda,
int  point,
const FrictionCone c 
) const

Safe version of

See also
force.
Exceptions
std::domain_errorIf lambda don't match the number of generator or if point is not a valid index.

◆ sNrLambda()

int tasks::qp::UnilateralContact::sNrLambda ( int  point) const

Safe version of

See also
nrLambda.
Exceptions
std::domain_errorIf point is not a valid index.

Member Data Documentation

◆ contactId

ContactId tasks::qp::UnilateralContact::contactId

◆ r1Cone

FrictionCone tasks::qp::UnilateralContact::r1Cone

◆ r1Points

std::vector<Eigen::Vector3d> tasks::qp::UnilateralContact::r1Points

◆ r2Cone

FrictionCone tasks::qp::UnilateralContact::r2Cone

◆ r2Points

std::vector<Eigen::Vector3d> tasks::qp::UnilateralContact::r2Points

◆ X_b1_b2

sva::PTransformd tasks::qp::UnilateralContact::X_b1_b2

◆ X_b1_cf

sva::PTransformd tasks::qp::UnilateralContact::X_b1_cf

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