I am using a UR5e with an application that requires the robot to follow a precomputed joint trajectory as closely as possible. During execution, the end effector is subject to external forces, which sometimes cause deviations from the path. When this deviation grows too large, the controller raises error C153 (Position deviates from path) and triggers a protective stop.
Currently, I am using ServoJ for position control. For my application, perfect tracking accuracy is not critical — what matters is that the robot completes the trajectory without being interrupted by protective stops.
From the logs (photo below), I see the following behavior: the current limit saturates first, then the position deviation accumulates to about 1°, at which point the protective stop is triggered.
Is it possible to increase the position deviation threshold (i.e., allow larger tracking errors before triggering C153)?
To my understanding, this threshold is not the same as the configurable bounds in Safety → Joint Limits, which only constrain the absolute joint ranges.
Any insights or workarounds would be greatly appreciated.
PS:
I have read this related post, the threshold parameter in position_deviation_warning can only change when a log is saved, but having an impact on when a protective stop is triggered.
I am also aware of the Cartesian controller that allows compliant control on tracking an End Effector path, but what I want here is kinda similar to compliant control in joint space while tracking a joint path.
This is probably more complex than I initially think it is. But my first thought would be to ask if you have experimented with the force commands? These commands allow force in the selected direction, but may cause deviation where you don’t need it. I would be curious to know if that would solve some issues or if a deeper solution is needed.
This is only for triggering warnings in the log (they can be watched in the Log tab) that the robot is nearing a protective stop. They do not affect the protective stop threshold.
The only way to affect it is to raise the Safety Settings. But you’re limited in this regard, too.
Universal Robots robots are not built to ignore these settings, and I don’t think it’s possible to do so. You can play around with the Force command, as mentioned.
The only option is to raise the safety limits to least restricted. The parameter you wish to change cannot be changed directly. As others mentioned you can do a few things to monitor how close you are to triggering a protective stop but if you are generating a path externally and then using servoj and these paths are dynamic (changing based on other external sensors) then these techniques will only provide limited success and you would need to be able to change the path in real-time to compensate.
I’ve seen this happening too, even when no unexpected external forces were present. In my situation I’m using an UR30 with the UnderAutomation C# api with RTDE v2 and a control loop containing a servoj command. The best solution I’ve been able to find so far is to keep the “t” (command duration time) above 0.01 seconds. 0.05 seems stable. This is strange because my RTDE frequency is 500 Hz, so much lower “t” values should be possible. Values as low as 0.002.
So there’s obviously something I haven’t figured out. My “gain” is 100 and I’ve tried different look-ahead times. Only the “t” value seems to help avoiding the robot going into red or yellow error states.