Skip to content

Commit dd43ef9

Browse files
charlesworthCharlesworth
charlesworth
authored andcommitted
change contorl_goto arguement from time to time_sec to stop alias
1 parent 094c5ee commit dd43ef9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

evasdk/Eva.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ def control_run(self, loop=1, wait_for_ready=True, mode='teach'):
180180
return self.__http_client.control_run(loop=loop, wait_for_ready=wait_for_ready, mode=mode)
181181

182182

183-
def control_go_to(self, joints, wait_for_ready=True, max_speed=None, time=None, mode='teach'):
183+
def control_go_to(self, joints, wait_for_ready=True, max_speed=None, time_sec=None, mode='teach'):
184184
self.__logger.info('Eva.control_go_to called')
185185
if mode == 'teach':
186186
with self.__eva_locker.set_renew_period(Eva.__TEACH_RENEW_PERIOD):
187-
return self.__http_client.control_go_to(joints, wait_for_ready=wait_for_ready, max_speed=max_speed, time=time, mode=mode)
187+
return self.__http_client.control_go_to(joints, wait_for_ready=wait_for_ready, max_speed=max_speed, time_sec=time_sec, mode=mode)
188188
else:
189-
return self.__http_client.control_go_to(joints, wait_for_ready=wait_for_ready, max_speed=max_speed, time=time, mode=mode)
189+
return self.__http_client.control_go_to(joints, wait_for_ready=wait_for_ready, max_speed=max_speed, time_sec=time_sec, mode=mode)
190190

191191

192192
def control_pause(self, wait_for_paused=True):

evasdk/eva_http_client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,18 @@ def control_run(self, loop=1, wait_for_ready=True, mode='teach'):
329329
self.control_wait_for(RobotState.READY)
330330

331331

332-
def control_go_to(self, joints, wait_for_ready=True, max_speed=None, time=None, mode='teach'):
332+
def control_go_to(self, joints, wait_for_ready=True, max_speed=None, time_sec=None, mode='teach'):
333333
body = {'joints': joints, 'mode': mode}
334334
if max_speed is not None:
335335
body['max_speed'] = max_speed
336-
elif time is not None:
337-
body['time'] = time
336+
if time is not None:
337+
body['time'] = time_sec
338338

339339
r = self.api_call_with_auth('POST', 'controls/go_to', json.dumps(body))
340340
if r.status_code != 200:
341341
eva_error('control_go_to error', r)
342342
elif wait_for_ready:
343-
time.sleep(0.1) # sleep for small period to avoid race condition between updating cache and reading state
343+
time.sleep(0.1) # sleep for small period to avoid race condition between cache updating and reading state
344344
self.control_wait_for(RobotState.READY)
345345

346346

0 commit comments

Comments
 (0)