summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub
diff options
context:
space:
mode:
authorNicolas Schodet2012-04-09 19:39:51 +0200
committerNicolas Schodet2012-04-09 19:39:51 +0200
commit3c79a8d96c0395190d668f00e5bacf0e504f3816 (patch)
tree6645de01007246081b0a9134d362ad0931e46bce /digital/io-hub
parent06037accc5049c1f55c287e582cdc6a74a4e06c6 (diff)
digital/io-hub/src/guybrush: init sequence parameters
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/guybrush/bot.h8
-rw-r--r--digital/io-hub/src/guybrush/init_defs.h16
2 files changed, 12 insertions, 12 deletions
diff --git a/digital/io-hub/src/guybrush/bot.h b/digital/io-hub/src/guybrush/bot.h
index 65b4cb09..400cd4b9 100644
--- a/digital/io-hub/src/guybrush/bot.h
+++ b/digital/io-hub/src/guybrush/bot.h
@@ -37,14 +37,14 @@
/** Distance from the robot axis to the front. */
#define BOT_SIZE_FRONT 150
/** Distance from the robot axis to the back. */
-#define BOT_SIZE_BACK 150
+#define BOT_SIZE_BACK 130
/** Distance from the robot axis to the side. */
-#define BOT_SIZE_SIDE 190
+#define BOT_SIZE_SIDE 172
/** Distance between the front contact point and the robot center. */
-#define BOT_FRONT_CONTACT_DIST_MM 150
+#define BOT_BACK_CONTACT_DIST_MM BOT_SIZE_BACK
/** Angle error at the front contact point. */
-#define BOT_FRONT_CONTACT_ANGLE_ERROR_DEG 0
+#define BOT_BACK_CONTACT_ANGLE_ERROR_DEG 0
/** Speed used for initialisation. */
#ifdef HOST
diff --git a/digital/io-hub/src/guybrush/init_defs.h b/digital/io-hub/src/guybrush/init_defs.h
index 128d694e..6321fcfc 100644
--- a/digital/io-hub/src/guybrush/init_defs.h
+++ b/digital/io-hub/src/guybrush/init_defs.h
@@ -30,21 +30,21 @@
/** Parameters to push the first wall. */
#define INIT_FIRST_WALL_PUSH \
- 0, PG_X (BOT_FRONT_CONTACT_DIST_MM), 200, \
- PG_A_DEG (180 + BOT_FRONT_CONTACT_ANGLE_ERROR_DEG)
+ ASSERV_BACKWARD, PG_X (BOT_BACK_CONTACT_DIST_MM), 250, \
+ PG_A_DEG (0 + BOT_BACK_CONTACT_ANGLE_ERROR_DEG)
/** Parameters to go away from the first wall. */
-#define INIT_FIRST_WALL_AWAY -500
+#define INIT_FIRST_WALL_AWAY (250 - BOT_BACK_CONTACT_DIST_MM)
/** Parameter to face the second wall. */
-#define INIT_SECOND_WALL_ANGLE PG_A_DEG (90)
+#define INIT_SECOND_WALL_ANGLE PG_A_DEG (-90)
/** Parameters to push the second wall. */
#define INIT_SECOND_WALL_PUSH \
- 0, -1, PG_Y (PG_LENGTH - BOT_FRONT_CONTACT_DIST_MM), -1
+ ASSERV_BACKWARD, -1, PG_Y (PG_LENGTH - BOT_BACK_CONTACT_DIST_MM), -1
/** Parameters to go away from the second wall. */
-#define INIT_SECOND_WALL_AWAY -(200 - BOT_FRONT_CONTACT_DIST_MM)
+#define INIT_SECOND_WALL_AWAY (250 - BOT_BACK_CONTACT_DIST_MM)
/** Parameter to face the start position. */
-#define INIT_START_POSITION_ANGLE PG_A_DEG (0)
+#undef INIT_START_POSITION_ANGLE
/** Start position. */
#define INIT_START_POSITION \
- PG_X (200), PG_Y (PG_LENGTH - 200), PG_A_DEG (0), ASSERV_BACKWARD
+ PG_X (250), PG_Y (PG_LENGTH - 250), PG_A_DEG (0), ASSERV_REVERT_OK
#endif /* init_defs_h */