mc_rbdyn::Contact Struct Reference

#include <mc_rbdyn/Contact.h>

Public Member Functions

 Contact (const mc_rbdyn::Robots &robots, const std::string &robotSurface, const std::string &envSurface, double friction=defaultFriction)
 
 Contact (const mc_rbdyn::Robots &robots, const std::string &robotSurface, const std::string &envSurface, const sva::PTransformd &X_es_rs, double friction=defaultFriction)
 
 Contact (const mc_rbdyn::Robots &robots, unsigned int r1Index, unsigned int r2Index, const std::string &r1Surface, const std::string &r2Surface, double friction=defaultFriction, int ambiguityId=-1)
 
 Contact (const mc_rbdyn::Robots &robots, unsigned int r1Index, unsigned int r2Index, const std::string &r1Surface, const std::string &r2Surface, const sva::PTransformd &X_r2s_r1s, double friction=defaultFriction, int ambiguityId=-1)
 
 Contact (const mc_rbdyn::Robots &robots, unsigned int r1Index, unsigned int r2Index, const std::string &r1Surface, const std::string &r2Surface, const sva::PTransformd &X_r2s_r1s, const sva::PTransformd &X_b_s, double friction=defaultFriction, int ambiguityId=-1)
 
 Contact (const Contact &contact)
 
Contactoperator= (const Contact &)
 
 ~Contact ()
 
unsigned int r1Index () const
 
unsigned int r2Index () const
 
const std::shared_ptr< mc_rbdyn::Surface > & r1Surface () const
 
const std::shared_ptr< mc_rbdyn::Surface > & r2Surface () const
 
const sva::PTransformd & X_r2s_r1s () const
 
void X_r2s_r1s (const sva::PTransformd &in)
 
const sva::PTransformd & X_b_s () const
 
const int & ambiguityId () const
 
bool isFixed () const
 
double friction () const
 
void friction (double friction)
 
std::pair< std::string, std::string > surfaces () const
 
sva::PTransformd X_0_r1s (const mc_rbdyn::Robot &robot) const
 
sva::PTransformd X_0_r1s (const mc_rbdyn::Robots &robots) const
 
sva::PTransformd X_0_r2s (const mc_rbdyn::Robot &robot) const
 
sva::PTransformd X_0_r2s (const mc_rbdyn::Robots &robots) const
 
std::vector< sva::PTransformd > r1Points ()
 
std::vector< sva::PTransformd > r2Points ()
 
sva::PTransformd compute_X_r2s_r1s (const mc_rbdyn::Robots &robots) const
 
tasks::qp::ContactId contactId (const mc_rbdyn::Robots &robots) const
 
mc_solver::QPContactPtr taskContact (const mc_rbdyn::Robots &robots) const
 
mc_solver::QPContactPtrWPoints taskContactWPoints (const mc_rbdyn::Robots &robots, const sva::PTransformd *X_es_rs=nullptr) const
 
std::string toStr () const
 
Contact swap (const mc_rbdyn::Robots &robots) const
 
const Eigen::Vector6d & dof () const noexcept
 
void dof (const Eigen::Vector6d &dof) noexcept
 
bool operator== (const Contact &rhs) const
 
bool operator!= (const Contact &rhs) const
 

Static Public Member Functions

static mc_rbdyn::Contact load (const mc_rbdyn::Robots &robots, const mc_rtc::Configuration &config)
 
static std::vector< mc_rbdyn::ContactloadVector (const mc_rbdyn::Robots &robots, const mc_rtc::Configuration &config)
 

Static Public Attributes

constexpr static int nrConeGen = 4
 
constexpr static double defaultFriction = 0.7
 
constexpr static unsigned int nrBilatPoints = 4
 

Constructor & Destructor Documentation

◆ Contact() [1/6]

mc_rbdyn::Contact::Contact ( const mc_rbdyn::Robots robots,
const std::string &  robotSurface,
const std::string &  envSurface,
double  friction = defaultFriction 
)

◆ Contact() [2/6]

mc_rbdyn::Contact::Contact ( const mc_rbdyn::Robots robots,
const std::string &  robotSurface,
const std::string &  envSurface,
const sva::PTransformd &  X_es_rs,
double  friction = defaultFriction 
)

◆ Contact() [3/6]

mc_rbdyn::Contact::Contact ( const mc_rbdyn::Robots robots,
unsigned int  r1Index,
unsigned int  r2Index,
const std::string &  r1Surface,
const std::string &  r2Surface,
double  friction = defaultFriction,
int  ambiguityId = -1 
)

◆ Contact() [4/6]

mc_rbdyn::Contact::Contact ( const mc_rbdyn::Robots robots,
unsigned int  r1Index,
unsigned int  r2Index,
const std::string &  r1Surface,
const std::string &  r2Surface,
const sva::PTransformd &  X_r2s_r1s,
double  friction = defaultFriction,
int  ambiguityId = -1 
)

◆ Contact() [5/6]

mc_rbdyn::Contact::Contact ( const mc_rbdyn::Robots robots,
unsigned int  r1Index,
unsigned int  r2Index,
const std::string &  r1Surface,
const std::string &  r2Surface,
const sva::PTransformd &  X_r2s_r1s,
const sva::PTransformd &  X_b_s,
double  friction = defaultFriction,
int  ambiguityId = -1 
)

◆ Contact() [6/6]

mc_rbdyn::Contact::Contact ( const Contact contact)

◆ ~Contact()

mc_rbdyn::Contact::~Contact ( )

Member Function Documentation

◆ ambiguityId()

const int& mc_rbdyn::Contact::ambiguityId ( ) const

◆ compute_X_r2s_r1s()

sva::PTransformd mc_rbdyn::Contact::compute_X_r2s_r1s ( const mc_rbdyn::Robots robots) const

◆ contactId()

tasks::qp::ContactId mc_rbdyn::Contact::contactId ( const mc_rbdyn::Robots robots) const

◆ dof() [1/2]

const Eigen::Vector6d& mc_rbdyn::Contact::dof ( ) const
inlinenoexcept

◆ dof() [2/2]

void mc_rbdyn::Contact::dof ( const Eigen::Vector6d &  dof)
inlinenoexcept

◆ friction() [1/2]

double mc_rbdyn::Contact::friction ( ) const

Return the contact friction

◆ friction() [2/2]

void mc_rbdyn::Contact::friction ( double  friction)

Set the contact friction

◆ isFixed()

bool mc_rbdyn::Contact::isFixed ( ) const

◆ load()

static mc_rbdyn::Contact mc_rbdyn::Contact::load ( const mc_rbdyn::Robots robots,
const mc_rtc::Configuration config 
)
static

◆ loadVector()

static std::vector<mc_rbdyn::Contact> mc_rbdyn::Contact::loadVector ( const mc_rbdyn::Robots robots,
const mc_rtc::Configuration config 
)
static

◆ operator!=()

bool mc_rbdyn::Contact::operator!= ( const Contact rhs) const

◆ operator=()

Contact& mc_rbdyn::Contact::operator= ( const Contact )

◆ operator==()

bool mc_rbdyn::Contact::operator== ( const Contact rhs) const

◆ r1Index()

unsigned int mc_rbdyn::Contact::r1Index ( ) const

◆ r1Points()

std::vector<sva::PTransformd> mc_rbdyn::Contact::r1Points ( )

◆ r1Surface()

const std::shared_ptr<mc_rbdyn::Surface>& mc_rbdyn::Contact::r1Surface ( ) const

◆ r2Index()

unsigned int mc_rbdyn::Contact::r2Index ( ) const

◆ r2Points()

std::vector<sva::PTransformd> mc_rbdyn::Contact::r2Points ( )

◆ r2Surface()

const std::shared_ptr<mc_rbdyn::Surface>& mc_rbdyn::Contact::r2Surface ( ) const

◆ surfaces()

std::pair<std::string, std::string> mc_rbdyn::Contact::surfaces ( ) const

◆ swap()

Contact mc_rbdyn::Contact::swap ( const mc_rbdyn::Robots robots) const

If this is a contact r1::s1/r2::s2, this returns r2::s2/r1::s1

◆ taskContact()

mc_solver::QPContactPtr mc_rbdyn::Contact::taskContact ( const mc_rbdyn::Robots robots) const

◆ taskContactWPoints()

mc_solver::QPContactPtrWPoints mc_rbdyn::Contact::taskContactWPoints ( const mc_rbdyn::Robots robots,
const sva::PTransformd *  X_es_rs = nullptr 
) const

◆ toStr()

std::string mc_rbdyn::Contact::toStr ( ) const

◆ X_0_r1s() [1/2]

sva::PTransformd mc_rbdyn::Contact::X_0_r1s ( const mc_rbdyn::Robot robot) const

◆ X_0_r1s() [2/2]

sva::PTransformd mc_rbdyn::Contact::X_0_r1s ( const mc_rbdyn::Robots robots) const

◆ X_0_r2s() [1/2]

sva::PTransformd mc_rbdyn::Contact::X_0_r2s ( const mc_rbdyn::Robot robot) const

◆ X_0_r2s() [2/2]

sva::PTransformd mc_rbdyn::Contact::X_0_r2s ( const mc_rbdyn::Robots robots) const

◆ X_b_s()

const sva::PTransformd& mc_rbdyn::Contact::X_b_s ( ) const

◆ X_r2s_r1s() [1/2]

const sva::PTransformd& mc_rbdyn::Contact::X_r2s_r1s ( ) const

◆ X_r2s_r1s() [2/2]

void mc_rbdyn::Contact::X_r2s_r1s ( const sva::PTransformd &  in)

Member Data Documentation

◆ defaultFriction

constexpr static double mc_rbdyn::Contact::defaultFriction = 0.7
staticconstexpr

◆ nrBilatPoints

constexpr static unsigned int mc_rbdyn::Contact::nrBilatPoints = 4
staticconstexpr

◆ nrConeGen

constexpr static int mc_rbdyn::Contact::nrConeGen = 4
staticconstexpr

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