-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRobot.h
34 lines (27 loc) · 783 Bytes
/
Robot.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
#ifndef ROBOT_H_
#define ROBOT_H_
#include "AbstractLogObject.h"
#include "Leg.h"
class Robot : public AbstractLogObject
{
public:
Robot(std::string const& name);
// Reimplement virtual methods.
virtual void compute(int const timeMs);
virtual void getCurrentValues(std::vector<int>& values);
virtual ~Robot();
private:
static int const MAX_VOLTAGE = 12000;
// Some internal variables to so that we have something to log.
int batteryLevel_;
int positionX_;
int positionY_;
// Complex objects that are also derived from AbstractLogObject.
Leg leftLeg_;
Leg rightLeg_;
// computation of each internal variables
void computePositionY(int const timeMs);
void computePositionX(int const timeMs);
void computeBatteryLevel(int const timeMs);
};
#endif /* ROBOT_H_ */