]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robodim/robodim.h
robodim: Update hokuyo range + add hokuyo orientation definition.
[eurobot/public.git] / src / robodim / robodim.h
index 921c6d0ece7b830a10e0752849f33e2ac85d16ad..edf3160277c7a3248cc31327e9925fd8d33e6f3e 100644 (file)
 #define ROBOT_ROTATION_RADIUS_M (ROBOT_ROTATION_RADIUS_MM/1000.0)
 #define ROBOT_WHEEL_RADIUS_MM 38 /* WR */
 #define ROBOT_WHEEL_RADIUS_M (ROBOT_WHEEL_RADIUS_MM/1000.0)
-#define ROBOT_AXIS_TO_BACK_MM 220 /* AB */
+#define ROBOT_AXIS_TO_BACK_MM 50 /* AB */
 #define ROBOT_AXIS_TO_BACK_M (ROBOT_AXIS_TO_BACK_MM/1000.0)
-#define ROBOT_AXIS_TO_FRONT_MM 50 /* AF */
+#define ROBOT_AXIS_TO_FRONT_MM 210 /* AF */
 #define ROBOT_AXIS_TO_FRONT_M (ROBOT_AXIS_TO_FRONT_MM/1000.0)
+#define ROBOT_HEIGHT_MM (ROBOT_AXIS_TO_BACK_MM + ROBOT_AXIS_TO_FRONT_MM)
+#define ROBOT_HEIGHT_M (ROBOT_HEIGHT_MM / 1000.0)
 
-#define HOKUYO_CENTER_OFFSET_MM 
+#define HOKUYO_CENTER_OFFSET_MM 180
 #define HOKUYO_CENTER_OFFSET_M (HOKUYO_CENTER_OFFSET_MM/1000.0)
-#define HOKUYO_RANGE_ANGLE_LEFT  70     /* view angle in degrees from center axis */
-#define HOKUYO_RANGE_ANGLE_RIGHT 70
+#define HOKUYO_RANGE_ANGLE_LEFT  120.0     /* view angle in degrees from center axis */
+#define HOKUYO_RANGE_ANGLE_RIGHT 120.0
 #define ODOMETRY_WHEEL_RADIUS_MM 30
+#define HOKUYO_ORIENTATION       (-1)   /* 1 = screws up, -1 = screws down */
 #define ODOMETRY_WHEEL_RADIUS_M (ODOMETRY_WHEEL_RADIUS_MM/1000.0)
 #define ODOMETRY_ROTATION_RADIUS_MM (284/2)
 #define ODOMETRY_ROTATION_RADIUS_M (ODOMETRY_ROTATION_RADIUS_MM/1000.0)
-#define ROBOT_JAWS_LENGHT_MM 105 /* JA */ 
+#define ROBOT_JAWS_LENGHT_MM 130 /* JA */
 #define ROBOT_JAWS_LENGHT_M (ROBOT_JAWS_LENGHT_MM/1000.0)
 #define ROBOT_LENGHT_WITH_PANWS_MM 170 /* PW */ 
 #define ROBOT_LENGHT_WITH_PAWNS_M (ROBOT_LENGHT_WITH_PANWS_MM/1000.0)
-#define ROBOT_AXIS_TO_FIGURE_CENTER_MM 280
+#define ROBOT_AXIS_TO_FIGURE_CENTER_MM 300
 #define ROBOT_AXIS_TO_FIGURE_CENTER_M (ROBOT_AXIS_TO_FIGURE_CENTER_MM/1000.0)
 
+#define ROBOT_START_X_MM       ROBOT_AXIS_TO_BACK_MM
+#define ROBOT_START_X_M        (ROBOT_START_X_MM / 1000.0)
+#define ROBOT_START_Y_MM       (PLAYGROUND_HEIGHT_MM - (ROBOT_WIDTH_MM / 2))
+#define ROBOT_START_Y_M        (ROBOT_START_Y_MM / 1000.0)
+#define ROBOT_START_ANGLE_DEG  0
+/* maxon motor parameters ratio */
+/* DO NOT change this if not shure what you are doing !!! */
+#define ROBOT_MOTOR_GEARBOX_RATIO      29.0
+#define ROBOT_MOTOR_IRC_RESOLUTION     512.0
+
 /**
  * PLAYGROUND DIMENSIONS
  *
  */
 #define PLAYGROUND_WIDTH_MM    3000
 #define PLAYGROUND_WIDTH_M     (PLAYGROUND_WIDTH_MM/1000.0)
-#define PLAYGROUND_HEIGHT_MM   2100
+#define PLAYGROUND_HEIGHT_MM   2000
 #define PLAYGROUND_HEIGHT_M    (PLAYGROUND_HEIGHT_MM/1000.0)
 
 #define SLOPE_TO_RIM_MM                740
 #define BLOCK_WIDTH_MM                 400
 #define BLOCK_HEIGHT_MM                        22
 
-#define STARTAREA_WIDTH_MM             400
-#define STARTAREA_HEIGHT_MM            400
+#define STARTAREA_WIDTH_MM             500
+#define STARTAREA_HEIGHT_MM            500
 
 #define DISPENSING_WIDTH_MM            400
 #define DISPENSING_HEIGHT_MM           1678
 /* queen */
 #define QUEEN_CNT              2
 
+#define SQ_CNTR 15
+
+
 struct beacon_pos {
        float x, y;
 };
@@ -171,6 +187,14 @@ struct queen_pos {
        int x, y;
 };
 
+struct square_center_red {
+       float x, y;
+};
+
+struct square_center_blue {
+       float x, y;
+};
+
 extern const struct beacon_pos beacon_green[BEACON_CNT];
 extern const struct beacon_pos beacon_red[BEACON_CNT];
 extern const struct bonus_pos bonus[BONUS_CNT];
@@ -178,6 +202,9 @@ extern const struct pawn_pos pawn[PAWN_CNT];
 extern const struct king_pos king[KING_CNT];
 extern const struct queen_pos queen[QUEEN_CNT];
 
+extern const struct square_center_red red_sq[SQ_CNTR];
+extern const struct square_center_blue blue_sq[SQ_CNTR];
+
 /*
  * Position of Shapr sensors on the robot with respect to the robot center
  * (not used in EB2009)