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 #ifndef FOOTSTEP_PLANNER_HEURISTIC_H_
00022 #define FOOTSTEP_PLANNER_HEURISTIC_H_
00023
00024 #include <footstep_planner/helper.h>
00025 #include <footstep_planner/PlanningState.h>
00026
00027
00028 namespace footstep_planner
00029 {
00034 class Heuristic
00035 {
00036 public:
00037 enum HeuristicType { EUCLIDEAN=0, EUCLIDEAN_STEPCOST=1, PATH_COST=2 };
00038
00039 Heuristic(double cell_size, int num_angle_bins, HeuristicType type);
00040 virtual ~Heuristic();
00041
00047 virtual double getHValue(const PlanningState& from,
00048 const PlanningState& to) const = 0;
00049
00050 HeuristicType getHeuristicType() const { return ivHeuristicType; };
00051
00052 protected:
00053 double ivCellSize;
00054 int ivNumAngleBins;
00055
00056 const HeuristicType ivHeuristicType;
00057 };
00058
00059
00064 class EuclideanHeuristic : public Heuristic
00065 {
00066 public:
00067 EuclideanHeuristic(double cell_size, int num_angle_bins);
00068 virtual ~EuclideanHeuristic();
00069
00070 virtual double getHValue(const PlanningState& from,
00071 const PlanningState& to) const;
00072 };
00073
00074
00082 class EuclStepCostHeuristic : public Heuristic
00083 {
00084
00085 public:
00086 EuclStepCostHeuristic(double cell_size, int num_angle_bins,
00087 double step_cost, double diff_angle_cost,
00088 double max_step_width);
00089 virtual ~EuclStepCostHeuristic();
00090
00091 virtual double getHValue(const PlanningState& from,
00092 const PlanningState& to) const;
00093
00094 private:
00095 const double ivStepCost;
00096 const double ivDiffAngleCost;
00097
00099 const double ivMaxStepWidth;
00100 };
00101 }
00102 #endif // FOOTSTEP_PLANNER_HEURISTIC_H_