When you click “OK” and save a waypoint, a few different bits of data are stored to ensure the robot can behave as closely to how you would expect as possible. It will save: the waypoint in the base coordinate system, the feature data when the waypoint was saved, the name of the feature when saved, as well as the joint positions when the waypoint was saved (this is only used for movej calculations). You can see this when you run a program with a point saved in a coordinate system. Below is the URScript of a program with a waypoint saved in a feature, Plane_1. Plane_1 is set to be a feature with coordinates p[0.1, 0.2, 0.3, 0, 0, 0]
.
global Waypoint_1_p=p[-.189631536923, -.609683881651, .260971148694, 1.195733634588, 2.889959482257, .051068157969]
global Waypoint_1_q=[-1.6006999999999998, -1.7271, -2.2029999999999994, -0.8079999999999998, 1.5951, -0.030999999999999694]
while (True):
$ 2 "Robot Program"
$ 3 "MoveL"
$ 4 "Waypoint_1" "breakAfter"
set_tcp(p[0.0,0.0,0.0,0.0,0.0,0.7853981633974483])
movel(pose_trans(Plane_1, pose_trans(p[-0.1, -0.2, -0.3, 0, 0, 0], Waypoint_1_p)), a=1.2, v=0.25)
end
You can see that to move to waypoint 1, the robot applies 2 pose trans functions. the innermost is pose_trans(inv(Plane_1), waypoint_1_p)
This returns where the waypoint was in its frame, when it was saved, in the frames original data, i.e. how to get to waypoint_1 in Plane_1. This is done in case the selected frame is changed and a different one selected, or in case the frame itself is retaught. The second pose_trans
then moves to that position, in the coordinate system of the currently selected feature, which in this case is still Plane_1
. This is done so that if the feature is changed, the robot will still move to th same position in the new coordinate system.
If you want to fetch your positions in their respective features, you can do that by mimicking the first pose trans. If you have a pose in base that you want to convert to a different coordinate system, you do the following
pose_trans(pose_inv(system), pos)
I hope this helps