]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robodim/robodim.h
dim: Fix odo wheel radius
[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) 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  *
18  * ROBOT DIMENSIONS 
19  *                                   S0
20  *       S4 +--------------------------+ S2
21  *        ^ |   |     |                |--,
22  *     ^  | |   -------    ABE         |   |
23  *   RR|  | |      :<--------------------->|
24  *     v  | |      :             __    |--' 
25  *       W| |      + Center  (L)|__|   |    
26  *        | |  AB  :       AF    HOK   |--,
27  *        | |<---->:<----------------->|   |
28  *        | |   -------                |   |
29  *        v |   |     |                |--' 
30  *       S5 +--------------------------+ S3
31  *                 <-->              S1
32  *                  WR
33  * 
34  * Sx - Sharp sensor
35  */
36
37 /* FIXME update robot's dimensions!!! */
38 #define ROBOT_WIDTH_MM 290      /* W*/
39 #define ROBOT_WIDTH_M (ROBOT_WIDTH_MM/1000.0)
40 #define ROBOT_ROTATION_RADIUS_MM ((188)/2) /* RR */
41 #define ROBOT_ROTATION_RADIUS_M (ROBOT_ROTATION_RADIUS_MM/1000.0)
42 #define LASER_CENTER_OFFSET_MM 50 /*FIXME*/ /* Distance of the laser from rotation axis (Center to L) */
43 #define LASER_CENTER_OFFSET_M (LASER_CENTER_OFFSET_MM/1000.0)
44 #define ROBOT_WHEEL_RADIUS_MM 38 /* WR */
45 #define ROBOT_WHEEL_RADIUS_M (ROBOT_WHEEL_RADIUS_MM/1000.0)
46 #define ROBOT_AXIS_TO_BACK_MM 75 /* AB */
47 #define ROBOT_AXIS_TO_BACK_M (ROBOT_AXIS_TO_BACK_MM/1000.0)
48 #define ROBOT_AXIS_TO_FRONT_MM 183 /* AF */
49 #define ROBOT_AXIS_TO_FRONT_M (ROBOT_AXIS_TO_FRONT_MM/1000.0)
50 #define ROBOT_AXIS_TO_BRUSH_MM 280 /* ABE */
51 #define ROBOT_AXIS_TO_BRUSH_M (ROBOT_AXIS_TO_BRUSH_MM/1000.0)
52 #define HOKUYO_CENTER_OFFSET_MM 170
53 #define HOKUYO_CENTER_OFFSET_M  (HOKUYO_CENTER_OFFSET_MM/1000.0)
54 #define ODOMETRY_WHEEL_RADIUS_MM 30
55 #define ODOMETRY_WHEEL_RADIUS_M (ODOMETRY_WHEEL_RADIUS_MM/1000.0)
56 #define ODOMETRY_ROTATION_RADIUS_MM (245/2)
57 #define ODOMETRY_ROTATION_RADIUS_M (ODOMETRY_ROTATION_RADIUS_MM/1000.0)
58
59 /**
60  * PLAYGROUND DIMENSIONS
61  * 
62  *            S2                                                                  R3
63  *            +---------------------------------+---------------------------------+
64  *        ^   |                                                              [W,H]|
65  *        |   |                                                                   |
66  *        |   |                                                                   |
67  *        |   |                                                                   |
68  *        |   |                                                                   |
69  *        |   |                                                                   |
70  *        |   |                                                                   |
71  *        |   |                                                                   |
72  *      H | R1|                                                                   |S1
73  *        |   |                                                                   |
74  *        |   |                                                                   |
75  *        |   |                                                                   |
76  *        |   |                                                                   |
77  *        |   |                                                                   |
78  *        |   |                                                                   |
79  *        |   |                                                                   |
80  *        v   |[0,0]                                                              |
81  *            +---------------------------------+---------------------------------+
82  *            S3                                                                  R2
83  *             <----------------------------------------------------------------->
84  *                                              W
85  */
86 #define PLAYGROUND_WIDTH_MM     3000
87 #define PLAYGROUND_WIDTH_M      (PLAYGROUND_WIDTH_MM/1000.0)
88 #define PLAYGROUND_HEIGHT_MM    2100
89 #define PLAYGROUND_HEIGHT_M     (PLAYGROUND_HEIGHT_MM/1000.0)
90
91 /*
92  * 3 ultrasonic beacons
93  */
94 #define BEACON_WIDTH            0.08
95 #define BEACON_HEIGHT           BEACON_WIDTH
96
97 #define BEACON_GREEN            0
98 #define BEACON_RED              1
99 #define BEACON_CNT              3
100
101 struct beacon_pos {
102         float x, y;
103 };
104
105 extern const struct beacon_pos beacon_green[BEACON_CNT];
106 extern const struct beacon_pos beacon_red[BEACON_CNT];
107
108 /*
109  * Position of Shapr sensors on the robot with respect to the robot center
110  * (not used in EB2009)
111  */
112 struct sharp_pos {
113         float x, y, ang;
114 };
115
116 #define SHARP_COUNT 0  /* no sharp sensors in EB2009, I hope */
117
118 #endif /* ROBODIM_EB2008_H */