I have a camera attached to the flange and I want to rotate it in place on the Rz direction only.
The TCP setting is as follows.
The program below rotates it up to 179deg at 1deg per movej to one direction.
Go back to original position and rotate to 179deg at 1deg per movej to the opposite direction.
$ 2 "ロボットプログラム"
$ 3 "MoveJ"
$ 4 "home" "breakAfter"
movej(home, a=1.3962634015954636, v=1.0471975511965976)
$ 5 "loop_counter:=1"
global loop_counter=1
$ 6 "ループ loop_counter≤179"
while (loop_counter <= 179):
$ 7 "pose:=pose_trans(get_actual_tcp_pose(), p[0,0,0,0,0,d2r(1)])"
global pose= pose_trans ( get_actual_tcp_pose (), p[0,0,0,0,0, d2r (1)])
$ 8 "movej(pose, a=1.2, v=0.5)"
movej(pose, a=1.2, v=0.5)
$ 9 "loop_counter:=loop_counter+1"
global loop_counter=loop_counter+1
end
$ 10 "MoveJ"
$ 11 "home" "breakAfter"
movej(home, a=1.3962634015954636, v=1.0471975511965976)
$ 12 "loop_counter:=-1"
global loop_counter=-1
$ 13 "ループ loop_counter≥-179"
while (loop_counter >= -179):
$ 14 "pose:=pose_trans(get_actual_tcp_pose(), p[0,0,0,0,0,d2r(-1)])"
global pose= pose_trans ( get_actual_tcp_pose (), p[0,0,0,0,0, d2r (-1)])
$ 15 "movej(pose, a=1.2, v=0.5)"
movej(pose, a=1.2, v=0.5)
$ 16 "loop_counter:=loop_counter-1"
global loop_counter=loop_counter-1
end
It rotates as expected until it comes to a certain point where it switches the position of the robot arm.
In the gif below, the robot arm starts above the flange and pivots to below the flange.
If I restart the program with the robot arm starting below the flange, it pivots to above the flange instead.
・I have tried teaching fixed waypoints with 45degree intervals and movej between them and this pivot movement does not occur.
・I have tried changing it to movel and it still occurs.
Does someone know how to rotate in the TCP Rz direction only while preventing the pivot movement in the gif above?