iDynTree::LinkContactWrenches class

A set of ContactWrench for each link, representing all the contacts between the model and the external environment.

Constructors, destructors, conversion operators

LinkContactWrenches(std::size_t nrOfLinks = 0)
Create a LinkWrenches vector, with the size given by nrOfLinks .
LinkContactWrenches(const Model& model)

Public functions

void resize(std::size_t nrOfLinks)
void resize(const Model& model)
auto getNrOfContactsForLink(const LinkIndex linkIndex) const -> size_t
Get the number of external contacts for a given link.
void setNrOfContactsForLink(const LinkIndex linkIndex, const size_t nrOfContacts)
Set the number of external contacts for a given link.
auto getNrOfLinks() const -> size_t
Get the number of links.
auto contactWrench(const LinkIndex linkIndex, const size_t contactIndex) -> ContactWrench&
Get a specific ContactWrench.
auto contactWrench(const LinkIndex linkIndex, const size_t contactIndex) const -> const ContactWrench&
auto computeNetWrenches(LinkNetExternalWrenches& netWrenches) const -> bool
Compute the net wrenches vector from the contacts wrenches vector.
auto toString(const Model& model) const -> std::string
Get a human readable description of the LinkUnknownWrenchContacts (for debug)

Function documentation

iDynTree::LinkContactWrenches::LinkContactWrenches(std::size_t nrOfLinks = 0)

Create a LinkWrenches vector, with the size given by nrOfLinks .

Parameters
nrOfLinks in the size of the vector.

void iDynTree::LinkContactWrenches::resize(std::size_t nrOfLinks)

Parameters
nrOfLinks in the number of links to which resize this object

ContactWrench& iDynTree::LinkContactWrenches::contactWrench(const LinkIndex linkIndex, const size_t contactIndex)

Get a specific ContactWrench.

Parameters
linkIndex in the index of the link for which the contact is retrieved
contactIndex in a index (between 0 and getNrOfContactsForLink(link)-1 ) identifing the specific contact.

bool iDynTree::LinkContactWrenches::computeNetWrenches(LinkNetExternalWrenches& netWrenches) const

Compute the net wrenches vector from the contacts wrenches vector.

Returns true if all went well, false otherwise.

This is just a loop that sums all the contact wrenches for every link and store the results (expressed in the link frame) in the netWrenches vector.