I have a situation in my KRL program where I try to move "forward" (+x in my situation) with respect to the current hand orientation, meaning the robot should move in the direction that the tool on the hand is pointing. I have two questions:
1. How do I do this? I have tried setting the $TOOL variable's a, b and c rotations to hold the values of the $POS_ACT variable. In my mind, this should rotate the tool to be aligned with the current hand orientation. However, when I do a relative PTP command after that, it will move relative to the world axes (while also doing a slight rotation, which I do not comprehend). If I do not change the $TOOL variable at all, the relative PTP command will also result in a movement relative to the world axes (while not doing any rotation).
2. When jogging in T1 mode, using the +x button does exactly what I want to do. It moves relative to the current hand orientation. When watching the "current position" window while doing the jogging, I can however see that it does a complex change in x, y and z coordinates. Why is the behavior of T1 mode different than in the program, using relative PTP commands?
I think I am missing some fundamental property of the way coordinate systems are handled in jogging vs. automatic mode. Please enlighten me!