-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobot.h
59 lines (49 loc) · 1.26 KB
/
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
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
#ifndef ROBOT_H
#define ROBOT_H
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <Aria.h>
#define GirarBase 1
#define ConexaoSerial 1
#define ConexaoRadio 2
#define ConexaoSimulacao 3
using namespace std;
class Robot{
public:
ArRobot robot;
ArSonarDevice sonarDev;
ArSick sick;
ArLaserConnector *laserConnector;
ArRobotConnector *robotConnector;
ArArgumentParser *parser;
ArSimpleConnector *simpleConnector;
ArAnalogGyro *gyro;
ArSerialConnection con1;
int Sensores[8];
Robot();
void destroy();
void desconectar();
void pararMovimento();
void readSensores();
int getSonar(int i);
int isConnected();
void headg();
float getXPos();
float getYPos();
float getAngBase();
void initMov();
void getAllSonar(int *sensores);
void Move(double vl,double vr);
void getLaser();
void Rotar(int sent);
void RT1 (int RT);
void espera(int time);
void escribir();
int sensors(int i);
void rotaciona(double degrees, int sentido);
};
#endif // ROBOT_H