traceback.h 824 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _TRACEBACK_H
  2. #define _TRACEBACK_H
  3. #include<vector>
  4. #include<global_planner/potential_calculator.h>
  5. namespace global_planner {
  6. class Traceback {
  7. public:
  8. Traceback(){}
  9. virtual bool getPath(float* potential, double start_x, double start_y, double end_x, double end_y, std::vector<std::pair<float, float> >& path) = 0;
  10. virtual void setSize(int xs, int ys)
  11. {
  12. xs_ = xs;
  13. ys_ = ys;
  14. }
  15. inline int getIndex(int x, int y)
  16. {
  17. return x + y * xs_;
  18. }
  19. void setLethalCost(unsigned char lethal_cost)
  20. {
  21. lethal_cost_ = lethal_cost;
  22. }
  23. protected:
  24. int xs_, ys_;
  25. unsigned char lethal_cost_;
  26. //PotentialCalculator* p_calc_;
  27. };
  28. } //end namespace global_planner
  29. #endif