Project

General

Profile

Statistics
| Branch: | Revision:

root / scout / libscout / src / behaviors / WH_Robot.h @ da08d580

History | View | Annotate | Download (908 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 1905324e Priya
#include "line_follow.h"
9 9b4328d7 Priya
#include "../Behavior.h"
10
#include "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 bebd9bcb Leon
    public:
30 3f72678f Priya
        WH_Robot(std::string scoutname);
31 9b4328d7 Priya
        ~WH_Robot();
32 bebd9bcb Leon
        void run();
33 9b4328d7 Priya
34
        void set_task(Order order);
35 d37cfc69 Leon
        void follow_path(Path path_to_follow);
36 9b4328d7 Priya
37 3f72678f Priya
        ros::Publisher robot_to_sched;
38
        ros::Subscriber sched_to_robot;
39 bebd9bcb Leon
};
40
41
#endif