]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robodim: corrected beacon coords, deleted sharp coords
authorMarek Peca <mp@duch.cz>
Thu, 9 Apr 2009 19:06:00 +0000 (21:06 +0200)
committerMarek Peca <mp@duch.cz>
Thu, 9 Apr 2009 19:06:00 +0000 (21:06 +0200)
- beacon positions were corrected according to actual boundary widths

src/robodim/robodim.c
src/robodim/robodim.h

index 972ad6f3cf7094d77544903d4b1852d00393884f..4e9e0f495132484826b73d99c7ee632116f5966a 100644 (file)
@@ -1,32 +1,22 @@
 #include "robodim.h"
 #include <robomath.h>
 
-/* Beacon positions. For some version of MCL, this must be sorted in
- * the same order as laser rotation. */
-const struct beacon_pos beacon_blue[BEACON_CNT] = {
-       /* R1 */ { 0,                  PLAYGROUND_HEIGHT_M/2 },
-       /* R2 */ { PLAYGROUND_WIDTH_M, 0 },
-#if BEACON_CNT == 4
-       /* R4 */ { PLAYGROUND_WIDTH_M, BASKET_WIDTH },
-#endif
-       /* R3 */ { PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M },
+/*
+ * Beacon positions. For some version of MCL, this must be sorted in
+ * the same order as laser rotation.
+ *
+ * (pecam1, 2009: not sure, if the sense is right for laser MCL;
+ *  anyway, I hope, we will be happy without the laser)
+ */
+const struct beacon_pos beacon_green[BEACON_CNT] = {
+       { 3.062, -0.05},  /* EB2009: one side is 10mm only plexiglass */
+       {-0.062,  1.05},  /* the rest is 22mm wood */
+       { 3.062,  2.162},
 };
 
 const struct beacon_pos beacon_red[BEACON_CNT] = {
-       /* S1 */ { PLAYGROUND_WIDTH_M, PLAYGROUND_HEIGHT_M/2 },
-       /* S2 */ { 0,                  PLAYGROUND_HEIGHT_M },
-#if BEACON_CNT == 4
-       /* S4 */ { 0,                  BASKET_WIDTH },
-#endif
-       /* S3 */ { 0,                  0 },
-};
-
-
- const struct sharp_pos sharp[SHARP_COUNT] = {
-       { ROBOT_AXIS_TO_FRONT_M-0.02, +ROBOT_WIDTH_M/2.0, DEG2RAD(+90) }, /* Left */
-       { ROBOT_AXIS_TO_FRONT_M-0.02, -ROBOT_WIDTH_M/2.0, DEG2RAD(-90) }, /* Right */
-       { ROBOT_AXIS_TO_FRONT_M, +ROBOT_WIDTH_M/2.0, DEG2RAD(0) }, /* Front left */
-       { ROBOT_AXIS_TO_FRONT_M, -ROBOT_WIDTH_M/2.0, DEG2RAD(0) }, /* Front right */
-       { ROBOT_AXIS_TO_BACK_M, +ROBOT_WIDTH_M/2.0, DEG2RAD(180) }, /* Back left */
-       { ROBOT_AXIS_TO_BACK_M, -ROBOT_WIDTH_M/2.0, DEG2RAD(180) }, /* Back right */
+       /* beacons are rotated, not mirrored! */
+       {-0.062,  2.162},
+       { 3.062,  1.05},
+       {-0.062, -0.05},
 };
index ccd05c79e1f9b491a09078d3d916346f9119c051..c21156ab45ac3d618a87bada5e2700c6bc301b18 100644 (file)
 #define RED_BASKET_TARGET_X    0
 #define RED_BASKET_TARGET_Y    (BASKET_WIDTH/2.0)
 
-/**
- * BEACONS
- *   Blue reflectors
- *     R1, R2, R3, R4
- *   Red reflectors
- *     S1, S2, S3, S4
- */
+     /*
+      * 3 ultrasonic beacons
+      */
 #define BEACON_WIDTH           0.08
 #define BEACON_HEIGHT          BEACON_WIDTH
 
-#define        BEACON_BLUE             0 // FIXME: no significant blue color this year
+#define        BEACON_GREEN            0
 #define        BEACON_RED              1
-#define BEACON_CNT             4
+#define BEACON_CNT             3
 
 struct beacon_pos {
        float x, y;
 };
 
-extern const struct beacon_pos beacon_blue[BEACON_CNT];
+extern const struct beacon_pos beacon_green[BEACON_CNT];
 extern const struct beacon_pos beacon_red[BEACON_CNT];
 
-/** Position of Shapr sensors on the robot with respect to the robot center */
+/*
+ * Position of Shapr sensors on the robot with respect to the robot center
+ * (not used in EB2009)
+ */
 struct sharp_pos {
        float x, y, ang;
 };
 
-#define SHARP_COUNT 6
-extern const struct sharp_pos sharp[SHARP_COUNT];
-
+#define SHARP_COUNT 0  /* no sharp sensors in EB2009, I hope */
 
 #endif /* ROBODIM_EB2008_H */