astar.h 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * space_server 任务A星规划。
  3. *
  4. * © 2020 成都河狸智能科技有限责任公司。保留所有权利。
  5. *
  6. * 作者: zhq1229
  7. */
  8. #ifndef __ASTAR_H__
  9. #define __ASTAR_H__
  10. #include "task/path.h"
  11. namespace task {
  12. namespace astar {
  13. enum AstartCode {
  14. ASTART_SUCCEED = 0,
  15. ASTART_SAME_POS,
  16. ASTART_ILLEGAL_SATRT,
  17. ASTART_ILLEGAL_END,
  18. ASTART_START_NOT_FOUND,
  19. ASTART_END_NOT_FOUND,
  20. ASTART_UNREACHABLE,
  21. };
  22. bool plan(
  23. task::path::Paths &path, PointId start,
  24. PointId end, task::path::Paths &plan);
  25. bool plan(
  26. task::path::Paths &path, PointId start,
  27. PointId end, task::path::Paths &plan, AstartCode &code);
  28. bool plan(
  29. task::path::Paths &path, task::path::PathPointPtr start,
  30. task::path::PathPointPtr end, task::path::Paths &plan);
  31. bool plan(
  32. task::path::Paths &path, task::path::PathPointPtr start,
  33. task::path::PathPointPtr end, task::path::Paths &plan, AstartCode &code);
  34. } // namespace astar
  35. } // namespace task
  36. #endif // __ASTAR_H__