summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-27 07:58:36 +0200
committerNicolas Schodet2011-05-29 09:57:32 +0200
commit9b1ce3a050d9169f3bf77764063de0cff800190e (patch)
tree34a38d7df584147e789e4dde34b916630257e69c
parentb5d74afb5302b41d0ebc44d0c77db348016154ad (diff)
digital/{ai,io-hub,mimot}, host/simu: change robospierre rotation motor
-rw-r--r--digital/ai/tools/robospierre.py2
-rw-r--r--digital/ai/tools/test_simu_control_robospierre.py2
-rw-r--r--digital/io-hub/src/robospierre/bot.h18
-rw-r--r--digital/mimot/src/dirty/models.host.c32
-rw-r--r--digital/mimot/tools/mimot/init.py2
-rw-r--r--host/simu/robots/robospierre/model/clamp.py2
6 files changed, 45 insertions, 13 deletions
diff --git a/digital/ai/tools/robospierre.py b/digital/ai/tools/robospierre.py
index e8384f6c..6a44883e 100644
--- a/digital/ai/tools/robospierre.py
+++ b/digital/ai/tools/robospierre.py
@@ -25,7 +25,7 @@ class Robot:
self.robot_view = simu.robots.robospierre.view.bag
asserv_cmd = ('../../asserv/src/asserv/asserv.host', '-m9',
'robospierre')
- mimot_cmd = ('../../mimot/src/dirty/dirty.host', '-m9', 'marcel')
+ mimot_cmd = ('../../mimot/src/dirty/dirty.host', '-m9', 'robospierre')
io_hub_cmd = ('../../io-hub/src/robospierre/io_hub.host')
self.asserv = asserv.Proto (PopenIO (asserv_cmd), proto_time,
**asserv.init.host['robospierre'])
diff --git a/digital/ai/tools/test_simu_control_robospierre.py b/digital/ai/tools/test_simu_control_robospierre.py
index 0d52219e..1795e17f 100644
--- a/digital/ai/tools/test_simu_control_robospierre.py
+++ b/digital/ai/tools/test_simu_control_robospierre.py
@@ -30,7 +30,7 @@ class TestSimuControl (TestSimu):
ELEVATION_STROKE = 0x3b0b
- ROTATION_STROKE = 0x11c6
+ ROTATION_STROKE = 0x233e
def __init__ (self, robot_class):
TestSimu.__init__ (self, robot_class)
diff --git a/digital/io-hub/src/robospierre/bot.h b/digital/io-hub/src/robospierre/bot.h
index 1071bf7e..65f6adf6 100644
--- a/digital/io-hub/src/robospierre/bot.h
+++ b/digital/io-hub/src/robospierre/bot.h
@@ -67,9 +67,9 @@
# define BOT_CLAMP_SLOT_FRONT_BOTTOM_ROTATION_STEP 0
# define BOT_CLAMP_SLOT_FRONT_MIDDLE_ROTATION_STEP 0
# define BOT_CLAMP_SLOT_FRONT_TOP_ROTATION_STEP 0
-# define BOT_CLAMP_SLOT_BACK_BOTTOM_ROTATION_STEP 0x11c6
-# define BOT_CLAMP_SLOT_BACK_MIDDLE_ROTATION_STEP 0x11c6
-# define BOT_CLAMP_SLOT_BACK_TOP_ROTATION_STEP 0x11c6
+# define BOT_CLAMP_SLOT_BACK_BOTTOM_ROTATION_STEP 0x233e
+# define BOT_CLAMP_SLOT_BACK_MIDDLE_ROTATION_STEP 0x233e
+# define BOT_CLAMP_SLOT_BACK_TOP_ROTATION_STEP 0x233e
# define BOT_CLAMP_BAY_FRONT_ROTATION_STEP \
BOT_CLAMP_SLOT_FRONT_MIDDLE_ROTATION_STEP
@@ -96,23 +96,23 @@
# define BOT_CLAMP_SLOT_FRONT_BOTTOM_ROTATION_STEP 0
# define BOT_CLAMP_SLOT_FRONT_MIDDLE_ROTATION_STEP 0
# define BOT_CLAMP_SLOT_FRONT_TOP_ROTATION_STEP 0
-# define BOT_CLAMP_SLOT_BACK_BOTTOM_ROTATION_STEP 0x10ce
-# define BOT_CLAMP_SLOT_BACK_MIDDLE_ROTATION_STEP ((0x10ce + 0x10e2) / 2)
-# define BOT_CLAMP_SLOT_BACK_TOP_ROTATION_STEP 0x10e2
+# define BOT_CLAMP_SLOT_BACK_BOTTOM_ROTATION_STEP 0x233e
+# define BOT_CLAMP_SLOT_BACK_MIDDLE_ROTATION_STEP 0x233e
+# define BOT_CLAMP_SLOT_BACK_TOP_ROTATION_STEP 0x233e
# define BOT_CLAMP_BAY_FRONT_ROTATION_STEP \
BOT_CLAMP_SLOT_FRONT_MIDDLE_ROTATION_STEP
# define BOT_CLAMP_BAY_BACK_ROTATION_STEP \
BOT_CLAMP_SLOT_BACK_MIDDLE_ROTATION_STEP
-# define BOT_CLAMP_BAY_SIDE_ROTATION_STEP 0x816
+# define BOT_CLAMP_BAY_SIDE_ROTATION_STEP 0x10de
#define BOT_CLAMP_CLOSED_ROTATION_OFFSET -61
#endif /* !HOST */
#define BOT_CLAMP_ELEVATION_SPEED 0x60
-#define BOT_CLAMP_ROTATION_SPEED 0x30
-#define BOT_CLAMP_ROTATION_OFFSET_SPEED 2
+#define BOT_CLAMP_ROTATION_SPEED 0x60
+#define BOT_CLAMP_ROTATION_OFFSET_SPEED 1
#define BOT_PWM_CLAMP 2
#define BOT_PWM_DOOR_FRONT_BOTTOM 0
diff --git a/digital/mimot/src/dirty/models.host.c b/digital/mimot/src/dirty/models.host.c
index a835298f..b1141748 100644
--- a/digital/mimot/src/dirty/models.host.c
+++ b/digital/mimot/src/dirty/models.host.c
@@ -52,6 +52,26 @@ static const struct motor_def_t marcel_clamp_f2342_model =
-INFINITY, +INFINITY,
};
+/* Robospierre rotation motor, AMAX32GHP with 1:16 gearbox model. */
+static const struct motor_def_t robospierre_rotation_amax32ghp_model =
+{
+ /* Motor characteristics. */
+ 269 * (2*M_PI) / 60,/* Speed constant ((rad/s)/V). */
+ 25.44 / 1000, /* Torque constant (N.m/A). */
+ 0, /* Bearing friction (N.m/(rad/s)). */
+ 3.99, /* Terminal resistance (Ohm). */
+ 0.24 / 1000, /* Terminal inductance (H). */
+ 24.0, /* Maximum voltage (V). */
+ /* Gearbox characteristics. */
+ 16, /* Gearbox ratio. */
+ 0.75, /* Gearbox efficiency. */
+ /* Load characteristics. */
+ 0.200 * 0.010 * 0.010, /* Load (kg.m^2). */
+ /* This is a pifometric estimation. */
+ /* Hardware limits. */
+ -INFINITY, +INFINITY,
+};
+
/* Marcel, APBTeam 2010. */
static const struct robot_t marcel_robot =
{
@@ -63,6 +83,17 @@ static const struct robot_t marcel_robot =
simu_sensor_update_marcel,
};
+/* Robospierre, APBTeam 2011. */
+static const struct robot_t robospierre_robot =
+{
+ /** Auxiliary motors, NULL if not present. */
+ { &marcel_clamp_f2342_model, &robospierre_rotation_amax32ghp_model },
+ /** Number of steps for each auxiliary motor encoder. */
+ { 256, 250 },
+ /** Sensor update function. */
+ NULL,
+};
+
/* Table of models. */
static const struct
{
@@ -70,6 +101,7 @@ static const struct
const struct robot_t *robot;
} models[] = {
{ "marcel", &marcel_robot },
+ { "robospierre", &robospierre_robot },
{ 0, 0 }
};
diff --git a/digital/mimot/tools/mimot/init.py b/digital/mimot/tools/mimot/init.py
index a05f8c44..d302e060 100644
--- a/digital/mimot/tools/mimot/init.py
+++ b/digital/mimot/tools/mimot/init.py
@@ -17,7 +17,7 @@ target_robospierre = dict (
a1a = 0.5, a1sm = 0x30, a1ss = 0x08,
a1be = 256, a1bs = 0x18, a1bc = 5,
E = 0x3ff, D = 0x1ff,
- w = 0x01,
+ w = 0x03,
)
target = {
'marcel': target_marcel,
diff --git a/host/simu/robots/robospierre/model/clamp.py b/host/simu/robots/robospierre/model/clamp.py
index fd3dde7c..c36d0d36 100644
--- a/host/simu/robots/robospierre/model/clamp.py
+++ b/host/simu/robots/robospierre/model/clamp.py
@@ -45,7 +45,7 @@ class Clamp (Observable):
ELEVATION_MOTOR_STROKE = 120.0 * 5.0 / 6.0
ROTATION_STROKE = pi
- ROTATION_MOTOR_STROKE = pi * 115.0 / 12.0
+ ROTATION_MOTOR_STROKE = 2 * pi * 36.088 / 16
CLAMPING_STROKE = 10
CLAMPING_MOTOR_STROKE = pi