* Dimensions for the robot, playground and other stuff.
* Eurobot 2010
*
- * Copyright: (c) 2010 CTU Dragons
+ * Copyright: (c) 2008 - 2010 CTU Dragons
* CTU FEE - Department of Control Engineering
* License: GNU GPL v.2
*/
/**
* 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 update robot's dimensions!!! */
-#define ROBOT_WIDTH_MM 290 /* W*/
+#define ROBOT_WIDTH_MM 310 /* W*/
#define ROBOT_WIDTH_M (ROBOT_WIDTH_MM/1000.0)
-#define ROBOT_ROTATION_RADIUS_MM (260/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 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 170
-#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]|
- * | | |
- * | | |
- * | | |
+ * ^ | | [W,H]|
+ * | | SL_T_R | |
+ * | |<------------->| |
+ * | | | |
* | | |
* | | |
* | | |
*/
#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 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)
+
+#define SQUARE_WIDTH_MM 350
+#define SQUARE_HEIGHT_MM 350
+
+#define BLINE_WIDTH_MM 50
+#define BLINE_HEIGHT_MM 2100
+
+#define BLOCK_WIDTH_MM 400
+#define BLOCK_HEIGHT_MM 22
+
+#define STARTAREA_WIDTH_MM 500
+#define STARTAREA_HEIGHT_MM 500
+
+#define DISPENSING_WIDTH_MM 400
+#define DISPENSING_HEIGHT_MM 1678
+
+#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_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