Closedown
This commit is contained in:
+11
-8
@@ -2,18 +2,17 @@ run("RobotTCP")
|
||||
|
||||
simulation = True
|
||||
|
||||
|
||||
class RobotSC(RobotTCP):
|
||||
def mount(self, puck, sample):
|
||||
return self.execute('mount', puck, sample)
|
||||
return self.execute('mount',segment, puck, sample)
|
||||
|
||||
def firstmount(self, puck, sample):
|
||||
return self.execute('firstmount', puck, sample)
|
||||
return self.execute('firstmount', segment, puck, sample)
|
||||
|
||||
def unmount(self, puck, sample):
|
||||
return self.execute('unmount', puck, sample)
|
||||
|
||||
|
||||
|
||||
return self.execute('unmount',segment, puck, sample)
|
||||
|
||||
def on_event(self,ev):
|
||||
#print "EVT: " + ev
|
||||
pass
|
||||
@@ -26,10 +25,12 @@ class RobotSC(RobotTCP):
|
||||
if self.state != State.Offline:
|
||||
self.get_joint_forces()
|
||||
for dev in [jf1, jf2, jf3, jf4,jf5, jf6, jfc]:
|
||||
dev.update()
|
||||
dev.update()
|
||||
|
||||
#print time.time() -start
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,10 +39,12 @@ if simulation:
|
||||
else:
|
||||
add_device(RobotSC("robot", "129.129.126.100:1000"), force = True)
|
||||
|
||||
robot.high_level_tasks = ["mount", "firstmount"]
|
||||
robot.setPolling(20)
|
||||
#robot.set_monitor_speed(20)
|
||||
|
||||
|
||||
|
||||
class jf1(ReadonlyRegisterBase):
|
||||
def doRead(self):
|
||||
return None if robot.joint_forces == None else robot.joint_forces[0]
|
||||
|
||||
Reference in New Issue
Block a user