Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef FOOTSTEP_PLANNER_FOOTSTEP_H_
00028 #define FOOTSTEP_PLANNER_FOOTSTEP_H_
00029
00030 #include <vigir_footstep_planning_lib/modeling/planning_state.h>
00031
00032
00033
00034 namespace vigir_footstep_planning
00035 {
00044 class Footstep
00045 {
00046 public:
00061 Footstep(double x, double y, double theta, double step_cost, double cell_size, int num_angle_bins, int max_hash_size);
00062 ~Footstep();
00063
00072 PlanningState performMeOnThisState(const PlanningState& current) const;
00073
00082 PlanningState reverseMeOnThisState(const PlanningState& current) const;
00083
00084 double getStepCost() const { return ivStepCost; }
00085
00086 private:
00088 typedef std::pair<int, int> footstep_xy;
00089
00091 void init(double x, double y);
00092
00110 int calculateForwardStep(Leg leg, int global_theta, double x, double y, int* footstep_x, int* footstep_y) const;
00111
00113 double ivCellSize;
00115 int ivNumAngleBins;
00116 double ivAngleBinSize;
00117
00119 int ivTheta;
00120
00121 double ivStepCost;
00122
00124 int ivMaxHashSize;
00125
00127 std::vector<footstep_xy> ivDiscSuccessorLeft;
00129 std::vector<footstep_xy> ivDiscSuccessorRight;
00131 std::vector<footstep_xy> ivDiscPredecessorLeft;
00133 std::vector<footstep_xy> ivDiscPredecessorRight;
00134 };
00135 }
00136
00137 #endif // FOOTSTEP_PLANNER_FOOTSTEP_H_