* FIXME: update robot's dimensions !!!
* and update the pitcture
*
- * ROBOT DIMENSIONS
+ * ROBOT DIMENSIONS FOR COMPETITION 2011, Play Chess!
*
- * ^ +--------------------------+
- * | | | | |
- * ^ | | ------- |
- * RR| | | : |
- * v | | : __ |
- * W| | + Center |__| |
- * | | AB : AF HOK |
- * | |<---->:<----------------->|
- * | | ------- |
- * | | | | |
- * v +--------------------------+
- * <-------> <-->
- * V WR
- *
- * Sx - Sharp sensor
+ * ^ +--------------------------+@------\
+ * | | | | | \
+ * ^ | | ------- | .....
+ * RR| | | HOK : | . .
+ * v | | __ : | . .
+ * W| | |__| |. .
+ * | | AF : AB | . .
+ * | |<---->:<----------------->| . .
+ * | | ------- | .......
+ * | | | | | /
+ * v +--------------------------+@-------/
+ * <<= <--> <--------->
+ * direction WR JA
+ * of motion <------------>
+ * PW
*/
/* FIXME update robot's dimensions!!! */
-#define ROBOT_WIDTH_MM 280 /* W*/
+#define ROBOT_WIDTH_MM 310 /* W*/
#define ROBOT_WIDTH_M (ROBOT_WIDTH_MM/1000.0)
-#define ROBOT_ROTATION_RADIUS_MM ((188)/2) /* RR */
+#define ROBOT_ROTATION_RADIUS_MM ((230)/2) /* RR */
#define ROBOT_ROTATION_RADIUS_M (ROBOT_ROTATION_RADIUS_MM/1000.0)
-#define ROBOT_WHEEL_RADIUS_MM 38 /* WR */ // FIXME!! (this doesn't seem right to me .. Filip)
+#define ROBOT_WHEEL_RADIUS_MM 38 /* WR */
#define ROBOT_WHEEL_RADIUS_M (ROBOT_WHEEL_RADIUS_MM/1000.0)
-#define ROBOT_AXIS_TO_BACK_MM 230 /* 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 65 /* 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 50 /* ABE */ // FIXME: update the value and rename (no brushes)
-#define ROBOT_AXIS_TO_BRUSH_M (ROBOT_AXIS_TO_BRUSH_MM/1000.0)
-#define HOKUYO_CENTER_OFFSET_MM 35 // FIXME
+#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 (246/2)
+#define ODOMETRY_ROTATION_RADIUS_MM (284/2)
#define ODOMETRY_ROTATION_RADIUS_M (ODOMETRY_ROTATION_RADIUS_MM/1000.0)
-#define ROBOT_VIDLE_LENGTH_M 0.2 /* V */ /* FIXME: Measure the right value */
+#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]|
*/
#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;
};
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 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)