KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
ContactFormation Struct Reference

A robot-environment contact formation. The list of contacts contacts[i] is associated with links[i] (pointing from the opposing body into the robot). Usually the opposing body is the environment, but if targets is non-empty, it gives the index of the body for which contact is made. More...

#include <Contact.h>

Public Member Functions

void set (int link, const std::vector< ContactPoint > &contacts, int target=-1)
 Sets the contact formation to a single-link set of contacts.
 
void concat (const ContactFormation &formation)
 Adds another formation onto this one.
 
void flatten (std::vector< int > &flatLinks, std::vector< ContactPoint > &cps) const
 Collapses this into a single list of links and cps.
 
void flatten (std::vector< int > &flatLinks, std::vector< ContactPoint > &cps, std::vector< int > &flattargets) const
 
int numContactPoints () const
 Returns the number of contact points.
 
int numForceVariables () const
 Returns the total number of force variables (3*numContactPoints())
 

Public Attributes

std::vector< int > links
 
std::vector< std::vector< ContactPoint > > contacts
 
std::vector< int > targets
 

Detailed Description

A robot-environment contact formation. The list of contacts contacts[i] is associated with links[i] (pointing from the opposing body into the robot). Usually the opposing body is the environment, but if targets is non-empty, it gives the index of the body for which contact is made.


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