ArtusAPI 1.3.11__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.
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/artus_api.py +34 -14
- ArtusAPI-1.3.13/ArtusAPI/communication/__init__.py +1 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/communication/communication.py +0 -1
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/PKG-INFO +8 -2
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/entry_points.txt +1 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/requires.txt +1 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/PKG-INFO +8 -2
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/README.md +7 -1
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/setup.py +4 -1
- ArtusAPI-1.3.11/ArtusAPI/communication/__init__.py +0 -1
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/commands/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/commands/commands.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/communication/UART/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/communication/UART/uart.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/communication/WiFi/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/communication/WiFi/wifi_server.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/firmware_updater.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/firmware_update/run_full_firmware_update.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_left.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus_left.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_plus_right.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/artus_lite/artus_lite_right.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/robot/robot.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/sensors/ForceSensor.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI/sensors/__init__.py +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/SOURCES.txt +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/dependency_links.txt +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/ArtusAPI.egg-info/top_level.txt +0 -0
- {ArtusAPI-1.3.11 → ArtusAPI-1.3.13}/setup.cfg +0 -0
|
@@ -21,7 +21,7 @@ print(desired_path)
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
from .communication import Communication
|
|
24
|
+
from .communication import Communication
|
|
25
25
|
from .commands import Commands
|
|
26
26
|
from .robot import Robot
|
|
27
27
|
from .firmware_update import FirmwareUpdater
|
|
@@ -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:
|
|
@@ -110,7 +112,7 @@ class ArtusAPI:
|
|
|
110
112
|
self._communication_handler.send_data(robot_wake_up_command)
|
|
111
113
|
|
|
112
114
|
# wait for data back
|
|
113
|
-
if self._communication_handler.wait_for_ack(
|
|
115
|
+
if self._communication_handler.wait_for_ack():
|
|
114
116
|
self.logger.info(f'Finished calibration')
|
|
115
117
|
else:
|
|
116
118
|
self.logger.warning(f'Error in calibration')
|
|
@@ -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(
|
|
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(
|
|
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,
|
|
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 -
|
|
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(
|
|
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(
|
|
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('
|
|
543
|
-
|
|
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
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .communication import Communication
|
|
@@ -199,7 +199,6 @@ class Communication:
|
|
|
199
199
|
self.logger.info(f'ack received in {time.perf_counter() - start_time} seconds')
|
|
200
200
|
return 1
|
|
201
201
|
elif tmp == value:
|
|
202
|
-
self.logger.info(f'Artus Version {rc_csum[0]}.{rc_csum[1]}')
|
|
203
202
|
self.logger.info(f'ack received in {time.perf_counter() - start_time} seconds')
|
|
204
203
|
return 1
|
|
205
204
|
time.sleep(0.01)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ArtusAPI
|
|
3
|
-
Version: 1.3.
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ArtusAPI
|
|
3
|
-
Version: 1.3.
|
|
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.
|
|
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
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .communication import Communication,STARTUP_ACK,NORMAL_ACK
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|