ArtusAPI 1.0.0__tar.gz → 1.0.1__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 (27) hide show
  1. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/artus_api.py +19 -3
  2. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/commands/commands.py +37 -1
  3. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI.egg-info/PKG-INFO +1 -7
  4. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI.egg-info/SOURCES.txt +1 -2
  5. {ArtusAPI-1.0.0 → artusapi-1.0.1}/PKG-INFO +1 -7
  6. {ArtusAPI-1.0.0 → artusapi-1.0.1}/README.md +18 -11
  7. {ArtusAPI-1.0.0 → artusapi-1.0.1}/setup.py +1 -1
  8. ArtusAPI-1.0.0/test/test.py +0 -0
  9. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/__init__.py +0 -0
  10. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/commands/__init__.py +0 -0
  11. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/UART/__init__.py +0 -0
  12. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/UART/uart.py +0 -0
  13. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/WiFi/__init__.py +0 -0
  14. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/WiFi/wifi_server.py +0 -0
  15. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/__init__.py +0 -0
  16. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/communication/communication.py +0 -0
  17. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/firmware_update/__init__.py +0 -0
  18. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/firmware_update/firmware_updater.py +0 -0
  19. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/__init__.py +0 -0
  20. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/artus_lite/__init__.py +0 -0
  21. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/artus_lite/artus_lite.py +0 -0
  22. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/artus_lite/artus_lite_left.py +0 -0
  23. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/artus_lite/artus_lite_right.py +0 -0
  24. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI/robot/robot.py +0 -0
  25. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI.egg-info/dependency_links.txt +0 -0
  26. {ArtusAPI-1.0.0 → artusapi-1.0.1}/ArtusAPI.egg-info/top_level.txt +0 -0
  27. {ArtusAPI-1.0.0 → artusapi-1.0.1}/setup.cfg +0 -0
@@ -64,7 +64,12 @@ class ArtusAPI:
64
64
  """
65
65
  Open a connection to the Artus Hand
66
66
  """
67
- return self._communication_handler.open_connection()
67
+ self._communication_handler.open_connection()
68
+
69
+ time.sleep(1)
70
+ # send wake command with it
71
+ return self.wake_up()
72
+
68
73
  def disconnect(self):
69
74
  """
70
75
  Close a connection to the Artus Hand
@@ -87,7 +92,7 @@ class ArtusAPI:
87
92
  if self._communication_handler.wait_for_ack():
88
93
  self.logger.info(f'Finished calibration')
89
94
  else:
90
- self.logger.warn(f'Error in calibration')
95
+ self.logger.warning(f'Error in calibration')
91
96
 
92
97
  def sleep(self):
93
98
  """
@@ -106,7 +111,7 @@ class ArtusAPI:
106
111
  if self._communication_handler.wait_for_ack():
107
112
  self.logger.info(f'Finished calibration')
108
113
  else:
109
- self.logger.warn(f'Error in calibration')
114
+ self.logger.warning(f'Error in calibration')
110
115
 
111
116
 
112
117
  # robot control
@@ -221,6 +226,17 @@ class ArtusAPI:
221
226
  hard_close = self._command_handler.get_hard_close_command(j,m)
222
227
  self._communication_handler.send_data(hard_close)
223
228
 
229
+ def update_param(self):
230
+ com = input('Enter Communication Protocol you would like to change to (default: UART, CAN, RS485): ')
231
+ if com == 'CAN':
232
+ feed = None
233
+ while feed not in ['P','C','ALL']:
234
+ feed = input('Enter feedback information (P: Positions only, C: Positions and Force, ALL: Position, force and temperature): ')
235
+ else:
236
+ feed = None
237
+ command = self._command_handler.update_param_command(com,feed)
238
+ self._communication_handler.send_data(command)
239
+
224
240
  def test_artus_api():
225
241
  artus_api = ArtusAPI()
226
242
  artus_api.connect()
@@ -13,6 +13,7 @@ class Commands:
13
13
 
14
14
  target_command = 0x66,
15
15
  get_feedback_command = 0x68,
16
+ update_param_command = 0x44,
16
17
 
17
18
  save_grasp_onboard_command = 0xC8,
18
19
  return_grasps_command = 0xD2,
@@ -30,7 +31,8 @@ class Commands:
30
31
  'get_feedback_command': get_feedback_command,
31
32
  'save_grasp_onboard_command': save_grasp_onboard_command,
32
33
  'return_grasps_command': return_grasps_command,
33
- 'execute_grasp_command': execute_grasp_command
34
+ 'execute_grasp_command': execute_grasp_command,
35
+ 'update_param_command' : update_param_command
34
36
  }
35
37
  self.reset_on_start = reset_on_start
36
38
 
@@ -129,6 +131,40 @@ class Commands:
129
131
  None
130
132
 
131
133
  return command_list
134
+
135
+ def update_param_command(self,communication='UART', feedback=None):
136
+ """
137
+ Communication Options:
138
+ 'UART' - USBC
139
+ 'RS485' - RS485
140
+ 'CAN' - CAN
141
+ Feedback Options (only if CAN):
142
+ 'ALL' - Positions,Currents,Temperatures
143
+ 'PC' - Positions,Currentns
144
+ 'P' - Positions
145
+ """
146
+ command_list = [0]*32
147
+ command_list.insert(0,self.commands['update_param_command'])
148
+
149
+ if communication:
150
+ command_list[1] = 1
151
+ if communication == 'UART':
152
+ command_list[1+16] = 1
153
+ elif communication == 'CAN':
154
+ command_list[1+16] = 2
155
+ elif communication == 'RS485':
156
+ command_list[1+16] = 3
157
+
158
+ if feedback:
159
+ command_list[2] = 1
160
+ if feedback == 'ALL':
161
+ command_list[2+16] = 2
162
+ elif feedback == 'PC':
163
+ command_list[2+16] = 1
164
+ elif feedback == 'P':
165
+ command_list[2+16] = 0
166
+
167
+ return command_list
132
168
 
133
169
 
134
170
  if __name__ == "__main__":
@@ -1,11 +1,5 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ArtusAPI
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: API to control Artus Family of Robots by Sarcomere Dynamics Inc
5
- Home-page: UNKNOWN
6
5
  Author: Sarcomere Dynamics Inc.
7
- License: UNKNOWN
8
- Platform: UNKNOWN
9
-
10
- UNKNOWN
11
-
@@ -21,5 +21,4 @@ ArtusAPI/robot/robot.py
21
21
  ArtusAPI/robot/artus_lite/__init__.py
22
22
  ArtusAPI/robot/artus_lite/artus_lite.py
23
23
  ArtusAPI/robot/artus_lite/artus_lite_left.py
24
- ArtusAPI/robot/artus_lite/artus_lite_right.py
25
- test/test.py
24
+ ArtusAPI/robot/artus_lite/artus_lite_right.py
@@ -1,11 +1,5 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ArtusAPI
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: API to control Artus Family of Robots by Sarcomere Dynamics Inc
5
- Home-page: UNKNOWN
6
5
  Author: Sarcomere Dynamics Inc.
7
- License: UNKNOWN
8
- Platform: UNKNOWN
9
-
10
- UNKNOWN
11
-
@@ -19,6 +19,8 @@ Please contact the team if there are any issues that arise through the use of th
19
19
  * [Interacting with the API](#interacting-with-the-api)
20
20
  * [Setting Joints](#setting-joints)
21
21
  * [Getting Feedback](#getting-feedback)
22
+ * [Controlling Multiple Hands](#controlling-multiple-hands)
23
+ * [Teleoperation Considerations](#teleoperation-considerations)
22
24
  * [Directory Structure](#directory-structure)
23
25
 
24
26
  ## Getting Started
@@ -113,6 +115,16 @@ There are two ways to get feedback data depending on how the class is instantiat
113
115
  1. In streaming mode (`stream = True`), after sending the `wake_up()` command, the system will start streaming feedback data which will populate the `ArtusAPI._robot_handler.robot.hand_joints` dictionary. Fields that hold feedback data are named with `feedback_X` where _X_ could be angle, current or temperature.
114
116
  2. In Request mode (`stream = False`), sending a `get_joint_angles()` command will request the feedback data before anything is sent from the Artus hand. This communication setting is slower than the streaming mode, but for testing purposes and getting familiar with the Artus hand, we recommend starting with this setting.
115
117
 
118
+ ### Controlling multiple hands
119
+ We can define two instances of hands with different `port` and `target_ssid`. In theory, it can spin up an unlimited amount of hands, bottlenecked by the amount of wifi controllers and COM ports associated with the machine. e.g.
120
+ ```python
121
+ artus_liteLeft = Artus3DAPI(target_ssid='Artus3DLH',port='/dev/ttyUSB0',communication_method='UART')
122
+ artus_liteRight = Artus3DAPI(target_ssid='Artus3DRH',port='/dev/ttyUSB1',communication_method='UART')
123
+ artusHands = [artus_liteLeft,artus_liteRight]
124
+ ```
125
+
126
+ ## Teleoperation Considerations
127
+ ** **IT IS IMPORTANT TO ADD A DELAY BETWEEN SENDING MESSAGES, CURRENT SUGGESTED FREQUENCY FOR BEST USE IS 10 Hz OR DELAY OF 0.1s** **
116
128
 
117
129
  ## Directory Structure
118
130
  ```bash
@@ -130,16 +142,11 @@ There are two ways to get feedback data depending on how the class is instantiat
130
142
  │   │   │   ├── artus_lite.py # Artus Lite Hand class
131
143
  │   │   ├── robot.py # Robot Hand class for the API
132
144
  │   ├── artus_api.py # API Core
133
-
134
- ├── data
135
- │   ├── grasp_poses
136
- │   ├── images
137
-
138
- ├── examples
139
- │   ├── example.py # Example usage of the API
140
145
  ```
141
146
 
142
- ## API Core
143
- ```python
144
- class ArtusAPI()
145
- ```
147
+ ## Revision Control
148
+ | Date | Revision | Description |
149
+ | :---: | :------: | :---------: |
150
+ | Nov. 14, 2023 | v1.0b | Initial release - Artus Lite Mk 5 |
151
+ | Apr. 23, 2024 | v1.1b | Beta release - Artus Lite Mk 6 |
152
+ | Oct. 9, 2024 | v1.0 | Artus Lite Release |
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='ArtusAPI',
5
- version='1.0.0',
5
+ version='1.0.1',
6
6
  description='API to control Artus Family of Robots by Sarcomere Dynamics Inc',
7
7
  # package_dir={'': '/'}, # tells setuptools that your packages are under src
8
8
  packages=find_packages(exclude=['data*', 'examples*', 'tests*','venv*']),
File without changes
File without changes
File without changes