summaryrefslogtreecommitdiff
path: root/host/simu/robots/robospierre/model/bag.py
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-12 23:42:26 +0200
committerNicolas Schodet2011-05-13 01:50:51 +0200
commita3fdbecac564a600c65568cac0e02fc72604567e (patch)
tree07dc894a2b64434b300a0fcffb3486e831a68f1b /host/simu/robots/robospierre/model/bag.py
parentf58d19eb2d786cb5446d511acd6839a03d791a44 (diff)
digital/{ai,io-hub}, host/simu/robots/robospierre: add doors and element move
Diffstat (limited to 'host/simu/robots/robospierre/model/bag.py')
-rw-r--r--host/simu/robots/robospierre/model/bag.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/simu/robots/robospierre/model/bag.py b/host/simu/robots/robospierre/model/bag.py
index 4d87192c..0a89d00c 100644
--- a/host/simu/robots/robospierre/model/bag.py
+++ b/host/simu/robots/robospierre/model/bag.py
@@ -37,10 +37,12 @@ class Bag:
self.contact = [ Switch (contact)
for contact in link_bag.io_hub.contact[2:] ]
self.position = Position (link_bag.asserv.position)
- self.clamping_motor = MotorBasic (link_bag.io_hub.pwm[0], scheduler,
+ self.clamping_motor = MotorBasic (link_bag.io_hub.pwm[2], scheduler,
2 * pi, 0, pi)
+ self.door_motors = [ MotorBasic (link_bag.io_hub.pwm[i], scheduler,
+ 2 * pi, 0, 0.5 * pi) for i in (0, 1, 3, 4) ]
self.clamp = Clamp (table, self.position, link_bag.mimot.aux[0],
- link_bag.mimot.aux[1], self.clamping_motor)
+ link_bag.mimot.aux[1], self.clamping_motor, self.door_motors)
self.distance_sensor = [
DistanceSensorSensopart (link_bag.io_hub.adc[0], scheduler, table,
(20, 20), pi * 10 / 180, (self.position, ), 2),