00001
00002
00003 #ifndef _MAPDEF_H_
00004 #define _MAPDEF_H_
00005
00006 namespace RobotFlow {
00007
00008 #define MAP_MAX_ROW 500
00009 #define MAP_MAX_COLUMN 500
00010 #define MAP_HEADER_SIZE 10
00011 #define NETWORK_MAP_HEADER_SIZE 12
00012
00013
00014 #define MAP_MAX_DISPLAY_ROW 150
00015 #define MAP_MAX_DISPLAY_COLUMN 150
00016
00017 #define SKIP_RAY_LASER 1 // the number of ray to skip when the map is converted
00018 #define MAX_LASER_RAY 361 // 180 degree * 2 (0,5 degree presision) + 1 [0,360]
00019 #define MAX_LASER_LENGTH 8191 // length max that the LSM can read (in mm)
00020
00021 #define MAP_ITEM_UNKNOWN 127 // It's the probability to have an obstacle
00022 #define MAP_ITEM_EMPTY 0 // 0 = 0 %
00023 #define MAP_ITEM_OBSTACLE 255 // 255 = 100 %
00024 #define MAP_MODIFICATION_FACTOR 30
00025
00026 #define ROBOT_WITH 45
00027 #define ROBOT_LENGTH 90
00028
00029
00030 typedef unsigned char BYTE;
00031
00032
00033
00034
00035
00036
00037 struct sPosition
00038 {
00039 int x;
00040 int y;
00041 int theta;
00042 };
00043
00044 struct sInputData
00045 {
00046 unsigned short nLaserData[MAX_LASER_RAY];
00047 sPosition sRobotPosition;
00048 };
00049
00050 }
00051
00052 #endif // _MAPDEF_H_