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 #ifndef FOOTSTEP_PLANNER_HEURISTIC_H_
00025 #define FOOTSTEP_PLANNER_HEURISTIC_H_
00026
00027 #include <footstep_planner/helper.h>
00028 #include <footstep_planner/PlanningState.h>
00029
00030
00031 namespace footstep_planner
00032 {
00037 class Heuristic
00038 {
00039 public:
00040 enum HeuristicType { EUCLIDEAN=0, EUCLIDEAN_STEPCOST=1, PATH_COST=2 };
00041
00042 Heuristic(double cell_size, int num_angle_bins, HeuristicType type);
00043 virtual ~Heuristic();
00044
00050 virtual double getHValue(const PlanningState& from,
00051 const PlanningState& to) const = 0;
00052
00053 HeuristicType getHeuristicType() const { return ivHeuristicType; };
00054
00055 protected:
00056 double ivCellSize;
00057 int ivNumAngleBins;
00058
00059 const HeuristicType ivHeuristicType;
00060 };
00061
00062
00067 class EuclideanHeuristic : public Heuristic
00068 {
00069 public:
00070 EuclideanHeuristic(double cell_size, int num_angle_bins);
00071 virtual ~EuclideanHeuristic();
00072
00073 virtual double getHValue(const PlanningState& from,
00074 const PlanningState& to) const;
00075 };
00076
00077
00085 class EuclStepCostHeuristic : public Heuristic
00086 {
00087
00088 public:
00089 EuclStepCostHeuristic(double cell_size, int num_angle_bins,
00090 double step_cost, double diff_angle_cost,
00091 double max_step_width);
00092 virtual ~EuclStepCostHeuristic();
00093
00094 virtual double getHValue(const PlanningState& from,
00095 const PlanningState& to) const;
00096
00097 private:
00098 const double ivStepCost;
00099 const double ivDiffAngleCost;
00100
00102 const double ivMaxStepWidth;
00103 };
00104 }
00105 #endif // FOOTSTEP_PLANNER_HEURISTIC_H_