ArtusAPI 1.3.12__tar.gz → 1.3.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/artus_api.py +32 -12
  2. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/PKG-INFO +8 -2
  3. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/entry_points.txt +1 -0
  4. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/requires.txt +1 -0
  5. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/PKG-INFO +8 -2
  6. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/README.md +7 -1
  7. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/setup.py +4 -1
  8. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/__init__.py +0 -0
  9. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/commands/__init__.py +0 -0
  10. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/commands/commands.py +0 -0
  11. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/UART/__init__.py +0 -0
  12. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/UART/uart.py +0 -0
  13. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/WiFi/__init__.py +0 -0
  14. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/WiFi/wifi_server.py +0 -0
  15. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/__init__.py +0 -0
  16. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/communication/communication.py +0 -0
  17. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/__init__.py +0 -0
  18. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/firmware_updater.py +0 -0
  19. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/run_full_firmware_update.py +0 -0
  20. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/__init__.py +0 -0
  21. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/__init__.py +0 -0
  22. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite.py +0 -0
  23. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_left.py +0 -0
  24. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus.py +0 -0
  25. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus_left.py +0 -0
  26. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus_right.py +0 -0
  27. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_right.py +0 -0
  28. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/robot/robot.py +0 -0
  29. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/sensors/ForceSensor.py +0 -0
  30. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI/sensors/__init__.py +0 -0
  31. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/SOURCES.txt +0 -0
  32. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/dependency_links.txt +0 -0
  33. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/top_level.txt +0 -0
  34. {ArtusAPI-1.3.12 → ArtusAPI-1.3.13}/setup.cfg +0 -0
@@ -76,6 +76,8 @@ class ArtusAPI:
76
76
  # only used during streaming
77
77
  self.last_command_recv_time = time.perf_counter()
78
78
 
79
+ self.last_times = [self._last_command_sent_time,self.last_streamed_feedback_time]
80
+
79
81
  if not logger:
80
82
  self.logger = logging.getLogger(__name__)
81
83
  else:
@@ -165,7 +167,7 @@ class ArtusAPI:
165
167
  self._robot_handler.set_joint_angles(joint_angles=joint_angles,name=name)
166
168
  robot_set_joint_angles_command = self._command_handler.get_target_position_command(self._robot_handler.robot.hand_joints)
167
169
  # check communication frequency
168
- if not self._check_communication_frequency(self._last_command_sent_time):
170
+ if not self._check_communication_frequency(0):
169
171
  return False
170
172
  return self._communication_handler.send_data(robot_set_joint_angles_command)
171
173
 
@@ -197,11 +199,11 @@ class ArtusAPI:
197
199
  self._robot_handler.set_home_position()
198
200
  robot_set_home_position_command = self._command_handler.get_target_position_command(hand_joints=self._robot_handler.robot.hand_joints)
199
201
  # check communication frequency
200
- if not self._check_communication_frequency(self._last_command_sent_time):
202
+ if not self._check_communication_frequency(0):
201
203
  return False
202
204
  return self._communication_handler.send_data(robot_set_home_position_command)
203
205
 
204
- def _check_communication_frequency(self,last_command_time):
206
+ def _check_communication_frequency(self,type:float):
205
207
  """
206
208
  checks if the time between the last command and the current command is less than the communication period
207
209
  Necessary so that the messages stay in sync
@@ -214,7 +216,7 @@ class ArtusAPI:
214
216
  :False if the time between the last command and the current command is less than the communication period
215
217
  """
216
218
  current_time = time.perf_counter()
217
- if current_time - last_command_time < self._communication_period:
219
+ if current_time - self.last_times[type] < self._communication_period:
218
220
  self.logger.warning("Command not sent. Communication frequency is too high.")
219
221
  return False
220
222
  last_command_time = current_time
@@ -254,7 +256,7 @@ class ArtusAPI:
254
256
  return
255
257
 
256
258
  feedback_command = self._receive_feedback()
257
- if not self._check_communication_frequency(self._last_command_sent_time):
259
+ if not self._check_communication_frequency(1):
258
260
  return None
259
261
  joint_angles = self._robot_handler.get_joint_angles(feedback_command)
260
262
  if joint_angles is None:
@@ -289,7 +291,7 @@ class ArtusAPI:
289
291
  self.logger.warning(f'Hand not ready, send `wake_up` command')
290
292
  return
291
293
 
292
- if not self._check_communication_frequency(self.last_streamed_feedback_time):
294
+ if not self._check_communication_frequency(1):
293
295
  return None
294
296
  else:
295
297
  feedback_command = self._communication_handler.receive_data()
@@ -539,13 +541,22 @@ def main():
539
541
  time.sleep(1)
540
542
 
541
543
  while(1):
542
- input_command = input('Enter command: ')
543
- if input_command == 'c1':
544
+ input_command = input('''
545
+ ====================
546
+ Flash CLI Tool Menu:
547
+ ====================
548
+ c - calibrate
549
+ h - (home) set home position
550
+ m - (move) set joint angles
551
+ q - quit
552
+ r - (reset) reset joint
553
+ p - (param) update communication method
554
+ w - wipe sd
555
+ Enter command: ''')
556
+ if input_command == 'c':
544
557
  myrobot.calibrate(calibration_type=1)
545
- elif input_command == 'c':
546
- myrobot.calibrate()
547
558
  elif input_command == 'h':
548
- myrobot.set_home_position()
559
+ myrobot.set_home_position(home_position=1)
549
560
  elif input_command == 'm':
550
561
  grasp_dict = {'thumb_spread': {'target_angle': 30}, 'thumb_d2': {'target_angle': 30}, 'thumb_flex': {'target_angle': 30},
551
562
  'index_d2': {'target_angle': 30}, 'index_flex': {'target_angle': 30},
@@ -562,10 +573,19 @@ def main():
562
573
  j = int(input('Enter joint number: '))
563
574
  m = int(input('Enter motor number: '))
564
575
  myrobot.reset(j,m)
576
+ elif input_command == 'p':
577
+ myrobot.update_param()
578
+ elif input_command == 'w':
579
+ myrobot.wipe_sd()
565
580
  else:
566
581
  print(f'Invalid command: {input_command}')
567
582
  time.sleep(1)
568
-
583
+ except KeyboardInterrupt:
584
+ print('Keyboard interrupt')
585
+ myrobot.sleep()
586
+ time.sleep(1)
587
+ myrobot.disconnect()
588
+ quit()
569
589
  except Exception as e:
570
590
  print(f"An error occurred: {str(e)}")
571
591
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ArtusAPI
3
- Version: 1.3.12
3
+ Version: 1.3.13
4
4
  Summary: API to control Artus Family of Robots by Sarcomere Dynamics Inc
5
5
  Home-page: https://sarcomeredynamics.com/home
6
6
  Author: Sarcomere Dynamics Inc.
@@ -23,6 +23,9 @@ Please contact the team if there are any issues that arise through the use of th
23
23
  >[!IMPORTANT]
24
24
  __Please read through the entire README and the _User Manual_ before using the ARTUS hand__
25
25
 
26
+ >[!Note]
27
+ >Please see [changelog folder](/changelog/) for monthly changelogs.
28
+
26
29
  The user manual contains in-depth operational and troubleshooting guidelines for the device.
27
30
 
28
31
  This repository contains the following:
@@ -90,7 +93,10 @@ The ArtusAPI is available via pip [here](https://pypi.org/project/ArtusAPI/) usi
90
93
  ```python
91
94
  pip install ArtusAPI
92
95
  ```
93
- Once this is complete, the software dependecies are all met!
96
+ Once this is complete, the software dependecies are all met!
97
+
98
+ >[!Note]
99
+ >Please make sure that the latest version of the pip package is installed.
94
100
 
95
101
  #### 1.2.2 Use Cloned Repository
96
102
  If you plan to eventually make changes to the source code, you will need to clone the GitHub *SARCOMERE_DYNAMICS_RESOURCES* repository. Once cloned, you can utilize the *requirements.txt* included in the package to install the dependencies. With a terminal open, execute the following command:
@@ -1,3 +1,4 @@
1
1
  [console_scripts]
2
+ artusapi = ArtusAPI.artus_api:main
2
3
  artusapiflash = ArtusAPI.artus_api:main_flash
3
4
 
@@ -2,4 +2,5 @@ esptool
2
2
  psutil==5.9.8
3
3
  pyserial==3.5
4
4
  pyyaml
5
+ requests
5
6
  tqdm
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ArtusAPI
3
- Version: 1.3.12
3
+ Version: 1.3.13
4
4
  Summary: API to control Artus Family of Robots by Sarcomere Dynamics Inc
5
5
  Home-page: https://sarcomeredynamics.com/home
6
6
  Author: Sarcomere Dynamics Inc.
@@ -23,6 +23,9 @@ Please contact the team if there are any issues that arise through the use of th
23
23
  >[!IMPORTANT]
24
24
  __Please read through the entire README and the _User Manual_ before using the ARTUS hand__
25
25
 
26
+ >[!Note]
27
+ >Please see [changelog folder](/changelog/) for monthly changelogs.
28
+
26
29
  The user manual contains in-depth operational and troubleshooting guidelines for the device.
27
30
 
28
31
  This repository contains the following:
@@ -90,7 +93,10 @@ The ArtusAPI is available via pip [here](https://pypi.org/project/ArtusAPI/) usi
90
93
  ```python
91
94
  pip install ArtusAPI
92
95
  ```
93
- Once this is complete, the software dependecies are all met!
96
+ Once this is complete, the software dependecies are all met!
97
+
98
+ >[!Note]
99
+ >Please make sure that the latest version of the pip package is installed.
94
100
 
95
101
  #### 1.2.2 Use Cloned Repository
96
102
  If you plan to eventually make changes to the source code, you will need to clone the GitHub *SARCOMERE_DYNAMICS_RESOURCES* repository. Once cloned, you can utilize the *requirements.txt* included in the package to install the dependencies. With a terminal open, execute the following command:
@@ -10,6 +10,9 @@ Please contact the team if there are any issues that arise through the use of th
10
10
  >[!IMPORTANT]
11
11
  __Please read through the entire README and the _User Manual_ before using the ARTUS hand__
12
12
 
13
+ >[!Note]
14
+ >Please see [changelog folder](/changelog/) for monthly changelogs.
15
+
13
16
  The user manual contains in-depth operational and troubleshooting guidelines for the device.
14
17
 
15
18
  This repository contains the following:
@@ -77,7 +80,10 @@ The ArtusAPI is available via pip [here](https://pypi.org/project/ArtusAPI/) usi
77
80
  ```python
78
81
  pip install ArtusAPI
79
82
  ```
80
- Once this is complete, the software dependecies are all met!
83
+ Once this is complete, the software dependecies are all met!
84
+
85
+ >[!Note]
86
+ >Please make sure that the latest version of the pip package is installed.
81
87
 
82
88
  #### 1.2.2 Use Cloned Repository
83
89
  If you plan to eventually make changes to the source code, you will need to clone the GitHub *SARCOMERE_DYNAMICS_RESOURCES* repository. Once cloned, you can utilize the *requirements.txt* included in the package to install the dependencies. With a terminal open, execute the following command:
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='ArtusAPI',
5
- version='1.3.12',
5
+ version='1.3.13',
6
6
  description='API to control Artus Family of Robots by Sarcomere Dynamics Inc',
7
7
  long_description=open('README.md').read(),
8
8
  long_description_content_type='text/markdown',
@@ -14,7 +14,9 @@ setup(
14
14
  'esptool',
15
15
  'pyyaml',
16
16
  'tqdm',
17
+ 'requests'
17
18
  ],
19
+ changelog=open('changelog/pip_changelog.md').read(),
18
20
  python_requires='>=3.10',
19
21
  url='https://sarcomeredynamics.com/home',
20
22
  project_urls={
@@ -24,6 +26,7 @@ setup(
24
26
  entry_points={
25
27
  'console_scripts': [
26
28
  'artusapiflash=ArtusAPI.artus_api:main_flash',
29
+ 'artusapi=ArtusAPI.artus_api:main',
27
30
  ],
28
31
  }
29
32
  )
File without changes