Project

General

Profile

Revision 58c19c15

ID58c19c15b13ea81473e724302b2c64e055aaac82
Parent afa9104d
Child da08d580, 11aa087a

Added by Priya almost 12 years ago

better warehouse image (corresponds with lines now) and demo. Now only thing left is to implement home behavior.

View differences:

scout/libscout/src/behaviors/navigationMap.h
47 47

  
48 48
/** Turn defintions */
49 49
#define ISTRAIGHT	0
50
#define ILEFT		1
50
#define ILEFT		  1
51 51
#define IRIGHT		2
52 52
#define IUTURN		3
53
#define ISPOTTURN 4
53 54

  
54 55
#define START_STATE 3
55 56

  
56 57
#define DEADEND 255
57 58
#define ARRAY_SIZE 3
58
#define MAX_NODES 12
59
#define MAX_NODES 16
59 60

  
60 61
#define SPEED 10 //distance_unit per s
61 62
#define DROPOFF_TIME 10 //seconds
......
64 65
#define WAIT_TIME (TURN_TIME * NUM_ROBOTS) //Seconds
65 66
 
66 67
/** used to extract information from an encoded Edge */
67
#define GET_EDGE_DIR(edge) ((edge)&0x3)
68
#define GET_EDGE_STATE(edge) (((edge)>>2)&0xFF)
69
#define GET_EDGE_DIST(edge) (((edge)>>10)&0x3FFFFF)
68
#define GET_EDGE_DIR(edge) ((edge)&0xF)
69
#define GET_EDGE_STATE(edge) (((edge)>>4)&0xFF)
70
#define GET_EDGE_DIST(edge) (((edge)>>12)&0xFFFFF)
70 71

  
71 72
/** used to change or build an Edge's information */
72
#define SET_EDGE_DIR(dir) ((dir)&0x3)
73
#define SET_EDGE_STATE(state) (((state)&0xFF)<<2)
74
#define SET_EDGE_DIST(dist) (((dist)&0x3FFFFF)<<10)
73
#define SET_EDGE_DIR(dir) ((dir)&0xF)
74
#define SET_EDGE_STATE(state) (((state)&0xFF)<<4)
75
#define SET_EDGE_DIST(dist) (((dist)&0xFFFFF)<<12)
75 76

  
76 77
#define MAKE_EDGE(dir, state, dist) \
77 78
  SET_EDGE_DIR(dir)+SET_EDGE_STATE(state)+SET_EDGE_DIST(dist)
......
102 103
   *      |           |          |         |
103 104
   *     9|         10|        11|       12|
104 105
   *      |           |          |         |
105
   *     ---         ---        ---       ---
106
   *     ---13       ---14      ---15     ---16
106 107
   */
107 108

  
108 109
  public:

Also available in: Unified diff