]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robodim/robodim.h
Merge branch 'master' of vokacmic@rtime.felk.cvut.cz:/var/git/eurobot
[eurobot/public.git] / src / robodim / robodim.h
1 /*
2  * robodim_eb2010.h
3  *
4  * Dimensions for the robot, playground and other stuff.
5  * Eurobot 2010
6  *
7  * Copyright: (c) 2008 - 2010 CTU Dragons
8  *            CTU FEE - Department of Control Engineering
9  * License: GNU GPL v.2
10  */
11
12 #ifndef ROBODIM_EB2010_H
13 #define ROBODIM_EB2010_H
14
15 /**
16  * FIXME: update robot's dimensions !!!
17  *        and update the pitcture
18  *
19  * ROBOT DIMENSIONS 
20  *
21  *        ^ +--------------------------+
22  *        | |   |     |                |
23  *     ^  | |   -------                |
24  *   RR|  | |      :                   |
25  *     v  | |      :             __    |
26  *       W| |      + Center     |__|   |
27  *        | |  AB  :       AF    HOK   |
28  *        | |<---->:<----------------->|
29  *        | |   -------                |
30  *        | |   |     |                |
31  *        v +--------------------------+
32  *                 <-->
33  *                  WR
34  * 
35  * Sx - Sharp sensor
36  */
37
38 /* FIXME update robot's dimensions!!! */
39 #define ROBOT_WIDTH_MM 280      /* W*/
40 #define ROBOT_WIDTH_M (ROBOT_WIDTH_MM/1000.0)
41 #define ROBOT_ROTATION_RADIUS_MM ((188)/2) /* RR */
42 #define ROBOT_ROTATION_RADIUS_M (ROBOT_ROTATION_RADIUS_MM/1000.0)
43 #define ROBOT_WHEEL_RADIUS_MM 38 /* WR */ // FIXME!! (this doesn't seem right to me .. Filip)
44 #define ROBOT_WHEEL_RADIUS_M (ROBOT_WHEEL_RADIUS_MM/1000.0)
45 #define ROBOT_AXIS_TO_BACK_MM 220 /* AB */
46 #define ROBOT_AXIS_TO_BACK_M (ROBOT_AXIS_TO_BACK_MM/1000.0)
47 #define ROBOT_AXIS_TO_FRONT_MM 85 /* AF */
48 #define ROBOT_AXIS_TO_FRONT_M (ROBOT_AXIS_TO_FRONT_MM/1000.0)
49 #define ROBOT_AXIS_TO_BRUSH_MM 50 /* ABE */ // FIXME: update the value and rename (no brushes)
50 #define ROBOT_AXIS_TO_BRUSH_M (ROBOT_AXIS_TO_BRUSH_MM/1000.0)
51 #define HOKUYO_CENTER_OFFSET_MM 35 // FIXME
52 #define HOKUYO_CENTER_OFFSET_M  (HOKUYO_CENTER_OFFSET_MM/1000.0)
53 #define ODOMETRY_WHEEL_RADIUS_MM 30
54 #define ODOMETRY_WHEEL_RADIUS_M (ODOMETRY_WHEEL_RADIUS_MM/1000.0)
55 #define ODOMETRY_ROTATION_RADIUS_MM (246/2)
56 #define ODOMETRY_ROTATION_RADIUS_M (ODOMETRY_ROTATION_RADIUS_MM/1000.0)
57
58 /**
59  * PLAYGROUND DIMENSIONS
60  * 
61  *            S2                                                                  R3
62  *            +---------------------------------+---------------------------------+
63  *        ^   |               |                                              [W,H]|
64  *        |   |    SL_T_R     |                                                   |
65  *        |   |<------------->|                                                   |
66  *        |   |               |                                                   |
67  *        |   |                                                                   |
68  *        |   |                                                                   |
69  *        |   |                                                                   |
70  *        |   |                                                                   |
71  *      H | R1|                                                                   |S1
72  *        |   |                                                                   |
73  *        |   |                                                                   |
74  *        |   |                                                                   |
75  *        |   |                                                                   |
76  *        |   |                                                                   |
77  *        |   |                                                                   |
78  *        |   |                                                                   |
79  *        v   |[0,0]                                                              |
80  *            +---------------------------------+---------------------------------+
81  *            S3                                                                  R2
82  *             <----------------------------------------------------------------->
83  *                                              W
84  */
85 #define PLAYGROUND_WIDTH_MM     3000
86 #define PLAYGROUND_WIDTH_M      (PLAYGROUND_WIDTH_MM/1000.0)
87 #define PLAYGROUND_HEIGHT_MM    2100
88 #define PLAYGROUND_HEIGHT_M     (PLAYGROUND_HEIGHT_MM/1000.0)
89
90 #define SLOPE_TO_RIM_MM         740
91 #define SLOPE_TO_RIM_M          (SLOPE_TO_RIM_MM/1000.0)
92 #define SLOPE_LENGTH_MM         519.23
93 #define SLOPE_LENGTH_M          (SLOPE_LENGTH_MM/1000.0)
94
95 #define CORN_DIAMETER_MM        50
96 #define CORN_DIAMETER_M         (CORN_DIAMETER_MM/1000.0)
97 #define CORN_RADIUS_MM          (50/2)
98 #define CORN_RADIUS_M           (CORN_RADIUS_MM/1000.0)
99
100 #define CORN_NEIGHBOURHOOD_RADIUS_MM    220
101 #define CORN_NEIGHBOURHOOD_RADIUS_M     (CORN_NEIGHBOURHOOD_RADIUS_MM/1000.0)
102 /*
103  * 3 ultrasonic beacons
104  */
105 #define BEACON_WIDTH            0.08
106 #define BEACON_HEIGHT           BEACON_WIDTH
107
108 #define BEACON_GREEN            0
109 #define BEACON_RED              1
110 #define BEACON_CNT              3
111
112 struct beacon_pos {
113         float x, y;
114 };
115
116 extern const struct beacon_pos beacon_green[BEACON_CNT];
117 extern const struct beacon_pos beacon_red[BEACON_CNT];
118
119 /*
120  * Position of Shapr sensors on the robot with respect to the robot center
121  * (not used in EB2009)
122  */
123 struct sharp_pos {
124         float x, y, ang;
125 };
126
127 #define SHARP_COUNT 0  /* no sharp sensors in EB2009, I hope */
128
129 #endif /* ROBODIM_EB2008_H */