pymycobot 3.5.0.dev11__tar.gz → 3.5.0.dev12__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.
- {pymycobot-3.5.0.dev11/pymycobot.egg-info → pymycobot-3.5.0.dev12}/PKG-INFO +1 -1
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/__init__.py +1 -1
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/error.py +27 -6
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercury_api.py +4 -3
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/robot_info.py +10 -2
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12/pymycobot.egg-info}/PKG-INFO +1 -1
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/LICENSE +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/MANIFEST.in +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/README.md +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/Interface.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/bluet.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/close_loop.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/common.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/conveyor_api.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/dualcobotx.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/elephantrobot.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/generate.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/genre.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/log.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mecharm.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mecharm270.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mecharmsocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercury.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercury_arms_socket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercury_ros_api.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercurychassis.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercurychassis_api.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mercurysocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myagv.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarm.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarm_api.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarmc.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarmm.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarmm_control.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/myarmsocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mybuddy.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mybuddybluetooth.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mybuddyemoticon.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mybuddysocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot280.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot280socket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot280x5pi.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot320.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobot320socket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobotpro630.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mycobotsocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mypalletizer.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mypalletizer260.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/mypalletizersocket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/pro400.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/pro400client.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/pro630.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/pro630client.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/progripper.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/protocol_packet_handler.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/public.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/sms.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/tool_coords.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/ultraArm.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot/utils.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot.egg-info/SOURCES.txt +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot.egg-info/dependency_links.txt +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot.egg-info/requires.txt +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/pymycobot.egg-info/top_level.txt +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/requirements.txt +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/setup.cfg +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/setup.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/__init__.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/conftest.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/rasp_myArm_test_gui.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/rasp_mycobot_test_gui.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/rasp_mypall_test_gui.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/special_angles.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/test_api.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/test_generator.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/test_socket.py +0 -0
- {pymycobot-3.5.0.dev11 → pymycobot-3.5.0.dev12}/tests/test_utils.py +0 -0
|
@@ -87,7 +87,7 @@ if sys.platform == "linux":
|
|
|
87
87
|
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
|
|
88
88
|
__all__.append("MyBuddyEmoticon")
|
|
89
89
|
|
|
90
|
-
__version__ = "3.5.
|
|
90
|
+
__version__ = "3.5.0dev12"
|
|
91
91
|
__author__ = "Elephantrobotics"
|
|
92
92
|
__email__ = "weiquan.xu@elephantrobotics.com"
|
|
93
93
|
__git_url__ = "https://github.com/elephantrobotics/pymycobot"
|
|
@@ -93,16 +93,26 @@ def check_value_type(parameter, value_type, exception_class, _type):
|
|
|
93
93
|
"The acceptable parameter {} should be an {}, but the received {}".format(parameter, _type, value_type))
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
def check_coords(value, robot_limit, class_name, exception_class):
|
|
96
|
+
def check_coords(value, robot_limit, class_name, exception_class, serial_port=None):
|
|
97
97
|
if not isinstance(value, list):
|
|
98
98
|
raise exception_class("`coords` must be a list.")
|
|
99
99
|
if len(value) != 6:
|
|
100
100
|
raise exception_class("The length of `coords` must be 6.")
|
|
101
|
+
if serial_port:
|
|
102
|
+
if serial_port == "/dev/left_arm":
|
|
103
|
+
min_coord = robot_limit[class_name]["left_coords_min"]
|
|
104
|
+
max_coord = robot_limit[class_name]["left_coords_max"]
|
|
105
|
+
elif serial_port == "/dev/right_arm":
|
|
106
|
+
min_coord = robot_limit[class_name]["right_coords_min"]
|
|
107
|
+
max_coord = robot_limit[class_name]["right_coords_max"]
|
|
108
|
+
else:
|
|
109
|
+
min_coord = robot_limit[class_name]["coords_min"]
|
|
110
|
+
max_coord = robot_limit[class_name]["coords_max"]
|
|
101
111
|
for idx, coord in enumerate(value):
|
|
102
|
-
if not
|
|
112
|
+
if not min_coord[idx] <= coord <= max_coord[idx]:
|
|
103
113
|
raise exception_class(
|
|
104
114
|
"Has invalid coord value, error on index {0}. received {3} .but angle should be {1} ~ {2}.".format(
|
|
105
|
-
idx,
|
|
115
|
+
idx, min_coord, max_coord, coord
|
|
106
116
|
)
|
|
107
117
|
)
|
|
108
118
|
|
|
@@ -316,15 +326,26 @@ def calibration_parameters(**kwargs):
|
|
|
316
326
|
|
|
317
327
|
elif parameter == 'coord':
|
|
318
328
|
index = kwargs.get('coord_id', None) - 1
|
|
319
|
-
|
|
329
|
+
serial_port = kwargs.get('serial_port', None)
|
|
330
|
+
if serial_port == "/dev/left_arm":
|
|
331
|
+
min_coord = robot_limit[class_name]["left_coords_min"][index]
|
|
332
|
+
max_coord = robot_limit[class_name]["left_coords_max"][index]
|
|
333
|
+
elif serial_port == "/dev/right_arm":
|
|
334
|
+
min_coord = robot_limit[class_name]["right_coords_min"][index]
|
|
335
|
+
max_coord = robot_limit[class_name]["right_coords_max"][index]
|
|
336
|
+
else:
|
|
337
|
+
min_coord = robot_limit[class_name]["coords_min"][index]
|
|
338
|
+
max_coord = robot_limit[class_name]["coords_max"][index]
|
|
339
|
+
if value < min_coord or value > min_coord:
|
|
320
340
|
raise MercuryDataException(
|
|
321
341
|
"The coord value of {} exceeds the limit, and the limit range is {} ~ {}".format(
|
|
322
|
-
value,
|
|
342
|
+
value, min_coord, max_coord
|
|
323
343
|
)
|
|
324
344
|
)
|
|
325
345
|
elif parameter == 'coords':
|
|
346
|
+
serial_port = kwargs.get('serial_port', None)
|
|
326
347
|
check_coords(value, robot_limit, class_name,
|
|
327
|
-
MercuryDataException)
|
|
348
|
+
MercuryDataException, serial_port)
|
|
328
349
|
|
|
329
350
|
elif parameter == 'speed':
|
|
330
351
|
if not 1 <= value <= 100:
|
|
@@ -167,7 +167,8 @@ class MercuryCommandGenerator(DataProcessor):
|
|
|
167
167
|
ProtocolCode.JOG_BASE_INCREMENT_COORD,
|
|
168
168
|
ProtocolCode.WRITE_MOVE_C,
|
|
169
169
|
ProtocolCode.JOG_RPY,
|
|
170
|
-
ProtocolCode.WRITE_MOVE_C_R
|
|
170
|
+
ProtocolCode.WRITE_MOVE_C_R,
|
|
171
|
+
ProtocolCode.MERCURY_DRAG_TECH_EXECUTE] and self.sync_mode:
|
|
171
172
|
wait_time = 300
|
|
172
173
|
is_in_position = True
|
|
173
174
|
big_wait_time = True
|
|
@@ -984,7 +985,7 @@ class MercuryCommandGenerator(DataProcessor):
|
|
|
984
985
|
speed (int): 1 ~ 100
|
|
985
986
|
"""
|
|
986
987
|
self.calibration_parameters(
|
|
987
|
-
class_name=self.__class__.__name__, coord_id=coord_id, coord=coord, speed=speed)
|
|
988
|
+
class_name=self.__class__.__name__, coord_id=coord_id, coord=coord, speed=speed, serial_port=self._serial_port.port)
|
|
988
989
|
if coord_id < 4:
|
|
989
990
|
coord = self._coord2int(coord)
|
|
990
991
|
else:
|
|
@@ -1000,7 +1001,7 @@ class MercuryCommandGenerator(DataProcessor):
|
|
|
1000
1001
|
speed (int): 1 ~ 100
|
|
1001
1002
|
"""
|
|
1002
1003
|
self.calibration_parameters(
|
|
1003
|
-
class_name=self.__class__.__name__, coords=coords, speed=speed)
|
|
1004
|
+
class_name=self.__class__.__name__, coords=coords, speed=speed, serial_port=self._serial_port.port)
|
|
1004
1005
|
coord_list = []
|
|
1005
1006
|
for idx in range(3):
|
|
1006
1007
|
coord_list.append(self._coord2int(coords[idx]))
|
|
@@ -231,14 +231,22 @@ class RobotLimit:
|
|
|
231
231
|
"angles_min":[-165, -55, -173, -165, -20, -180, -60, -138],
|
|
232
232
|
"angles_max":[165, 95, 5, 165, 265, 180, 0, 188],
|
|
233
233
|
"coords_min":[-351.11, -272.12, -262.91, -180, -180, -180],
|
|
234
|
-
"coords_max":[566.92, 645.91, 655.13, 180, 180, 180]
|
|
234
|
+
"coords_max":[566.92, 645.91, 655.13, 180, 180, 180],
|
|
235
|
+
"left_coords_min":[-351.11, -272.12, -262.91, -180, -180, -180],
|
|
236
|
+
"left_coords_max":[566.92, 645.91, 655.13, 180, 180, 180],
|
|
237
|
+
"right_coords_min":[-351.11, -645.91, -262.91, -180, -180, -180],
|
|
238
|
+
"right_coords_max":[566.92, 272.12, 655.13, 180, 180, 180]
|
|
235
239
|
},
|
|
236
240
|
"MercurySocket":{
|
|
237
241
|
"joint_id":[1,2,3,4,5,6,11,12],
|
|
238
242
|
"angles_min":[-165, -55, -173, -165, -20, -180, -60, -138],
|
|
239
243
|
"angles_max":[165, 95, 5, 165, 265, 180, 0, 188],
|
|
240
244
|
"coords_min":[-351.11, -272.12, -262.91, -180, -180, -180],
|
|
241
|
-
"coords_max":[566.92, 645.91, 655.13, 180, 180, 180]
|
|
245
|
+
"coords_max":[566.92, 645.91, 655.13, 180, 180, 180],
|
|
246
|
+
"left_coords_min":[-351.11, -272.12, -262.91, -180, -180, -180],
|
|
247
|
+
"left_coords_max":[566.92, 645.91, 655.13, 180, 180, 180],
|
|
248
|
+
"right_coords_min":[-351.11, -645.91, -262.91, -180, -180, -180],
|
|
249
|
+
"right_coords_max":[566.92, 272.12, 655.13, 180, 180, 180]
|
|
242
250
|
},
|
|
243
251
|
"MyCobot": {
|
|
244
252
|
"id": [1, 2, 3, 4, 5, 6, 7],
|
|
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
|
|
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
|
|
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
|