-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixed_planner.h
More file actions
75 lines (55 loc) · 1.18 KB
/
fixed_planner.h
File metadata and controls
75 lines (55 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* @file fixed_planner.h
*
* declaration of fixed planner class.
*
* @author Adrien Perkins <adrienp@stanford.edu>
*/
#ifndef _FIXED_PLANNER_H_
#define _FIXED_PLANNER_H_
#include <string>
#include "planner.h"
/**
* @class FixedPlanner
*
* A "planner" that cycles through a set of commands.
* Commands used are in the file that is passed into it.
*
*/
class FixedPlanner : public Planner {
public:
/**
* constructor
* @param command_file_name the path to the command file.
*/
FixedPlanner(std::string logfile_dir, const char * command_file_name);
/**
* desctructor
*/
~FixedPlanner();
/**
* load in all the commands from file.
* @return true if successfully initialized
*/
int initialize();
/**
* return the next command.
* @return the command
*/
vector<float> action();
private:
// the file containing all the commands
const char * _command_file_name;
// the logfile to write things to
FILE *_logfile;
// the commands themselves
vector<float> _cmd_north;
vector<float> _cmd_east;
vector<float> _cmd_yaw;
vector<float> _cmd_alt;
// file details
int _num_cmds;
// index param
int _cmd_index;
};
#endif /* _FIXED_PLANNER_H_ */