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;
126 template <
typename Iter>
128 std::vector<std::string> res;
129 for (Iter it = start; it != end; ++it) {
130 const std::string& eff = *it;
131 std::map<std::string, bool>::const_iterator cit = state.
contacts_.find(eff);
132 if (cit == state.
contacts_.end() || !cit->second) {
141 #endif // HPP_RBPRM_STATE_HH