Statistics
| Branch: | Revision:

root / scout / libscout / src / test_behaviors / WH_Robot.h @ 6350051e

History | View | Annotate | Download (1012 Bytes)

1 bebd9bcb Leon
#ifndef _WH_ROBOT_
2
#define _WH_ROBOT_
3
4 6761a531 Priya
#define DEFAULT_TASK NULL
5 9b4328d7 Priya
#define TASK_COMPLETED 0
6
#define TASK_FAILED -1
7 bebd9bcb Leon
8 6350051e Alex
#include "../behaviors/line_follow.h"
9 9b4328d7 Priya
#include "../Behavior.h"
10 6350051e Alex
#include "../behaviors/navigationMap.h"
11 bebd9bcb Leon
#include "../helper_classes/Order.h"
12 9b4328d7 Priya
#include <assert.h>
13
#include <stdlib.h>
14 bebd9bcb Leon
15 1905324e Priya
class WH_Robot : line_follow{
16 3f72678f Priya
        std::string name;
17
        int id;
18
19
        int reg_failed;
20 bebd9bcb Leon
21 9b4328d7 Priya
        Order* curr_task;
22 6761a531 Priya
        navigationMap* nav_map;
23 bebd9bcb Leon
24 92d4adda Priya
        Duration get_worst_case_time(State start_state, State target_state);
25 9b4328d7 Priya
        int exec_task();
26 bebd9bcb Leon
27 7ac5e9bc Priya
        void robot_callback(const std_msgs::String::ConstPtr& msg);
28 3f72678f Priya
29 11aa087a Priya
        void go_home(int x);
30
        void leave_home();
31
32 bebd9bcb Leon
    public:
33 d140fd71 Yuyang
        WH_Robot(std::string scoutname, Sensors* sensors);
34 9b4328d7 Priya
        ~WH_Robot();
35 bebd9bcb Leon
        void run();
36 9b4328d7 Priya
37
        void set_task(Order order);
38 d37cfc69 Leon
        void follow_path(Path path_to_follow);
39 9b4328d7 Priya
40 3f72678f Priya
        ros::Publisher robot_to_sched;
41
        ros::Subscriber sched_to_robot;
42 bebd9bcb Leon
};
43
44
#endif