UniversalRobots / Universal_Robots_Client_Library

A C++ library for accessing the UR interfaces that facilitate the use of UR robotic manipulators by external applications.
Apache License 2.0
117 stars 86 forks source link

Interpolation on robot gives discontinuous motion when speed scaling is active #194

Closed urmahp closed 5 months ago

urmahp commented 6 months ago

When using the spline interpolation on the robot with speed scaling active, there is a discontinuous motion. The reason for this is that the target joint velocity is used when calculating the next spline in the trajectory see here and here, but when speed scaling is active the target velocity is no longer the same velocity as the velocity in the trajectory. This means that the spline will be wrongly calculated and this results in a discontinuous motion, because the robot slows down before speeding up in the beginning of each spline within the trajectory.

There is also another issue with the spline interpolation on the robot. Within the interpolation speedj command is called with the target joint velocities calculated from the spline interpolation and an acceleration of 1000. This large acceleration can make the joints noisy, due to the acceleration spikes every time speedj is called.