Update README.md

fix typo in example use
This commit is contained in:
Chung-Shan 2020-10-27 15:36:08 +08:00 committed by oroulet
parent 8deb9c5178
commit 7674fab5c0

View File

@ -32,21 +32,21 @@ rob.movel((0.1, 0, 0, 0, 0, 0), a, v, relative=true) # move relative to current
rob.translate((0.1, 0, 0), a, v) #move tool and keep orientation rob.translate((0.1, 0, 0), a, v) #move tool and keep orientation
rob.stopj(a) rob.stopj(a)
robot.movel(x, y, z, rx, ry, rz), wait=False) rob.movel(x, y, z, rx, ry, rz), wait=False)
while True : while True :
sleep(0.1) #sleep first since the robot may not have processed the command yet sleep(0.1) #sleep first since the robot may not have processed the command yet
if robot.is_program_running(): if rob.is_program_running():
break break
robot.movel(x, y, z, rx, ry, rz), wait=False) rob.movel(x, y, z, rx, ry, rz), wait=False)
while.robot.getForce() < 50: while rob.getForce() < 50:
sleep(0.01) sleep(0.01)
if not robot.is_program_running(): if not rob.is_program_running():
break break
robot.stopl() rob.stopl()
try: try:
robot.movel((0,0,0.1,0,0,0), relative=True) rob.movel((0,0,0.1,0,0,0), relative=True)
except RobotError, ex: except RobotError, ex:
print("Robot could not execute move (emergency stop for example), do something", ex) print("Robot could not execute move (emergency stop for example), do something", ex)
``` ```