RoboDK Forum
Setting/determining the speed of the TCP- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+ - - -论坛:通用RoboDK问题(//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK)
+--- Thread: Setting/determining the speed of the TCP (/Thread-Setting-determining-the-speed-of-the-TCP)



Setting/determining the speed of the TCP-NelsonV-07-14-2021

I am trying to accurately simulate the cycle time of my process using a UR10e and I found documentation stating that 1000 mm/sec is the typical max speed for the TCP of a UR10e. Is it accurate to set the robot speed (using set speed) to 1000 mm/sec to simulate the TCP moving at 1000 mm/sec or is there a different way to simulate how fast the TCP would be moving.

Thank you!


RE: Setting/determining the speed of the TCP-Vineet-07-14-2021

Hello,

You can calculate the distance between the previous point and the present point. And if you know the time in between, you will get the TCP speed at that time.
Attached script does the same.


Code:
def joints_changed(j1, j2, tolerance=0.0001):
"""Returns True if joints 1 and joints 2 are different"""
if j1 is None or j2 is None:
return True

for j1,j2 in zip(j1,j2):
if abs(j1-j2) > tolerance:
return True

return False

joints_last = None
t_last = None
tcp_xyz_last = None


# Infinite loop to calculate speed
while True:
# If we are connected, this retrieves the position of the real robot
# (blocks until it receives an update from the real robot)
joints = robot.Joints().list()
if joints_changed(joints, joints_last):
# Get the TCP with respect to the coordinate system
# (the robot position was just updated from the real robot using Joints())
tcp_xyz = robot.Pose().Pos()

t = time.time()
if t_last is not None: # Skip the first update
# Calculate delta time (s) and delta travel (mm)
d_time = t - t_last
# d_time = d_time * RDK.SimulationSpeed() # adjust for real time when simulating
d_move = norm(subs3(tcp_xyz, tcp_xyz_last))
if d_time > 0:
speed = d_move / d_time
print("TCP speed (mm/s): %.1f" % speed)

joints_last = joints
tcp_xyz_last = tcp_xyz
t_last = t

Run the script, and then run any program on your station or on your real robot if connected to a real robot. Keep in mind the time interval of obtaining pose from the actual robot isevery 4 ms.

You can read more about Cycle Time here://www.sinclairbody.com/doc/en/General.html#CycleTime


RE: Setting/determining the speed of the TCP-Jeremy-07-20-2021

Juste take a look at this video:https://www.youtube.com/watch?app=desktop&v=08udQJTlM9g&feature=youtu.be

Jeremy