Hi Forum,
I send the following script to create a MoveL action and at the same time stream converted positions to Double Output Regsiters.
“def moving_and_streaming():
thread send_position():
while(True):
local position = pose_trans(pose_inv(p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408]),get_actual_tcp_pose())
write_output_float_register(0, position[0])
write_output_float_register(1, position[1])
write_output_float_register(2, position[2])
write_output_float_register(3, position[3])
write_output_float_register(4, position[4])
write_output_float_register(5, position[5])
sync()
end
end
run send_position()
movel(pose_add(get_target_waypoint(),pose_sub(pose_trans(p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408],p[0.010000000,0.000000000,0.000000000,0,0,0]),p[0.4885084332082746,0.22652484714191604,0.3729249328877672,0.7542408940800382,-0.7560928630197719,-1.439516258072408])), a=1, v=0.030)
end”
Both parts of this command (Streaming and Moving) work fine. the issue is that once the Robot stops moving, I have to wait minimum 200 ms before sending the next MoveL command. Otherwise the robot will go into a maniac state until it hits a wall.
For those who have more scripting experience, Can you spot any issues in here ? Do I cause some race conditions or something ? Because I need the robot to perform consecutive MoveL commands almost without delay.
Thanks,
Ali