-
Notifications
You must be signed in to change notification settings - Fork 51
/
MotionCore.h
57 lines (44 loc) · 1.29 KB
/
MotionCore.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef MOTION_CORE_2H7QHCY7
#define MOTION_CORE_2H7QHCY7
#include <memory/Memory.h>
#include <memory/FrameInfoBlock.h>
#include <memory/WalkRequestBlock.h> // TEMPORARY TODO
#include <memory/Logger.h>
class KinematicsModule;
class MotionModule;
class SensorModule;
enum CoreType {
CORE_ROBOT,
CORE_SIM,
CORE_TOOL
};
class MotionCore {
public:
// DANIEL ADDED LAST PARAM
MotionCore(CoreType type, bool use_shared_memory, Memory& memory);
~MotionCore();
void move(float xvel, float yvel, float rotvel);
void move(WalkRequestBlock::ParamSet paramSet, float xvel, float yvel, float rotvel);
void processMotionFrame();
void processSensorUpdate();
void logMemory();
Memory memory_;
CoreType type_;
unsigned int last_frame_processed_;
KinematicsModule *kinematics_;
MotionModule *motion_;
SensorModule *sensor_;
#ifndef SWIG // Lua can't handle the file IO
Logger log_; //handling logging in vision for now
#endif
static MotionCore *inst_;
FrameInfoBlock *frame_info_;
WalkRequestBlock *walk_request_; // TEMPORARY TODO
double start_time_; // temporary
double fps_time_;
unsigned int fps_frames_processed_;
private:
void initMemory();
void initModules();
};
#endif /* end of include guard: CORE_2H7QHCY7 */