30 #ifndef VIGIR_FOOTSTEP_PLANNING_STATE_SPACE_H__ 31 #define VIGIR_FOOTSTEP_PLANNING_STATE_SPACE_H__ 35 #include <boost/thread/mutex.hpp> 37 #include <tr1/unordered_set> 38 #include <tr1/hashtable.h> 40 #include <sbpl/headers.h> 42 #include <vigir_footstep_planning_lib/modeling/footstep.h> 43 #include <vigir_footstep_planning_lib/modeling/planning_state.h> 55 size_t seed = std::tr1::hash<int>()(x.first);
56 return std::tr1::hash<int>()(x.second) + 0x9e3779b9 + (seed<<6) + (seed>>2);
68 return cost < other.
cost;
95 void setFrameId(
const std::string& frame_id);
97 std::pair<int, int> updateGoal(
const State& foot_left,
const State& foot_right);
98 std::pair<int, int> updateStart(
const State& foot_left,
const State& right_right);
99 void setPlannerStartAndGoal(
unsigned int start_foot_selection);
106 bool getState(
unsigned int id, State &s)
const;
108 bool getStartState(State &left, State &right)
const;
109 bool getStartState(State &robot)
const;
110 bool getGoalState(State &left, State &right)
const;
111 bool getGoalState(State &robot)
const;
115 return ivRandomStates.begin();
120 return ivRandomStates.end();
125 PlanningState* createNewHashEntry(
const State&
s);
134 PlanningState *createNewHashEntry(
const PlanningState& s);
137 PlanningState* getHashEntry(
const State& s);
143 PlanningState* getHashEntry(
const PlanningState& s);
145 PlanningState *createHashEntryIfNotExists(
const PlanningState& s);
151 bool closeToGoal(
const PlanningState& from)
const;
157 bool closeToStart(
const PlanningState& from)
const;
161 bool getStepCost(
const State& stand_foot,
const State& swing_foot_before,
const State& swing_foot_after,
double& cost,
double& risk)
const;
162 bool getStepCost(
const State& stand_foot,
const State& swing_foot_before,
const State& swing_foot_after,
int& cost,
int& risk)
const;
163 bool getStepCost(
const State& stand_foot,
const State& swing_foot_before,
const State& swing_foot_after,
int& cost)
const;