I am trying to send commands to move the robot externally through a socket. Is there a way to know if the robot is still moving or if it has reached its destination?
Thank you in advance.
Can you get the joint angle of the robot in real time? If so, is it possible to judge the state of the robot based on the difference between the real-time joint angle and the target angle? If the difference between the two is less than the threshold you set, it is considered that the robot has reached the target point. Instead, it is assumed that the robot is moving. Maybe this method is not accurate, but I think you can try it.
When the robot is moving the program state is set to running. You can use that to flag if the robot is stationary or not.
I am assuming you are talking about robotmode. If that is the case, I am pretty sure the program state stays at “running” even if the robot isn’t moving.
If not, can you please provide me with more info about the program state that you mentioned?
No, it’s called Program State,
if you look at the client interfaces excel file, it is located under RealTime in row 38. (min version 3.2).
It returns the status of the program, if a program is running or not. So basically, paused, stopped, and running.
RobotMode return the status of robot, so it returns the following information:
You could use yet another socket, to call the “is_steady()” URScript function on the secondary interface.
Which should tell you if the robot arm is at rest.
This is quite useful if your program is a continues while loop, reacting on different socket commands. because then then you would always have (programstate == running) even if the Arm is steady/still.
How will the result of is_steady() get sent back to us, since the secondary port constantly sends the robot info?
If possible, can you show me a snippet of the code of reading the response?
look at the following sample:
Specificly the scriptSender and scriptExpoter files found here: