LinkContactWrenches class
          #include <iDynTree/ContactWrench.h>
        
        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.
 - void addNewContactForLink(const LinkIndex linkIndex, const ContactWrench& newContact)
 - Add a new contact for a link.
 - auto addNewContactInFrame(const Model& model, const FrameIndex frameIndex, const ContactWrench& newContact) -> bool
 - Add a new contact for a frame.
 - auto toString(const Model& model) const -> std::string
 - Get a human readable description of the LinkWrenchContacts (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.
              void iDynTree:: LinkContactWrenches:: addNewContactForLink(const LinkIndex linkIndex,
              const ContactWrench& newContact)
            
            Add a new contact for a link.
| Parameters | |
|---|---|
| linkIndex in | the index of the link for which the contact is added. | 
| newContact in | the new contact wrench to add. | 
              bool iDynTree:: LinkContactWrenches:: addNewContactInFrame(const Model& model,
              const FrameIndex frameIndex,
              const ContactWrench& newContact)
            
            Add a new contact for a frame.
| Parameters | |
|---|---|
| model in | the model class for getting frame information. | 
| frameIndex in | the index of the frame in which you are expressing the new wrench. | 
| newContact in | the new wrench to add. | 
| Returns | true if all went well, false otherwise | 
If the specified frame is not a link frame, the method automatically convert the wrench to the relative link frame.