⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 astar.h

📁 一个非常有用的客户端开发程序
💻 H
字号:
#ifndef ASTAR#define ASTAR#include "pp_point.h"#include "logger/src/logger.h"#include "priorityqueue.h"#include <list>#include <map>#include <vector>#define ENABLE_WAYPOINT_SMOOTHING 1const double _threshold=0.3;using namespace std;enum direction {n,e,w,s,nw,ne,se,sw,err};class AStar{   public:      AStar(int gridSize,double resolution);      ~AStar();      void setOccupancy(double** occ) {_occupancy=occ;}      list<PP_Point> findPlan(PP_Point start, PP_Point goal);      double heuristic(PP_Point node);      PP_Point** getClosedList();      list<PP_Point> getWayPoints(list<PP_Point> &path);      void setBumpList(list<PP_Point> bl){_bumpList=bl;}   private:      static direction getDirection(PP_Point curr, PP_Point next);   private:      PP_Point** _closedList;      PriorityQueue _priorityQueue;      double** _occupancy;      int _gridSize;      double _resolution;      PP_Point _start, _goal;	list<PP_Point> _bumpList;};#endif //  ASTAR/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg *     Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -