planner.h
Go to the documentation of this file.
00001 #ifndef __PLANNER__
00002 #define __PLANNER__
00003 
00004 //#include "PathPlanning.h"
00005 
00006 #define INT_SEC_NUM 8
00007 
00008 
00009 typedef struct TD_node *WayPointPtr; 
00010 typedef struct TD_link *LinkPtr; 
00011 typedef struct TD_path *PathMapPtr; 
00012 
00013 typedef struct TD_path{
00014   WayPointPtr first_node;
00015   WayPointPtr last_node;
00016 
00017   double start_x;
00018   double start_y;
00019   WayPointPtr start_node;
00020 
00021   double goal_x;
00022   double goal_y;
00023   WayPointPtr goal_node;
00024 
00025   int node_num;
00026   int link_num;
00027 }PathMap;
00028 
00029 typedef struct TD_node{
00030   double x;
00031   double y;
00032   int    flag;
00033   double cost;
00034   
00035   int     link_num;
00036   LinkPtr links[INT_SEC_NUM];
00037   WayPointPtr from;
00038   WayPointPtr next;
00039 }WayPoint;
00040 
00041 typedef struct TD_link{
00042   double cost;
00043   double length;
00044   double color;
00045   double width;
00046   double maxspeed;
00047 
00048   WayPointPtr node1;
00049   WayPointPtr node2;
00050 }Link;
00051 
00052 typedef struct TD_queue_list *QueueListPtr,**QueueListHandle;
00053 typedef struct TD_queue_list{
00054   WayPointPtr node;
00055   QueueListPtr next;
00056 }QueueList;
00057 
00058 
00059 PathMapPtr make_path(void);
00060 void delete_path(PathMapPtr a_path);
00061 
00062 void print_path_info(PathMapPtr a_path);
00063 
00064 WayPointPtr make_node(PathMapPtr a_path, double x, double y);
00065 int delete_node(PathMapPtr a_path, WayPointPtr a_node);
00066 WayPointPtr nth_node(PathMapPtr a_path,int n);
00067 
00068 LinkPtr make_link(PathMapPtr a_path, WayPointPtr node1, WayPointPtr node2, double cost);
00069 int delete_link(PathMapPtr a_path, LinkPtr a_link);
00070 
00071 int load_path_file(const char *file_name, PathMapPtr a_path);
00072 /*search nearest node (brute force search)*/
00073 WayPointPtr search_nearest_node(PathMapPtr a_path, double x, double y);
00074 LinkPtr search_nearest_link(PathMapPtr a_path, double x, double y);
00075 /*input current position*/
00076 void set_start_position(PathMapPtr a_path, double x, double y);
00077 /*input target  position*/
00078 void set_goal_position(PathMapPtr a_path, double x, double y);
00079 WayPointPtr next_queue(QueueListHandle a_queue);
00080 /*a_queueの後ろにキューをつくる*/
00081 QueueListPtr add_queue(QueueListHandle first_queue, WayPointPtr a_node);
00082 /*solve*/
00083 PathMapPtr solve_minimum_path(PathMapPtr a_path);
00084 void write_path(FILE *a_file, PathMapPtr a_path);
00085 //void path2pathseq(PathMapPtr a_path, PathSeq *out_path);
00086 void draw_path(PathMapPtr a_path,PathMapPtr min_path);
00087 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49