/*
- * robodim_eb2008.h 08/04/18
+ * robodim_eb2010.h
*
- * Dimensions for the robot, playground and other stuffs.
- * Eurobot 2008
+ * Dimensions for the robot, playground and other stuff.
+ * Eurobot 2010
*
- * Copyright: (c) 2008 CTU Dragons
+ * Copyright: (c) 2008 - 2010 CTU Dragons
* CTU FEE - Department of Control Engineering
* License: GNU GPL v.2
*/
-#ifndef ROBODIM_EB2008_H
-#define ROBODIM_EB2008_H
+#ifndef ROBODIM_EB2010_H
+#define ROBODIM_EB2010_H
/**
* FIXME: update robot's dimensions !!!
+ * and update the pitcture
*
- * ROBOT DIMENSIONS
- * S0
- * S4 +--------------------------+ S2
- * ^ | | | |--,
- * ^ | | ------- ABE | |
- * RR| | | :<--------------------->|
- * v | | : __ |--'
- * W| | + Center (L)|__| |
- * | | AB : AF HOK |--,
- * | |<---->:<----------------->| |
- * | | ------- | |
- * v | | | |--'
- * S5 +--------------------------+ S3
- * <--> S1
- * WR
- *
- * Sx - Sharp sensor
+ * ROBOT DIMENSIONS FOR COMPETITION 2011, Play Chess!
+ *
+ * ^ +--------------------------+@------\
+ * | | | | | \
+ * ^ | | ------- | .....
+ * RR| | | HOK : | . .
+ * v | | __ : | . .
+ * W| | |__| |. .
+ * | | AF : AB | . .
+ * | |<---->:<----------------->| . .
+ * | | ------- | .......
+ * | | | | | /
+ * v +--------------------------+@-------/
+ * <<= <--> <--------->
+ * direction WR JA
+ * of motion <------------>
+ * PW
*/
-/* FIXME needs update (?) // comment added by Filip */
-#define ROBOT_WIDTH_MM 290 /* W*/
+/* FIXME update robot's dimensions!!! */
+#define ROBOT_WIDTH_MM 310 /* W*/
#define ROBOT_WIDTH_M (ROBOT_WIDTH_MM/1000.0)
-#define ROBOT_ROTATION_RADIUS_MM (254/2) /* RR */
+#define ROBOT_ROTATION_RADIUS_MM ((230)/2) /* RR */
#define ROBOT_ROTATION_RADIUS_M (ROBOT_ROTATION_RADIUS_MM/1000.0)
-#define LASER_CENTER_OFFSET_MM 50 /*FIXME*/ /* Distance of the laser from rotation axis (Center to L) */
-#define LASER_CENTER_OFFSET_M (LASER_CENTER_OFFSET_MM/1000.0)
-#define ROBOT_WHEEL_RADIUS_MM 40 /* WR */
+#define ROBOT_WHEEL_RADIUS_MM 38 /* WR */
#define ROBOT_WHEEL_RADIUS_M (ROBOT_WHEEL_RADIUS_MM/1000.0)
-#define ROBOT_AXIS_TO_BACK_MM 75 /* 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 183 /* AF */
+#define ROBOT_AXIS_TO_FRONT_MM 210 /* AF */
#define ROBOT_AXIS_TO_FRONT_M (ROBOT_AXIS_TO_FRONT_MM/1000.0)
-#define ROBOT_AXIS_TO_BRUSH_MM 280 /* ABE */
-#define ROBOT_AXIS_TO_BRUSH_M (ROBOT_AXIS_TO_BRUSH_MM/1000.0)
-#define HOKUYO_CENTER_OFFSET_MM 0 /*FIXME*/
-#define HOKUYO_CENTER_OFFSET_M (HOKUYO_CENTER_OFFSET_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 180
+#define HOKUYO_CENTER_OFFSET_M (HOKUYO_CENTER_OFFSET_MM/1000.0)
+#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 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 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
- *
- * S2 R3
- * +-------------+-------------+
- * ^ | [W,H]|
- * | | |
- * | | |
- * | | |
- * | | |
- * H | R1+ + S1
- * | | |
- * | S4+ + R4
- * | | |
- * | | |
- * v |[0,0] |
- * +-------------+-------------+
- * S3 R2
- * <------------------------->
- * W
+ *
+ * S2 R3
+ * +---------------------------------+---------------------------------+
+ * ^ | | [W,H]|
+ * | | SL_T_R | |
+ * | |<------------->| |
+ * | | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * H | R1| |S1
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * v |[0,0] |
+ * +---------------------------------+---------------------------------+
+ * S3 R2
+ * <----------------------------------------------------------------->
+ * W
*/
#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)
-/**
- * PUCK DISPENSERS (= COLUMN ELEMENT DISPENSERS)
- */
-#define STATIC_DISPENSER_WIDTH_OFFSET 0.289
-#define DISPENSER_TO_CUSHION_DISTANCE 0.04
-#define STATIC_DISPENSER_X (PLAYGROUND_WIDTH_M - STATIC_DISPENSER_WIDTH_OFFSET)
-#define STATIC_DISPENSER_Y DISPENSER_TO_CUSHION_DISTANCE
-#define TRAVELLING_DISPENSER_X (PLAYGROUND_WIDTH - DISPENSER_TO_CUSHION_DISTANCE)
-// y coordinate of the travelling dispenser is not known in advance
-#define OPPONENTS_STATIC_DISPENSER_X STATIC_DISPENSER_WIDTH_OFFSET
-#define OPPONENTS_STATIC_DISPENSER_Y DISPENSER_TO_CUSHION_DISTANCE
+#define SLOPE_TO_RIM_MM 740
+#define SLOPE_TO_RIM_M (SLOPE_TO_RIM_MM/1000.0)
+#define SLOPE_LENGTH_MM 519.23
+#define SLOPE_LENGTH_M (SLOPE_LENGTH_MM/1000.0)
-/**
- * FREE PUCKS POSITIONS
- */
-#define PUCK_GRID_X_OFFSET 0.6
-#define PUCK_GRID_Y_OFFSET 0.925
-#define PUCK_GRID_DELTA_X 0.25
-#define PUCK_GRID_DELTA_Y 0.2
-#define PUCK_GRID_ROWS_NUM 4
-#define PUCK_GRID_COLS_NUM 3
+#define SQUARE_WIDTH_MM 350
+#define SQUARE_HEIGHT_MM 350
-/**
- * BASKET
- */
-#define BASKET_WIDTH 0.5
-#define BASKET_HEIGHT 0.34
-#define BASKET_VERT_OFFSET 0.35
+#define BLINE_WIDTH_MM 50
+#define BLINE_HEIGHT_MM 2100
+
+#define BLOCK_WIDTH_MM 400
+#define BLOCK_HEIGHT_MM 22
-#define BLUE_BASKET_TARGET_X PLAYGROUND_WIDTH_M
-#define BLUE_BASKET_TARGET_Y (BASKET_WIDTH/2.0)
+#define STARTAREA_WIDTH_MM 500
+#define STARTAREA_HEIGHT_MM 500
-#define RED_BASKET_TARGET_X 0
-#define RED_BASKET_TARGET_Y (BASKET_WIDTH/2.0)
+#define DISPENSING_WIDTH_MM 400
+#define DISPENSING_HEIGHT_MM 1678
- /*
- * 3 ultrasonic beacons
- */
+#define PROTECTEDBORDER_WIDTH_MM 22
+#define PROTECTEDBORDER_HEIGHT_MM 130
+
+#define PROTECTEDBLOCK_WIDTH_MM 700
+#define PROTECTEDBLOCK_HEIGHT_MM 120
+
+#define FIGURE_WIDTH_MM 200
+
+#define CORN_DIAMETER_MM 50
+#define CORN_DIAMETER_M (CORN_DIAMETER_MM/1000.0)
+#define CORN_RADIUS_MM (50/2)
+#define CORN_RADIUS_M (CORN_RADIUS_MM/1000.0)
+
+#define CORN_NEIGHBOURHOOD_RADIUS_MM 220
+#define CORN_NEIGHBOURHOOD_RADIUS_M (CORN_NEIGHBOURHOOD_RADIUS_MM/1000.0)
+/*
+ * 3 ultrasonic beacons
+ */
#define BEACON_WIDTH 0.08
#define BEACON_HEIGHT BEACON_WIDTH
#define BEACON_RED 1
#define BEACON_CNT 3
+/* bonus squares */
+#define BONUS_CNT 6
+
+/* pawns */
+#define PAWN_CNT 15
+
+/* king */
+#define KING_CNT 2
+
+/* queen */
+#define QUEEN_CNT 2
+
+#define SQ_CNTR 15
+
+
struct beacon_pos {
float x, y;
};
+struct bonus_pos {
+ int x, y;
+};
+
+struct pawn_pos {
+ int x, y;
+};
+
+struct king_pos {
+ int x, y;
+};
+
+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];
+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