Home› Programming
Discussion
Back to discussions page
rstuart
Posts: 5 Apprentice
Move Safe |
115 views
|
Answered | |
/ Most recent by rstuart
in Programming
|
3 comments |

I am working on my first UR project. I need the ability to read joint positions and have the robot use thise positions to move to a safe start point as to not collide with anything. Can someone help me with the best way of doing this? Thanks!
Tagged:
- Read current position, save in
variable
- Define
new pose variable
The example is having the robot only change in the Z direction.BeforeStartSequence
cp = get_actual_tcp_pose()
z = cp[2]
safe_pos = p[cp[0], cp[1], 0.4, cp[3], cp[4], cp[5]]
Wait 1
MoveL
safe_pos
Robot Program
Halt
If you have your home position in before start then change it to a relative position instead of fixed position. The robot would not home unless this was set, unsure why.
Set these as installation variables.
RobotTracker
currentSubProg
Below is a portion of the program which is relevant to the homing of the robot.
currentSubProg≔1