Skip to content

Commit 2d52636

Browse files
committed
Improve limit check popup
- Restrict text to avoid too long popup text messages - Make the popup a warning - Show full step in logs
1 parent 0f6b513 commit 2d52636

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

resources/external_control.urscript

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,23 @@ def targetWithinLimits(step_start, step_end, time):
9999
while idx < 6:
100100
local velocity = norm(step_end[idx] - step_start[idx]) / time
101101
if velocity > JOINT_IGNORE_SPEED:
102-
local str = str_cat(str_cat("Velocity ", velocity), str_cat(str_cat(" required to reach the received target ", step_end), str_cat(str_cat(" within ", time), " seconds is exceeding the joint velocity limits. Ignoring commands until a valid command is received.")))
102+
local str = str_cat(
103+
str_cat("Velocity ", velocity), str_cat(
104+
str_cat(" required in joint ", idx), str_cat(
105+
str_cat(" to go from ", step_start[idx]), str_cat(
106+
str_cat(" to ", step_end[idx]), str_cat(
107+
str_cat(" within ", time), " seconds is exceeding the joint velocity limits. Ignoring commands until a valid command is received.")))))
103108
if violation_popup_counter == 0:
104109
# We want a popup when an invalid commant is sent. As long as we keep sending invalid
105110
# commands, we do not want to repeat the popup.
106-
popup(str, title="External Control error", blocking=False, error=True)
111+
popup(str, title="External Control speed limit", blocking=False, warning=True)
107112
end
108113
if violation_popup_counter * get_steptime() % 5.0 == 0:
109114
# We want to have a log printed regularly. We are receiving motion commands that are not
110115
# feasible. The user should have a chance to know about this.
111116
textmsg(str)
117+
textmsg("start configuration: ", step_start)
118+
textmsg("end configuration: ", step_end)
112119
end
113120
violation_popup_counter = violation_popup_counter + 1
114121
return False

0 commit comments

Comments
 (0)