Skip to content

Commit bb0a735

Browse files
ipa-kutkut
andauthored
Prefixing ExternalControl to log messages (UniversalRobots#222)
Co-authored-by: kut <[email protected]>
1 parent c3ed998 commit bb0a735

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ur_robot_driver/resources/ros_control.urscript

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
steptime = get_steptime()
44

5-
textmsg("steptime=", steptime)
5+
textmsg("ExternalControl: steptime=", steptime)
66
MULT_jointstate = {{JOINT_STATE_REPLACE}}
77

88
#Constants
@@ -41,7 +41,7 @@ def extrapolate():
4141
end
4242

4343
thread servoThread():
44-
textmsg("Starting servo thread")
44+
textmsg("ExternalControl: Starting servo thread")
4545
state = SERVO_IDLE
4646
while control_mode == MODE_SERVOJ:
4747
enter_critical
@@ -73,7 +73,7 @@ thread servoThread():
7373
end
7474
exit_critical
7575
end
76-
textmsg("servo thread ended")
76+
textmsg("ExternalControl: servo thread ended")
7777
stopj(4.0)
7878
end
7979

@@ -84,12 +84,12 @@ def set_speed(qd):
8484
end
8585

8686
thread speedThread():
87-
textmsg("Starting speed thread")
87+
textmsg("ExternalControl: Starting speed thread")
8888
while control_mode == MODE_SPEEDJ:
8989
qd = cmd_servo_qd
9090
speedj(qd, 40.0, steptime)
9191
end
92-
textmsg("speedj thread ended")
92+
textmsg("ExternalControl: speedj thread ended")
9393
stopj(5.0)
9494
end
9595

@@ -98,7 +98,7 @@ socket_open("{{SERVER_IP_REPLACE}}", {{SERVER_PORT_REPLACE}}, "reverse_socket")
9898
control_mode = MODE_UNINITIALIZED
9999
thread_move = 0
100100
global keepalive = -2
101-
textmsg("External control active")
101+
textmsg("ExternalControl: External control active")
102102
params_mult = socket_read_binary_integer(1+6+1, "reverse_socket")
103103
keepalive = params_mult[1]
104104
while keepalive > 0 and control_mode > MODE_STOPPED:
@@ -129,8 +129,8 @@ while keepalive > 0 and control_mode > MODE_STOPPED:
129129
exit_critical
130130
end
131131

132-
textmsg("Stopping communication and control")
132+
textmsg("ExternalControl: Stopping communication and control")
133133
control_mode = MODE_STOPPED
134134
join thread_move
135-
textmsg("All threads ended")
135+
textmsg("ExternalControl: All threads ended")
136136
socket_close("reverse_socket")

0 commit comments

Comments
 (0)