@@ -103,37 +103,35 @@ def close_program(self):
103
103
104
104
self .client .disconnect ()
105
105
106
- def change_gripper_state (self , state : bool ):
106
+ def change_gripper_state (self ):
107
107
"""
108
108
Switch gripper on/off.
109
-
110
- Args:
111
- state (bool): If the gripper should be turned on or off.
112
109
"""
113
110
114
- self .Gripper_State .set_value (opcua .ua .DataValue (state ))
111
+ self .Gripper_State .set_value (opcua .ua .DataValue (True ))
112
+ self .Gripper_State .set_value (opcua .ua .DataValue (False ))
115
113
if self .verbose :
116
- print ("[INFO] Gripper state is {}." . format ( state ) )
114
+ print ("[INFO] Toggled gripper." )
117
115
118
- def change_conveyor_right (self , conv_right : bool ):
116
+ def change_conveyor_right (self ):
119
117
"""
120
118
Switch conveyor right direction on/off.
121
-
122
- Args:
123
- conv_right (bool): If the conveyor should be turned on or off in the right direction.
124
119
"""
125
120
126
- self .Conveyor_Right .set_value (opcua .ua .DataValue (conv_right ))
121
+ self .Conveyor_Right .set_value (opcua .ua .DataValue (True ))
122
+ self .Conveyor_Right .set_value (opcua .ua .DataValue (False ))
123
+ if self .verbose :
124
+ print ("[INFO] Toggled conveyor belt." )
127
125
128
- def change_conveyor_left (self , conv_left : bool ):
126
+ def change_conveyor_left (self ):
129
127
"""
130
128
Switch conveyor left direction on/off.
131
-
132
- Args:
133
- conv_left (bool): If the conveyor should be turned on or off in the left direction.
134
129
"""
135
130
136
- self .Conveyor_Left .set_value (opcua .ua .DataValue (conv_left ))
131
+ self .Conveyor_Left .set_value (opcua .ua .DataValue (True ))
132
+ self .Conveyor_Left .set_value (opcua .ua .DataValue (False ))
133
+ if self .verbose :
134
+ print ("[INFO] Toggled conveyor belt." )
137
135
138
136
def set_trajectory (
139
137
self ,
@@ -329,13 +327,13 @@ def control_server(self, pipe: multiprocessing.connection.PipeConnection):
329
327
data = input .data
330
328
331
329
if command == RcCommand .GRIPPER :
332
- self .change_gripper_state (data )
330
+ self .change_gripper_state ()
333
331
334
332
elif command == RcCommand .CONVEYOR_LEFT :
335
- self .change_conveyor_left (data )
333
+ self .change_conveyor_left ()
336
334
337
335
elif command == RcCommand .CONVEYOR_RIGHT :
338
- self .change_conveyor_right (data )
336
+ self .change_conveyor_right ()
339
337
340
338
elif command == RcCommand .CONTINUE_PROGRAM :
341
339
self .continue_program ()
0 commit comments