From 06037accc5049c1f55c287e582cdc6a74a4e06c6 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 7 Apr 2012 18:47:31 +0200 Subject: host/simu/robots/guybrush: add upper clamp simulation --- host/simu/robots/guybrush/model/bag.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'host/simu/robots/guybrush/model/bag.py') diff --git a/host/simu/robots/guybrush/model/bag.py b/host/simu/robots/guybrush/model/bag.py index 3b6cc857..8e7250b2 100644 --- a/host/simu/robots/guybrush/model/bag.py +++ b/host/simu/robots/guybrush/model/bag.py @@ -39,12 +39,19 @@ class Bag: self.jack = Switch (link_bag.io_hub.contact[1], invert = True) self.strat_switch = Switch (link_bag.io_hub.contact[2], invert = True) self.position = Position (link_bag.asserv.position) + output = link_bag.io_hub.output self.clamps = Clamps (table, self.position, link_bag.mimot.aux[0], - (PneumaticCylinder (None, link_bag.io_hub.output[8], - scheduler, 0., 30., 150., 75., 30.), - PneumaticCylinder (None, link_bag.io_hub.output[9], - scheduler, 0., 30., 150., 75., 30.)), - [ Switch (c) for c in link_bag.io_hub.contact[3:3+4] ]) + (PneumaticCylinder (None, output[8], scheduler, + 0., 30., 150., 75., 30.), + PneumaticCylinder (None, output[9], scheduler, + 0., 30., 150., 75., 30.)), + [ Switch (c) for c in link_bag.io_hub.contact[3:3+4] ], + PneumaticCylinder (output[4], output[5], scheduler, + 0., 1., 1., 1., 1.), + PneumaticCylinder (output[3], output[2], scheduler, + 0., 1., 1., 1., 0.), + PneumaticCylinder (None, output[1], scheduler, + 0., 30., 150., 75., 30.)) self.distance_sensor = [ DistanceSensorSensopart (link_bag.io_hub.adc[0], scheduler, table, (20, 20), pi * 10 / 180, (self.position, ), 2), -- cgit v1.2.3