Revision 9b4328d7
ID | 9b4328d7dc719f032ff4f4f3aceddea007668964 |
Merged WH_Robots with other files
scout/libscout/src/behaviors/WH_Robot.h | ||
---|---|---|
1 | 1 |
#ifndef _WH_ROBOT_ |
2 | 2 |
#define _WH_ROBOT_ |
3 | 3 |
|
4 |
#include <cstdlib> |
|
5 |
#include <string> |
|
4 |
#define DEFAULT_TASK NULL; |
|
5 |
#define TASK_COMPLETED 0 |
|
6 |
#define TASK_FAILED -1 |
|
6 | 7 |
|
7 |
//#include "../Behavior.h" //TODO: make wh_robots into Behaviors
|
|
8 |
//#include "navigationMap.h"
|
|
9 |
#include "Scheduler.h" //TODO: uncomment once these are in the repo
|
|
8 |
#include "../Behavior.h"
|
|
9 |
#include "navigationMap.h" |
|
10 |
#include "Scheduler.h" |
|
10 | 11 |
#include "../helper_classes/Order.h" |
12 |
#include <assert.h> |
|
13 |
#include <stdlib.h> |
|
11 | 14 |
|
12 |
#define TASK_COMPLETED 0 |
|
13 |
#define TASK_FAILED -1 |
|
15 |
class WH_Robot : Behavior{ |
|
14 | 16 |
|
15 |
typedef double Time;
|
|
16 |
// a single number representing a node's number
|
|
17 |
typedef int State;
|
|
17 |
Order* curr_task;
|
|
18 |
navigationMap nav_map;
|
|
19 |
Scheduler scheduler;
|
|
18 | 20 |
|
19 |
class WH_Robot{ |
|
21 |
Time get_wc_time(State dest); |
|
22 |
int exec_task(); |
|
20 | 23 |
|
21 | 24 |
public: |
22 |
WH_Robot(); |
|
23 | 25 |
WH_Robot(std::string scoutname); |
26 |
~WH_Robot(); |
|
24 | 27 |
void run(); |
25 |
|
|
26 |
private: |
|
27 |
Time get_wc_time(State dest); |
|
28 |
Order wh_get_task(); |
|
29 |
int exec_task(); |
|
30 |
|
|
31 |
Order curr_task; |
|
32 |
//navigationMap nav_map; |
|
33 |
Scheduler schedule; |
|
28 |
|
|
29 |
void set_task(Order order); |
|
30 |
|
|
34 | 31 |
}; |
35 | 32 |
|
36 | 33 |
#endif |
Also available in: Unified diff