This commit is contained in:
@@ -30,21 +30,20 @@ def move_home():
|
||||
wait_end_of_move()
|
||||
|
||||
def move_to_laser():
|
||||
robot.reset_motion()
|
||||
tool = robot.tool
|
||||
d = robot.get_distance_to_pnt("pLaser")
|
||||
if d<0:
|
||||
raise Exception ("Error calculating distance to laser: " + str(d))
|
||||
if d<POSITION_TOLERANCE:
|
||||
print "FROM LASER"
|
||||
robot.reset_motion()
|
||||
robot.movel("pLaser", robot.tool, DESC_SCAN, sync = True)
|
||||
return
|
||||
d = robot.get_distance_to_pnt("pLaserAppro")
|
||||
d = robot.get_distance_to_pnt("pLaserHome")
|
||||
if d<0:
|
||||
raise Exception ("Error calculating distance to laser appro: " + str(d))
|
||||
if d<POSITION_TOLERANCE:
|
||||
print "FROM APPRO"
|
||||
robot.reset_motion()
|
||||
robot.movel("pLaser", robot.tool, DESC_SCAN, sync = True)
|
||||
return
|
||||
d = robot.get_distance_to_pnt("pHome")
|
||||
@@ -52,8 +51,7 @@ def move_to_laser():
|
||||
raise Exception ("Error calculating distance to home: " + str(d))
|
||||
if d<POSITION_TOLERANCE:
|
||||
print "FROM HOME"
|
||||
robot.reset_motion()
|
||||
robot.movel("pLaserAppro", robot.tool, DESC_DEFAULT)
|
||||
robot.movej("pLaserHome", robot.tool, DESC_DEFAULT)
|
||||
robot.movel("pLaser", robot.tool, DESC_SCAN, sync = True)
|
||||
return
|
||||
raise Exception ("Must be in home position to start move to laser")
|
||||
|
||||
Reference in New Issue
Block a user