Project

General

Profile

Revision 1342

sort of works, does the 45 line correctly.

View differences:

internals.h
6 6
#define RS 2
7 7
#define RD 3
8 8

  
9
#define LEFT 0
10
#define RIGHT 1
11

  
9 12
#define FORWARD 1
10 13
#define BACKWARD 0
11 14
#define SENDER 1
12 15
#define RECEIVER 0
13 16

  
14 17
#define INFINITE -1
15
#define L 10.0
18
#define L 13.5
16 19

  
17
#define DT .1
20
#define DT .102
18 21

  
19
#define DIST(x1, y1, x2, y2)    (sqrt(pow(((x1)-(x2)), 2) + pow(((y1)-(y2)), 2)))
20
#define LOOK_AHEAD              1
21
#define LOOK_AHEAD_ERR_THRES    0.05
22
#define VELOCITY                1
22
#define DIST(x1, y1, x2, y2)    (sqrt(((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2))))
23
#define LOOK_AHEAD              30
24
#define LOOK_AHEAD_ERR_THRES    5
25
#define VELOCITY                20
23 26

  
24 27
typedef struct state
25 28
{
......
27 30
	double y;
28 31
	double theta;
29 32

  
30
	short vl;
31
	short vr;
33
	double vl;
34
	double vr;
32 35
	
33
	int vl_ref;
34
	int vr_ref;
36
	double vl_ref;
37
	double vr_ref;
35 38
} state;
36 39

  
37 40
typedef struct {
......
45 48

  
46 49
void setAttriv(int file);
47 50

  
48
void pos_control_curv(curv_t *ref, int len);
51
void pos_control_curve(curv_t *ref, int len);
49 52

  
50 53
void velocityControl(double*, double*);
51 54
 

Also available in: Unified diff