Closedown
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
run("RobotTCP")
|
||||
|
||||
simulation = True
|
||||
|
||||
class RobotSC(RobotTCP):
|
||||
def mount(self, puck, sample):
|
||||
return self.execute('mount', puck, sample)
|
||||
@@ -16,21 +18,26 @@ class RobotSC(RobotTCP):
|
||||
#print "EVT: " + ev
|
||||
pass
|
||||
|
||||
def doUpdate(self):
|
||||
start = time.time()
|
||||
RobotTCP.doUpdate(self)
|
||||
if self.state != State.Offline:
|
||||
self.get_joint_forces()
|
||||
for dev in [jf1, jf2, jf3, jf4,jf5, jf6, jfc]:
|
||||
dev.update()
|
||||
def doUpdate(self):
|
||||
#start = time.time()
|
||||
global simulation
|
||||
if (!simulation):
|
||||
RobotTCP.doUpdate(self)
|
||||
if self.state != State.Offline:
|
||||
self.get_joint_forces()
|
||||
for dev in [jf1, jf2, jf3, jf4,jf5, jf6, jfc]:
|
||||
dev.update()
|
||||
#print time.time() -start
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_device(RobotSC("robot", "129.129.126.100:1000"), force = True)
|
||||
add_device(RobotSC("robotemulator","129.129.126.174:851"),force = False)
|
||||
if simulation:
|
||||
add_device(RobotSC("robot","129.129.126.174:851"),force = True)
|
||||
else:
|
||||
add_device(RobotSC("robot", "129.129.126.100:1000"), force = True)
|
||||
|
||||
robot.setPolling(20)
|
||||
#robot.set_monitor_speed(20)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user