19 #ifndef HPP_RBPRM_STATE_HH
20 # define HPP_RBPRM_STATE_HH
23 # include <hpp/pinocchio/device.hh>
32 typedef std::vector<State>
T_State;
34 typedef std::pair<pinocchio::value_type, rbprm::State>
StateFrame;
41 State():nbContacts(0), stable(false){}
51 bool RemoveContact(
const std::string& contactId);
58 std::string RemoveFirstContact();
63 std::vector<std::string> contactVariations(
const State& previous)
const;
69 std::vector<std::string> freeVariations(
const State& previous,
const std::vector<std::string>& allEffectors)
const;
75 std::vector<std::string> allVariations(
const State& previous,
const std::vector<std::string>& allEffectors)
const;
81 std::vector<std::string> fixedContacts(
const State& previous)
const;
86 void contactCreations(
const State& previous, std::vector<std::string>& outList)
const;
91 std::vector<std::string> contactCreations(
const State& previous)
const;
96 std::vector<std::string> contactBreaks(
const State& previous)
const;
101 void contactBreaks(
const State& previous, std::vector<std::string>& outList)
const;
104 void print(std::stringstream& ss)
const;
105 void print(std::stringstream& ss,
const State& previous)
const;
106 void printInternal(std::stringstream& ss)
const;
128 template<
typename Iter>
131 std::vector<std::string> res;
132 for(Iter it = start; it != end; ++it)
134 const std::string& eff = *it;
135 std::map<std::string, bool>::const_iterator cit = state.
contacts_.find(eff);
136 if(cit == state.
contacts_.end() || !cit->second)
146 #endif // HPP_RBPRM_STATE_HH