From 28ea3c171495aef1b13ef6af28e3b65c9277b006 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Wed, 16 May 2012 20:56:39 +0200 Subject: digital/io-hub/src/guybrush: clean load nearer from the totem --- digital/io-hub/src/guybrush/bot.h | 3 +++ digital/io-hub/src/guybrush/top.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'digital') diff --git a/digital/io-hub/src/guybrush/bot.h b/digital/io-hub/src/guybrush/bot.h index 32e7ff64..5764aa59 100644 --- a/digital/io-hub/src/guybrush/bot.h +++ b/digital/io-hub/src/guybrush/bot.h @@ -38,6 +38,9 @@ #define BOT_SIZE_FRONT 165 /** Distance from the robot axis to the lower clamp back. */ #define BOT_SIZE_LOWER_CLAMP_FRONT 100 +/** Distance from the robot axis to the maximum occupied space when + * loading. */ +#define BOT_SIZE_LOADING_FRONT 275 /** Distance from the robot axis to the back. */ #define BOT_SIZE_BACK 134 /** Distance from the robot axis to the side. */ diff --git a/digital/io-hub/src/guybrush/top.c b/digital/io-hub/src/guybrush/top.c index 540d0385..82652152 100644 --- a/digital/io-hub/src/guybrush/top.c +++ b/digital/io-hub/src/guybrush/top.c @@ -269,7 +269,7 @@ FSM_TRANS (TOP_TOTEM_CLEAN_APPROACHING, robot_move_failure, FSM_TRANS (TOP_TOTEM_CLEAN_CATCH_WAITING, clamps_ready, TOP_TOTEM_CLEAN_GOING_BACK) { - int16_t move = top.totem_distance - BOT_SIZE_LOWER_CLAMP_FRONT - 240; + int16_t move = top.totem_distance - BOT_SIZE_LOADING_FRONT - 30; top.totem_distance -= move; asserv_move_linearly (move); return FSM_NEXT (TOP_TOTEM_CLEAN_CATCH_WAITING, clamps_ready); -- cgit v1.2.3