hpp::rbprm::State Struct Reference

Helper class that maintains active contacts at a given state, as well as their locations can be used to determine contact transition wrt a previous State. More...

#include <hpp/rbprm/rbprm-state.hh>

Collaboration diagram for hpp::rbprm::State:
[legend]

Public Member Functions

 State ()
 
 State (const State &other)
 
 ~State ()
 
Stateoperator= (const State &other)
 
bool RemoveContact (const std::string &contactId)
 Removes an active contact from the State. More...
 
std::string RemoveFirstContact ()
 Removes the first active contact created in the state.Contact order is maintained in a queue. More...
 
std::vector< std::string > contactVariations (const State &previous) const
 Given a antecedent State, computes the list of contact changes (creations an destructions) More...
 
std::vector< std::string > freeVariations (const State &previous, const std::vector< std::string > &allEffectors) const
 Given an antecedent State and a list of effectors, computes the list of effectors that were not in contact in any of the two states. More...
 
std::vector< std::string > allVariations (const State &previous, const std::vector< std::string > &allEffectors) const
 Given an antecedent State and a list of effectors, computes the list of all the effectors that moved between the two States (ie contact was not maintained) More...
 
std::vector< std::string > fixedContacts (const State &previous) const
 Given a antecedent State, computes the list of Contacts that were maintained between the two States (both active at the same location) More...
 
void contactCreations (const State &previous, std::vector< std::string > &outList) const
 Given a antecedent State, computes the list of Contacts that were created between the two States. More...
 
std::vector< std::string > contactCreations (const State &previous) const
 Given a antecedent State, computes the list of Contacts that were created between the two States. More...
 
std::vector< std::string > contactBreaks (const State &previous) const
 Given a antecedent State, computes the list of Contacts that were broken between the two States. More...
 
void contactBreaks (const State &previous, std::vector< std::string > &outList) const
 Given a antecedent State, computes the list of Contacts that were broken between the two States. More...
 
void print () const
 
void print (std::stringstream &ss) const
 
void print (std::stringstream &ss, const State &previous) const
 
void printInternal (std::stringstream &ss) const
 

Public Attributes

hpp::pinocchio::Configuration_t configuration_
 
std::map< std::string, bool > contacts_
 
std::map< std::string, fcl::Vec3f > contactNormals_
 
std::map< std::string, fcl::Vec3f > contactPositions_
 
std::map< std::string, fcl::Matrix3f > contactRotation_
 
std::queue< std::string > contactOrder_
 
std::size_t nbContacts
 
bool stable
 
double robustness
 

Detailed Description

Helper class that maintains active contacts at a given state, as well as their locations can be used to determine contact transition wrt a previous State.

Constructor & Destructor Documentation

◆ State() [1/2]

hpp::rbprm::State::State ( )
inline

◆ State() [2/2]

hpp::rbprm::State::State ( const State other)

◆ ~State()

hpp::rbprm::State::~State ( )
inline

Member Function Documentation

◆ allVariations()

std::vector<std::string> hpp::rbprm::State::allVariations ( const State previous,
const std::vector< std::string > &  allEffectors 
) const

Given an antecedent State and a list of effectors, computes the list of all the effectors that moved between the two States (ie contact was not maintained)

Returns
the list of all modified effectors between two States

◆ contactBreaks() [1/2]

std::vector<std::string> hpp::rbprm::State::contactBreaks ( const State previous) const

Given a antecedent State, computes the list of Contacts that were broken between the two States.

Returns
the list of all broken contacts between two States

◆ contactBreaks() [2/2]

void hpp::rbprm::State::contactBreaks ( const State previous,
std::vector< std::string > &  outList 
) const

Given a antecedent State, computes the list of Contacts that were broken between the two States.

Returns
the list of all broken contacts between two States

◆ contactCreations() [1/2]

void hpp::rbprm::State::contactCreations ( const State previous,
std::vector< std::string > &  outList 
) const

Given a antecedent State, computes the list of Contacts that were created between the two States.

Returns
the list of all created contacts between two States

◆ contactCreations() [2/2]

std::vector<std::string> hpp::rbprm::State::contactCreations ( const State previous) const

Given a antecedent State, computes the list of Contacts that were created between the two States.

Returns
the list of all created contacts between two States

◆ contactVariations()

std::vector<std::string> hpp::rbprm::State::contactVariations ( const State previous) const

Given a antecedent State, computes the list of contact changes (creations an destructions)

Returns
the list of all modified contacts between two States

◆ fixedContacts()

std::vector<std::string> hpp::rbprm::State::fixedContacts ( const State previous) const

Given a antecedent State, computes the list of Contacts that were maintained between the two States (both active at the same location)

Returns
the list of all preserved contacts between two States

Referenced by hpp::rbprm::interpolation::CreateContactConstraints().

◆ freeVariations()

std::vector<std::string> hpp::rbprm::State::freeVariations ( const State previous,
const std::vector< std::string > &  allEffectors 
) const

Given an antecedent State and a list of effectors, computes the list of effectors that were not in contact in any of the two states.

Returns
the list of all modified contacts between two States

◆ operator=()

State& hpp::rbprm::State::operator= ( const State other)

◆ print() [1/3]

void hpp::rbprm::State::print ( ) const

◆ print() [2/3]

void hpp::rbprm::State::print ( std::stringstream &  ss) const

◆ print() [3/3]

void hpp::rbprm::State::print ( std::stringstream &  ss,
const State previous 
) const

◆ printInternal()

void hpp::rbprm::State::printInternal ( std::stringstream &  ss) const

◆ RemoveContact()

bool hpp::rbprm::State::RemoveContact ( const std::string &  contactId)

Removes an active contact from the State.

Parameters
contactIdname of the contact to remove
Returns
true whether the contact was indeed active

◆ RemoveFirstContact()

std::string hpp::rbprm::State::RemoveFirstContact ( )

Removes the first active contact created in the state.Contact order is maintained in a queue.

Returns
empty string if no contact was active, otherwise the id of the removed contact

Member Data Documentation

◆ configuration_

◆ contactNormals_

std::map<std::string, fcl::Vec3f> hpp::rbprm::State::contactNormals_

◆ contactOrder_

std::queue<std::string> hpp::rbprm::State::contactOrder_

◆ contactPositions_

std::map<std::string, fcl::Vec3f> hpp::rbprm::State::contactPositions_

◆ contactRotation_

std::map<std::string, fcl::Matrix3f> hpp::rbprm::State::contactRotation_

◆ contacts_

std::map<std::string, bool> hpp::rbprm::State::contacts_

◆ nbContacts

std::size_t hpp::rbprm::State::nbContacts

◆ robustness

double hpp::rbprm::State::robustness

◆ stable

bool hpp::rbprm::State::stable