-
Notifications
You must be signed in to change notification settings - Fork 0
/
explorer.h
42 lines (32 loc) · 1.01 KB
/
explorer.h
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
#ifndef __EXPLORER_H__
#define __EXPLORER_H__
#include "singleton.h"
#include "metric_map.h"
#include "motion_planner.h"
namespace HybNav {
class ExplorerException : public std::runtime_error {
public:
enum ExceptionCode { END, FAIL };
ExplorerException(ExceptionCode code, const std::string& reason = std::string());
virtual ~ExplorerException(void) throw() { }
ExceptionCode code;
};
class Explorer : public Singleton<Explorer> {
public:
OccupancyGrid* current_grid;
Explorer(void);
void update(void);
void compute_motion(PlayerCc::Position2dProxy& position_proxy);
/* finite state machine */
enum State { ExploringLocally, ExploringGlobally };
State state;
void start(State state);
void fsm_advance(void);
void while_exploring_locally(void);
void start_exploring_globally(void);
void while_exploring_globally(void);
bool recompute_local_path(void);
void recompute_path(void);
};
}
#endif