22
33steptime = get_steptime()
44
5- textmsg("steptime=", steptime)
5+ textmsg("ExternalControl: steptime=", steptime)
66MULT_jointstate = {{JOINT_STATE_REPLACE}}
77
88#Constants
@@ -41,7 +41,7 @@ def extrapolate():
4141end
4242
4343thread 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)
7878end
7979
@@ -84,12 +84,12 @@ def set_speed(qd):
8484end
8585
8686thread 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)
9494end
9595
@@ -98,7 +98,7 @@ socket_open("{{SERVER_IP_REPLACE}}", {{SERVER_PORT_REPLACE}}, "reverse_socket")
9898control_mode = MODE_UNINITIALIZED
9999thread_move = 0
100100global keepalive = -2
101- textmsg("External control active")
101+ textmsg("ExternalControl: External control active")
102102params_mult = socket_read_binary_integer(1+6+1, "reverse_socket")
103103keepalive = params_mult[1]
104104while keepalive > 0 and control_mode > MODE_STOPPED:
@@ -129,8 +129,8 @@ while keepalive > 0 and control_mode > MODE_STOPPED:
129129 exit_critical
130130end
131131
132- textmsg("Stopping communication and control")
132+ textmsg("ExternalControl: Stopping communication and control")
133133control_mode = MODE_STOPPED
134134join thread_move
135- textmsg("All threads ended")
135+ textmsg("ExternalControl: All threads ended")
136136socket_close("reverse_socket")
0 commit comments