From da90cd4112335e5ce5e21e3e077336d5aeb745e0 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 6 Apr 2012 23:44:03 +0200 Subject: digital/io-hub/src/guybrush: use mimot for guybrush asserv --- digital/ai/tools/guybrush.py | 6 +++--- digital/asserv/tools/asserv/init.py | 25 +++++++++++++++++++++++++ digital/io-hub/src/guybrush/avrconfig.h | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) (limited to 'digital') diff --git a/digital/ai/tools/guybrush.py b/digital/ai/tools/guybrush.py index 28c6a1f0..0600a494 100644 --- a/digital/ai/tools/guybrush.py +++ b/digital/ai/tools/guybrush.py @@ -30,14 +30,14 @@ class Robot: def proto (proto_class, cmd, init): cmd = [ s.format (instance = instance) for s in cmd ] return proto_class (PopenIO (cmd), proto_time, **init) - asserv_cmd = ('../../asserv/src/asserv/asserv.host', - '-i{instance}:asserv0', '-m9', 'robospierre') + asserv_cmd = ('../../mimot/src/asserv/asserv.host', + '-i{instance}:asserv0', '-m9', 'guybrush') mimot_cmd = ('../../mimot/src/dirty/dirty.host', '-i{instance}:mimot0', '-m9', 'guybrush') io_hub_cmd = ('../../io-hub/src/guybrush/io_hub.host', '-i{instance}:io0') self.asserv = proto (asserv.Proto, asserv_cmd, - asserv.init.host['robospierre']) + asserv.init.host['guybrush']) self.mimot = proto (mimot.Proto, mimot_cmd, mimot.init.host['guybrush']) self.io = proto (io_hub.ProtoGuybrush, io_hub_cmd, diff --git a/digital/asserv/tools/asserv/init.py b/digital/asserv/tools/asserv/init.py index 5b852d71..6aa54faa 100644 --- a/digital/asserv/tools/asserv/init.py +++ b/digital/asserv/tools/asserv/init.py @@ -21,10 +21,21 @@ host_robospierre = dict ( e_sat = 0x3ff, d_sat = 0x1ff, angle_limit = 0x1000, ) +host_guybrush = dict ( + aux_nb = 0, + scale = 0.0395840674352314, footing = 0xdd1, + t_kp = 1, t_kd = 16, + t_acc = 0.75, t_speed_max = 0x60, t_speed_slow = 0x10, + a_kp = 2, a_kd = 16, + a_acc = 0.25, a_speed_max = 0x60, a_speed_slow = 0x10, + e_sat = 0x3ff, d_sat = 0x1ff, + angle_limit = 0x1000, + ) host = { 'giboulee': host_marcel, 'marcel': host_marcel, 'robospierre': host_robospierre, + 'guybrush': host_guybrush, } target_marcel = dict ( scale = 0.0415178942124, footing = 0xcef, @@ -54,8 +65,22 @@ target_robospierre = dict ( e_sat = 0x3ff, d_sat = 0x1ff, angle_limit = 0x1000, ) +target_guybrush = dict ( + aux_nb = 0, + scale = 0.0317975134344, footing = 0x134e, + encoder_right_correction = float (0xffa897) / (1 << 24), + t_kp = 1, t_kd = 16, + t_acc = 0.75, t_speed_max = 0x60, t_speed_slow = 0x10, + t_bd_error_limit = 256, t_bd_speed_limit = 0x08, t_bd_counter_limit = 40, + a_kp = 2, a_kd = 16, + a_acc = 0.5, a_speed_max = 0x60, a_speed_slow = 0x10, + a_bd_error_limit = 128, a_bd_speed_limit = 0x08, a_bd_counter_limit = 40, + e_sat = 0x3ff, d_sat = 0x1ff, + angle_limit = 0x1000, + ) target = { 'giboulee': target_marcel, 'marcel': target_marcel, 'robospierre': target_robospierre, + 'guybrush': target_guybrush, } diff --git a/digital/io-hub/src/guybrush/avrconfig.h b/digital/io-hub/src/guybrush/avrconfig.h index d41ac498..7aba16dc 100644 --- a/digital/io-hub/src/guybrush/avrconfig.h +++ b/digital/io-hub/src/guybrush/avrconfig.h @@ -134,6 +134,6 @@ /* asserv. */ /** Number of auxiliary motors. */ -#define AC_ASSERV_AUX_NB 2 +#define AC_ASSERV_AUX_NB 0 #endif /* avrconfig_h */ -- cgit v1.2.3