@@ -14,7 +14,8 @@ class Eva:
14
14
def __init__ (self , host_ip , token , request_timeout = 5 , renew_period = 60 * 20 ):
15
15
parsed_host_ip = strip_ip (host_ip )
16
16
17
- self .__http_client = EvaHTTPClient (parsed_host_ip , token , request_timeout = request_timeout , renew_period = renew_period )
17
+ self .__http_client = EvaHTTPClient (parsed_host_ip , token , request_timeout = request_timeout ,
18
+ renew_period = renew_period )
18
19
self .__logger = logging .getLogger ('evasdk.Eva:{}' .format (host_ip ))
19
20
20
21
self .__eva_locker = EvaWithLocker (self )
@@ -41,11 +42,13 @@ def __exit__(self, type, value, traceback):
41
42
# --------------------------------------------- HTTP HANDLERS ---------------------------------------------
42
43
def api_call_with_auth (self , method , path , payload = None , headers = {}, timeout = None , version = 'v1' ):
43
44
self .__logger .debug ('Eva.api_call_with_auth {} {}' .format (method , path ))
44
- return self .__http_client .api_call_with_auth (method , path , payload = payload , headers = headers , timeout = timeout , version = version )
45
+ return self .__http_client .api_call_with_auth (method , path , payload = payload , headers = headers , timeout = timeout ,
46
+ version = version )
45
47
46
48
def api_call_no_auth (self , method , path , payload = None , headers = {}, timeout = None , version = 'v1' ):
47
49
self .__logger .debug ('Eva.api_call_no_auth {} {}' .format (method , path ))
48
- return self .__http_client .api_call_no_auth (method , path , payload = payload , headers = headers , timeout = timeout , version = version )
50
+ return self .__http_client .api_call_no_auth (method , path , payload = payload , headers = headers , timeout = timeout ,
51
+ version = version )
49
52
50
53
51
54
# Global
@@ -197,9 +200,11 @@ def control_go_to(self, joints, wait_for_ready=True, max_speed=None, time_sec=No
197
200
self .__logger .info ('Eva.control_go_to called' )
198
201
if mode == 'teach' :
199
202
with self .__eva_locker .set_renew_period (Eva .__TEACH_RENEW_PERIOD ):
200
- return self .__http_client .control_go_to (joints , wait_for_ready = wait_for_ready , max_speed = max_speed , time_sec = time_sec , mode = mode )
203
+ return self .__http_client .control_go_to (joints , wait_for_ready = wait_for_ready , max_speed = max_speed ,
204
+ time_sec = time_sec , mode = mode )
201
205
else :
202
- return self .__http_client .control_go_to (joints , wait_for_ready = wait_for_ready , max_speed = max_speed , time_sec = time_sec , mode = mode )
206
+ return self .__http_client .control_go_to (joints , wait_for_ready = wait_for_ready , max_speed = max_speed ,
207
+ time_sec = time_sec , mode = mode )
203
208
204
209
205
210
def control_pause (self , wait_for_paused = True ):
@@ -233,9 +238,11 @@ def calc_forward_kinematics(self, joints, fk_type='both', tcp_config=None):
233
238
return self .__http_client .calc_forward_kinematics (joints , fk_type = fk_type , tcp_config = tcp_config )
234
239
235
240
236
- def calc_inverse_kinematics (self , guess , target_position , target_orientation , tcp_config = None ):
241
+ def calc_inverse_kinematics (self , guess , target_position , target_orientation , tcp_config = None ,
242
+ orientation_type = None ):
237
243
self .__logger .debug ('Eva.calc_inverse_kinematics called' )
238
- return self .__http_client .calc_inverse_kinematics (guess , target_position , target_orientation , tcp_config = tcp_config )
244
+ return self .__http_client .calc_inverse_kinematics (guess , target_position , target_orientation ,
245
+ tcp_config = tcp_config , orientation_type = orientation_type )
239
246
240
247
241
248
def calc_nudge (self , joints , direction , offset , tcp_config = None ):
0 commit comments