summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--digital/ai/tools/guybrush.py6
-rw-r--r--digital/asserv/tools/asserv/init.py25
-rw-r--r--digital/io-hub/src/guybrush/avrconfig.h2
-rw-r--r--host/simu/robots/guybrush/link/bag.py3
4 files changed, 31 insertions, 5 deletions
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 */
diff --git a/host/simu/robots/guybrush/link/bag.py b/host/simu/robots/guybrush/link/bag.py
index d6c69324..4d7451cd 100644
--- a/host/simu/robots/guybrush/link/bag.py
+++ b/host/simu/robots/guybrush/link/bag.py
@@ -29,7 +29,8 @@ import mimot.mex
class Bag:
def __init__ (self, node, instance = 'robot0'):
- self.asserv = asserv.mex.Mex (node, '%s:asserv0' % instance)
+ self.asserv = asserv.mex.Mex (node, '%s:asserv0' % instance,
+ aux_nb = 0)
self.io_hub = io_hub.mex.Mex (node, '%s:io0' % instance,
contact_nb = 7, output_nb = 10)
self.mimot = mimot.mex.Mex (node, '%s:mimot0' % instance)