72 lines
1.5 KiB
Python
72 lines
1.5 KiB
Python
import traceback
|
|
|
|
robot.task_create("simulateEvents",3, name = "test", priority = 20)
|
|
|
|
step = 0
|
|
try:
|
|
while(True):
|
|
start = time.time()
|
|
step = 1
|
|
robot.is_powered()
|
|
step = 2
|
|
robot.get_task_status("test")
|
|
step = 3
|
|
robot.get_monitor_speed()
|
|
step = 4
|
|
#robot.set_monitor_speed(20)
|
|
#robot.enable()
|
|
step = 5
|
|
#robot.disable()
|
|
step = 6
|
|
robot.is_calibrated()
|
|
step = 7
|
|
robot.read_working_mode()
|
|
step = 8
|
|
robot.get_emergency_stop_sts()
|
|
step = 9
|
|
robot.get_safety_fault_signal()
|
|
step = 10
|
|
robot.stop()
|
|
step = 11
|
|
robot.resume()
|
|
step = 12
|
|
robot.reset_motion()
|
|
step = 13
|
|
robot.is_empty()
|
|
step = 14
|
|
robot.is_settled()
|
|
step = 15
|
|
robot.get_move_id()
|
|
step = 16
|
|
robot.set_move_id(10)
|
|
step = 17
|
|
robot.get_joint_forces()
|
|
step = 18
|
|
#robot.open_tool("gripper")
|
|
#robot.close_tool("gripper")
|
|
robot.herej()
|
|
step = 19
|
|
robot.distance_t("t", "t")
|
|
step = 20
|
|
robot.distance_p("p", "p")
|
|
step = 21
|
|
robot.compose( "p", "world", "t")
|
|
step = 22
|
|
robot.here("gripper", "world")
|
|
step = 23
|
|
robot.joint_to_point("gripper", "world", "j")
|
|
step = 24
|
|
robot.point_to_joint("gripper", "j", "p")
|
|
step = 25
|
|
robot.position("p", "world")
|
|
step = 26
|
|
robot.mount(1, 2)
|
|
#print time.time()-start
|
|
except:
|
|
print >> sys.stderr, traceback.format_exc()
|
|
finally:
|
|
print "Step: " + str(step)
|
|
try:
|
|
robot.task_kill("test")
|
|
except:
|
|
pass |