tasks::qp::BilateralContact Struct Reference

#include <Tasks/QPContacts.h>

Collaboration diagram for tasks::qp::BilateralContact:

Public Member Functions

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

Public Attributes

ContactId contactId
 
std::vector< Eigen::Vector3d > r1Points
 
std::vector< Eigen::Vector3d > r2Points
 
std::vector< FrictionConer1Cones
 
std::vector< FrictionConer2Cones
 
sva::PTransformd X_b1_b2
 
sva::PTransformd X_b1_cf
 

Detailed Description

Model of a generic contacts. Friction cone frame can be different for each contact points.

Constructor & Destructor Documentation

◆ BilateralContact() [1/5]

tasks::qp::BilateralContact::BilateralContact ( )
inline

◆ BilateralContact() [2/5]

tasks::qp::BilateralContact::BilateralContact ( int  r1Index,
int  r2Index,
const std::string &  r1BodyName,
const std::string &  r2BodyName,
std::vector< Eigen::Vector3d >  r1Points,
const std::vector< Eigen::Matrix3d > &  r1Frames,
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.
r1FramesFriction cone frame in r1Points order 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

◆ BilateralContact() [3/5]

tasks::qp::BilateralContact::BilateralContact ( int  r1Index,
int  r2Index,
const std::string &  r1BodyName,
const std::string &  r2BodyName,
int  ambId,
std::vector< Eigen::Vector3d >  r1Points,
const std::vector< Eigen::Matrix3d > &  r1Frames,
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 id of robot r1Index imply in the contact.
r2BodyNameBody id of robot r2Index imply in the contact.
ambIdambiguityId.
r1PointsContact points in r1BodyId frame.
r1FramesFriction cone frame in r1Points order 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

◆ BilateralContact() [4/5]

tasks::qp::BilateralContact::BilateralContact ( const ContactId cId,
std::vector< Eigen::Vector3d >  r1Points,
const std::vector< Eigen::Matrix3d > &  r1Frames,
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.
r1FramesFriction cone frame in r1Points order 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

◆ BilateralContact() [5/5]

tasks::qp::BilateralContact::BilateralContact ( const UnilateralContact c)

Construct a BilateralContact from an UnilateralContact.

Member Function Documentation

◆ force() [1/3]

sva::ForceVecd tasks::qp::BilateralContact::force ( const Eigen::VectorXd &  lambda,
const std::vector< Eigen::Vector3d > &  r_b_pi,
const std::vector< 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_bFrictions cones associated with each point in body frame.
Returns
F_b, the 6D force applied on the body origin at the body frame.

◆ force() [2/3]

Eigen::Vector3d tasks::qp::BilateralContact::force ( const Eigen::VectorXd &  lambda,
const std::vector< FrictionCone > &  c 
) const
Returns
Cones c force vector in body coordinate.

◆ force() [3/3]

Eigen::Vector3d tasks::qp::BilateralContact::force ( const Eigen::VectorXd &  lambda,
int  point,
const std::vector< FrictionCone > &  c 
) const
Returns
Cone c[point] force vector in body coordinate.

◆ nrLambda() [1/2]

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

◆ nrLambda() [2/2]

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

◆ sForce() [1/3]

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

Safe version of

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

◆ sForce() [2/3]

Eigen::Vector3d tasks::qp::BilateralContact::sForce ( const Eigen::VectorXd &  lambda,
const std::vector< FrictionCone > &  c 
) const

Safe version of

See also
force. Also the generic one for python binding.
Exceptions
std::domain_errorIf lambda don't match the number of generator.

◆ sForce() [3/3]

Eigen::Vector3d tasks::qp::BilateralContact::sForce ( const Eigen::VectorXd &  lambda,
int  point,
const std::vector< FrictionCone > &  c 
) const

Safe version of

See also
force. Also the generic one for python binding.
Exceptions
std::domain_errorIf lambda don't match the number of generator or if point it not a valid index.

◆ sNrLambda()

int tasks::qp::BilateralContact::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::BilateralContact::contactId

◆ r1Cones

std::vector<FrictionCone> tasks::qp::BilateralContact::r1Cones

◆ r1Points

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

◆ r2Cones

std::vector<FrictionCone> tasks::qp::BilateralContact::r2Cones

◆ r2Points

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

◆ X_b1_b2

sva::PTransformd tasks::qp::BilateralContact::X_b1_b2

◆ X_b1_cf

sva::PTransformd tasks::qp::BilateralContact::X_b1_cf

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