Statistics
| Branch: | Revision:

scoutos / scout / libscout / src / behaviors / WH_Robot.h @ d140fd71

History | View | Annotate | Download (986 Bytes)

1
#ifndef _WH_ROBOT_
2
#define _WH_ROBOT_
3

    
4
#define DEFAULT_TASK NULL
5
#define TASK_COMPLETED 0
6
#define TASK_FAILED -1
7

    
8
#include "line_follow.h"
9
#include "../Behavior.h"
10
#include "navigationMap.h"
11
#include "../helper_classes/Order.h"
12
#include <assert.h>
13
#include <stdlib.h>
14

    
15
class WH_Robot : line_follow{
16
        std::string name;
17
        int id;
18

    
19
        int reg_failed;
20

    
21
        Order* curr_task;
22
        navigationMap* nav_map;
23

    
24
        Duration get_worst_case_time(State start_state, State target_state);
25
        int exec_task();
26

    
27
        void robot_callback(const std_msgs::String::ConstPtr& msg);
28

    
29
        void go_home(int x);
30
        void leave_home();
31

    
32
    public:
33
        WH_Robot(std::string scoutname, Sensors* sensors);
34
        ~WH_Robot();
35
        void run();
36

    
37
        void set_task(Order order);
38
        void follow_path(Path path_to_follow);
39

    
40
        ros::Publisher robot_to_sched;
41
        ros::Subscriber sched_to_robot;
42
};
43

    
44
#endif