-
Notifications
You must be signed in to change notification settings - Fork 2
/
Laser.h
57 lines (40 loc) · 836 Bytes
/
Laser.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
/*
* Laser.h
*
* Created on: May 27, 2014
* Author: user
*/
#ifndef LASER_H_
#define LASER_H_
#include <math.h>
#include <libplayerc++/playerc++.h>
#include "Point.h"
#include "Configuration.h"
#include "Robot.h"
#include "MathHelper.h"
#include "Map.h"
#include <vector>
using namespace PlayerCc;
using namespace std;
class Robot;
class Map;
class Laser
{
private:
LaserProxy& _laserProxy;
double convertIndexToDegree(int index) const;
int convertDegreeToIndex(double degree) const;
public:
Laser(LaserProxy& laserProxy) : _laserProxy(laserProxy)
{
}
void getObstacles(double x, double y, double yaw, vector<Point>& obstacles) const;
bool canRotate() const;
bool canMoveForward() const;
double GetRightRank() const;
double GetLeftRank() const;
virtual ~Laser()
{
}
};
#endif /* LASER_H_ */