-
Notifications
You must be signed in to change notification settings - Fork 3
/
navigation.h
72 lines (61 loc) · 1.68 KB
/
navigation.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
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef NAVIGATION_H
#define NAVIGATION_H
#include <QThread>
#include <QMutex>
#include <vector>
#include "robot.h" //Robot class
#include "utils.h" //Utils library
#define pi 3.1415
class Navigation : public QThread
{
Q_OBJECT
protected:
static const int dx = 5;
static const int dy = 5;
int i;
double orientation;
double e;
QMutex mutex;
dMatrix pGrid;
dMatrix tGrid;
bool stop, grid_initialized, flag_finish_navegation;
void msleep(int ms);
void run();
public:
Navigation();
double iterator_cph();
double iterator_cpo();
double get_neighborhood(int, int, int);
void set_potential(int, int, double);
double get_potential(int, int);
int get_occupancy(int, int);
void set_grid_orientation(Point);
void set_direction(Point2d,Point2d);
double get_direction(Point);
void init_grid();
void print_grid();
void set_enemy_pos(p2dVector);
void set_team_pos(p2dVector);
void set_ball_vel(pair<double, double>);
void set_def_area(pVector);
void set_centroid_atk(Point2d);
void set_centroid_def(Point2d);
Point convert_C_to_G(Point2d); // colocar na utils
void set_epsilon(double);
void set_orientation(double);
bool get_flag_finish();
void zera_flag_finish();
void Play();
bool is_running();
void Stop();
bool isStopped() const;
~Navigation();
void univector_field(Robot*, Point2d, Point2d);
float repulsive_angle(float, float, Point2d);
float hyperbolic_spiral(float, float, Point2d);
float Gaussian_Func(float);
void set_thetaDir(float);
float get_direction_CPU();
float theta_dir,the_fih,phi,g_size;
};
#endif // NAVIGATION_H