The below code works perfectly without any problem. The problem I find is the movement is not smooth. If I remove the time between commands the robot does not moves. The python code does not behaves like the pendant. Is there a way not to use the timer in between commands, and movements are smooth.
import socket
import time
tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp_socket.connect((“10.232.49.5”, 30002))
tcp_command = ‘set_digital_out(2, True)\n’
tcp_socket.send(str.encode(tcp_command))
time.sleep(3)
#global Waypoint_1_q = [-0.07097226778139287, -2.0622245273985804, 2.2466591040240687, -1.7546187839903773, -1.562280003224508, -0.05255490938295537]
start_point = “movel([-0.07097226778139287, -2.0622245273985804, 2.2466591040240687, -1.7546187839903773, -1.562280003224508, -0.05255490938295537], a=1.2, v=0.1)\n”
tcp_socket.send(str.encode(start_point))
time.sleep(3)
approach = “movel([0.04418822377920151, -1.6160809002318324, 2.214836899434225, -2.1689473591246546, -1.5629714171039026, 0.06623820215463638], a=1.2, v=0.1)\n”
tcp_socket.send(str.encode(approach))
time.sleep(3)
Waypoint_2 = “movel([0.02882671356201172, -1.4694293302348633, 2.212179485951559, -2.312949319879049, -1.5635736624347132, 0.05195114389061928], a=1.2, v=0.05)\n”
tcp_socket.send(str.encode(Waypoint_2))
time.sleep(3)
tcp_command = ‘set_digital_out(2, False)\n’
tcp_socket.send(str.encode(tcp_command))
tcp_socket.close()