Project

General

Profile

Revision cc399ab3

IDcc399ab319f31b645b41e8adec17a4d2061166cf

Added by Priya about 12 years ago

added get_worst_case_time to nav maps

View differences:

scout/libscout/src/behaviors/navigationMap.h
56 56
#define DEADEND 255
57 57
#define ARRAY_SIZE 3
58 58
#define MAX_NODES 12
59

  
60
#define SPEED 10 //distance_unit per s
61
#define DROPOFF_TIME 10 //seconds
62
#define TURN_TIME 3 //Seconds
63
#define NUM_ROBOTS 2 
64
#define WAIT_TIME (TURN_TIME * NUM_ROBOTS) //Seconds
59 65
 
60 66
/** used to extract information from an encoded Edge */
61 67
#define GET_EDGE_DIR(edge) ((edge)&0x3)
......
72 78

  
73 79
/** an integer with a direction, an associated state, and distance
74 80
 *  encoded into its bits*/
75
typedef int Edge;
81
typedef unsigned int Edge;
76 82

  
77 83
/** a simple number representing the number of a node*/
78 84
typedef unsigned int State;
79 85

  
80 86
/** a number representing a type of turn, as defined above*/
81
typedef int Turn;
87
typedef unsigned int Turn;
82 88

  
83 89
/** a list of turns to follow a path */
84 90
typedef struct{
......
111 117
    /** returns the current state of the scout in the map*/
112 118
    State get_state();
113 119
    /** uses BFS to find the shortest path to a target State node */
120
    Path shortest_path(State start_state, State target_state);
114 121
    Path shortest_path(State target_state);
115 122

  
123
    /** returns the predicted worst case time it will take to travel from src to dest nodes */
124
    Duration get_worst_case_time(State start_state, State target_state);
125

  
116 126
  private:
117 127
    /** the dynamic array of edge arrays representing individual State nodes */
118 128
    std::vector <Edge*> map;

Also available in: Unified diff