Commit a288b441 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[C++] add method COntactSequence::getALlEffectorsInContact

parent b736c09b
......@@ -17,6 +17,7 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
typedef _ContactPhase ContactPhase;
typedef typename ContactPhase::Scalar Scalar;
typedef typename ContactPhase::t_strings t_strings;
typedef std::vector<ContactPhase> ContactPhaseVector;
ContactSequenceTpl(const size_t size = 0) : m_contact_phases(size) {}
......@@ -742,6 +743,21 @@ struct ContactSequenceTpl : public serialization::Serializable<ContactSequenceTp
return true;
* @brief getAllEffectorsInContact return a vector of names of all the effectors used to create contacts during the sequence
* @return
t_strings getAllEffectorsInContact() const{
// use set to guarantee uniqueness, but return a vector for easier use and python bindings
std::set<std::string> res_set;
for(const ContactPhase& phase : m_contact_phases){
for(const std::string& eeName : phase.effectorsInContact()){
return t_strings(res_set.begin(), res_set.end());
/* End Helpers */
/*Public Attributes*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment