Skip to content

Commit 40394ba

Browse files
anla-xuwangWkingK-Shuffler
authored
release v4.0.3 (#226)
* Feat/ultra arm p1 api (#205) * feat(P1-api):P1 adapts to basic motion interface * refactor(P1-Api): The class name is renamed to UltraArmP1 * feat(ultraArm P1): P1 Control interface adds closed-loop position feedback * perf(ultraArm P1): P1 Control interface adds closed-loop position feedback * feat(P1): Control interface adds closed-loop switch parameters * fix(320-Api):Fixed the abnormal return value issue of the three-finger/force-controlled gripper reading interface * Fix/pro320 api (#213) * feat(P1-api):P1 adapts to basic motion interface * refactor(P1-Api): The class name is renamed to UltraArmP1 * feat(ultraArm P1): P1 Control interface adds closed-loop position feedback * perf(ultraArm P1): P1 Control interface adds closed-loop position feedback * feat(P1): Control interface adds closed-loop switch parameters * fix(320-Api):Fixed the abnormal return value issue of the three-finger/force-controlled gripper reading interface * Fixed MyAGVPro known bugs (#217) * add MyCobot 280 X5PI API * add MyCobot 280 X5 PI doc * Fix MyCobot 280 X5 Pi doc errors * add MyCobot 280 X5 PI sokcet sever&client * MyCobot 280 X5 PI server compatible with python2 * rename MyCobot280x5pi to MyCobot280RDKX5 * fix MyArmMControl bugs * fix MyArmC bugs * fix myArmM&C demo bug * update M&C demo * fix MyCobot280 rdkx5 bug * fix MyArmM&C bugs * fix bugs * fix bug * fix ThreeHand api bug * Fixed the issue that Pro630 could not read data * fix MyArmM bug * MyArmM&C adds get_joints_coord interface * fix Pro630 bug * fix Pro630 bugs * Fixed the pro630 socket communication bug * Optimize MyCobot280 RDK X5 interface parameter error prompt * Optimized the way MyAGV reads MCU data * feat(myagvpro): add myagvpro api * fix(ConveyorApi):Fix the problem that no data is returned * feat(MyAGVPro): Adapt to Bluetooth and socket TCP communication modes * docs(MyAGVPro): Format the document * docs(MyAGVPro): Documentation to increase use cases * docs(MyAGVPro): rename MyAGVPro_zh.md * docs(MyAGVPro): Update the serial port * fix(MyArmM): Correction of joint limit and motor code value range * feat(MyAGVPro): Add get_emergency_stop_state api * feat(MyAGVPro): Add get_emergency_stop_state api * refactor(MyAGVPro): rename get_emergency_stop_state to get_estop_state * feat(MyAgv): Added setting/reading automatic report status interface * fix(M750):Updated M750 Swing Limit * fix(MyAGVPro): The issue that Bluetooth address matching fails is fixed * feat(myagvpro): add get_robot_status api * feat(demo):Add myAGVPro composite kit handle control case * feat(MercuryX1): Compatible with dock firmware version 1.2 * feat(mercurychassis_api): Dynamically matching instruction length * feat(mercurychassis_api): Optimize voltage reading accuracy * feat(ConveyorApi): Separate the set_motor_speed interface * feat(ConveyorApi): Specify the motor type during initialization * refactor(conveyorApi): add stop interface * Develop branch merge (#196) * 添加pid设置demo * chore: Add a custom pylint configuration file --------- Co-authored-by: weiquan * feat(conveyor_api): Adapt to Conveyor 1.1 firmware, all interfaces return uniform values * feat(AGVPRO): Adapt to CH340 serial port chip * feat(AGVPRO): Automatically upload the adapter firmware v1.0.10 * feat(AGVPRO): Added the control interface for opening and closing the handle * feat(AGVPRO): Added an interface for reading handle control status * feat(AGVPRO): Bluetooth adapter handle control interface * fix(mercury): Fix the redundant code in the previous commit * fix(Mercury): Resolved server communication issues affecting both arms * fix(MyAGVPro): Fixed the issue that some interfaces did not return * fix(MyAGVPro): Fixed the interface parameter verification error issue * refactor(MyAGVPro): Optimize get_robot_statuts interface return --------- Co-authored-by: Mrkun5018 <76215701+Mrkun5018@users.noreply.github.com> Co-authored-by: weiquan <55946925+anla-xu@users.noreply.github.com> * Fix/p340 api (#216) * fix(P340): Fixed the play_gcode_file interface stuck issue * fix(P340): Fixed the play_gcode_file interface stuck issue,remove thread lock * fix(P340-Api): Fixed the play_gcode_file interface stuck issue * Fix/p340 api (#220) * fix(pro450): fix some test interface bugs * fix(pro450-api): Fixed the problem of some interface parameters exceeding the limit * fix(pro450-api): Fixed the problem of is_in_position() interface parameters exceeding the limit * fix(pro450-api): Fixed the problem of some interface parameters exceeding the limit * feat(pro450-API):Add settings and get communication mode interface, waiting for machine verification * feat(pro450-api):Added custom protocol document interface, pending machine verification * feat(pro450-api):Added custom protocol document interface, pending machine verification * docs(pro450-api): update API use * docs(pro450-api): update API use * fix(pro450-api): fix some interfaces * fix(pro450-api): fix some interfaces * feat(pro450-api):Added dynamic parameter identification interface * docs(pro450-api): update API use, remove some API * feat(pro450-api):Added kinematic algorithm inverse solution interface and repaired closed loop mechanism, closed loop by default * docs(pro450-api): update API use * fix(pro450-api): fix some Api * feat(pro450-api): add go_home() Api * fix(pro450-API): solve_inv_kinematics interface adds parameter range detection * fix(P340-api): fix test API bug * fix(pro450-api):fix some api bug * docs(pro450-api): update API use * fix(pro450-api):Fixed some interface test bugs * docs(pro450-api): update API use * fix(pro450-api): Repair the bottom external device related interface and sports mode interface * fix(pro450-api): Repair the bottom external device related interface and sports mode interface * fix(pro450-api):Repair the bottom external device interface * fix(pro450-api): fix some api bugs * fix(pro450-api): Fixed the issue of refresh mode returning -1 * perf(pro450-api):Optimize the log module to prevent repeated printing of logs * fix(pro450-api): Increase the parameter range of the log mode setting interface * fix(pro450-api): Restore the parameter range of the log mode setting interface (#221) * feat: release v4.0.2 * Fix/p340 api (#223) * fix(p340-api):fix jog_coord api * fix(p340-api): fix speed range * fix(p340-api):fix gripper speed range * fix(280-api): fix some API parameter range (#225) --------- Co-authored-by: wangWking <93129711+wangWking@users.noreply.github.com> Co-authored-by: K-Shuffler <76215701+K-Shuffler@users.noreply.github.com> Co-authored-by: Mrkun5018 <76215701+Mrkun5018@users.noreply.github.com>
1 parent b77bb8f commit 40394ba

File tree

9 files changed

+2574
-975
lines changed

9 files changed

+2574
-975
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ repos:
66
name: commit checking
77
stages: [commit-msg]
88

9-
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
# Ruff version.
11-
rev: v0.12.10
12-
hooks:
13-
# Run the linter.
14-
- id: ruff-check
15-
types_or: [ python, pyi ]
16-
args: [ --fix ]
17-
# Run the formatter.
18-
- id: ruff-format
19-
types_or: [ python, pyi ]
9+
# - repo: https://github.com/astral-sh/ruff-pre-commit
10+
# # Ruff version.
11+
# rev: v0.12.10
12+
# hooks:
13+
# # Run the linter.
14+
# - id: ruff-check
15+
# types_or: [ python, pyi ]
16+
# args: [ --fix ]
17+
# # Run the formatter.
18+
# - id: ruff-format
19+
# types_or: [ python, pyi ]
2020

2121
# - repo: local
2222
# hooks:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ChangeLog for pymycobot
22

3+
## v4.0.3 (2025-11-6)
4+
5+
- release v4.0.3
6+
- Fix bugs
7+
38
## v4.0.2 (2025-10-20)
49

510
- release v4.0.2

pymycobot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"UltraArmP1",
105105
]
106106

107-
__version__ = "4.0.2"
107+
__version__ = "4.0.3"
108108
__author__ = "Elephantrobotics"
109109
__email__ = "weiquan.xu@elephantrobotics.com"
110110
__git_url__ = "https://github.com/elephantrobotics/pymycobot"

pymycobot/error.py

Lines changed: 2320 additions & 853 deletions
Large diffs are not rendered by default.

pymycobot/generate.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ def is_in_position(self, data, id=0):
222222
0 - False\n
223223
-1 - Error
224224
"""
225+
self.calibration_parameters(class_name=self.__class__.__name__, position_id=id)
225226
if id == 1:
226227
self.calibration_parameters(class_name=self.__class__.__name__, coords=data)
227228
data_list = []
@@ -232,8 +233,6 @@ def is_in_position(self, data, id=0):
232233
elif id == 0:
233234
self.calibration_parameters(class_name=self.__class__.__name__, angles=data)
234235
data_list = [self._angle2int(i) for i in data]
235-
else:
236-
raise Exception("id is not right, please input 0 or 1")
237236

238237
return self._mesg(ProtocolCode.IS_IN_POSITION, data_list, id, has_reply=True)
239238

pymycobot/mycobot280.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def jog_rpy(self, end_direction, direction, speed, _async=False):
391391
direction (int): 1 - forward rotation, 0 - reverse rotation
392392
speed (int): 1 ~ 100
393393
"""
394-
self.calibration_parameters(class_name=self.__class__.__name__, end_direction=end_direction, speed=speed)
394+
self.calibration_parameters(class_name=self.__class__.__name__, end_direction=end_direction, direction=direction, speed=speed)
395395
return self._mesg(ProtocolCode.JOG_ABSOLUTE, end_direction, direction, speed, _async=_async)
396396

397397
def jog_increment_angle(self, joint_id, increment, speed, _async=False):
@@ -402,8 +402,10 @@ def jog_increment_angle(self, joint_id, increment, speed, _async=False):
402402
increment: Angle increment value
403403
speed: int (0 - 100)
404404
"""
405-
self.calibration_parameters(class_name=self.__class__.__name__, id=joint_id, speed=speed)
406-
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, [self._angle2int(increment)], speed, _async=_async)
405+
self.calibration_parameters(class_name=self.__class__.__name__, id=joint_id, increment_angle=increment, speed=speed)
406+
scaled_increment = self._angle2int(increment)
407+
scaled_increment = max(min(scaled_increment, 32767), -32768)
408+
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, [scaled_increment], speed, _async=_async)
407409

408410
def jog_increment_coord(self, id, increment, speed, _async=False):
409411
"""coord step mode
@@ -413,8 +415,12 @@ def jog_increment_coord(self, id, increment, speed, _async=False):
413415
increment: Coord increment value
414416
speed: int (1 - 100)
415417
"""
416-
self.calibration_parameters(class_name=self.__class__.__name__, id=id, speed=speed)
417-
value = self._coord2int(increment) if id <= 3 else self._angle2int(increment)
418+
self.calibration_parameters(class_name=self.__class__.__name__, id=id, increment_coord=increment, speed=speed)
419+
if id <= 3:
420+
value = self._coord2int(increment)
421+
else:
422+
scaled_increment = self._angle2int(increment)
423+
value = max(min(scaled_increment, 32767), -32768)
418424
return self._mesg(ProtocolCode.JOG_INCREMENT_COORD, id, [value], speed, _async=_async)
419425

420426
def set_HTS_gripper_torque(self, torque):

pymycobot/mycobot280socket.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def jog_rpy(self, end_direction, direction, speed, _async=False):
385385
direction (int): 1 - forward rotation, 0 - reverse rotation
386386
speed (int): 1 ~ 100
387387
"""
388-
self.calibration_parameters(class_name=self.__class__.__name__, end_direction=end_direction, speed=speed)
388+
self.calibration_parameters(class_name=self.__class__.__name__, end_direction=end_direction, direction=direction, speed=speed)
389389
return self._mesg(ProtocolCode.JOG_ABSOLUTE, end_direction, direction, speed, _async=_async)
390390

391391
def jog_increment_angle(self, joint_id, increment, speed, _async=False):
@@ -396,8 +396,10 @@ def jog_increment_angle(self, joint_id, increment, speed, _async=False):
396396
increment: Angle increment value
397397
speed: int (0 - 100)
398398
"""
399-
self.calibration_parameters(class_name=self.__class__.__name__, id=joint_id, speed=speed)
400-
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, [self._angle2int(increment)], speed, _async=_async)
399+
self.calibration_parameters(class_name=self.__class__.__name__, id=joint_id, increment_angle=increment, speed=speed)
400+
scaled_increment = self._angle2int(increment)
401+
scaled_increment = max(min(scaled_increment, 32767), -32768)
402+
return self._mesg(ProtocolCode.JOG_INCREMENT, joint_id, [scaled_increment], speed, _async=_async)
401403

402404
def jog_increment_coord(self, id, increment, speed, _async=False):
403405
"""coord step mode
@@ -407,8 +409,12 @@ def jog_increment_coord(self, id, increment, speed, _async=False):
407409
increment: Coord increment value
408410
speed: int (1 - 100)
409411
"""
410-
self.calibration_parameters(class_name=self.__class__.__name__, id=id, speed=speed)
411-
value = self._coord2int(increment) if id <= 3 else self._angle2int(increment)
412+
self.calibration_parameters(class_name=self.__class__.__name__, id=id, increment_coord=increment, speed=speed)
413+
if id <= 3:
414+
value = self._coord2int(increment)
415+
else:
416+
scaled_increment = self._angle2int(increment)
417+
value = max(min(scaled_increment, 32767), -32768)
412418
return self._mesg(ProtocolCode.JOG_INCREMENT_COORD, id, [value], speed, _async=_async)
413419

414420
def set_HTS_gripper_torque(self, torque):

pymycobot/robot_info.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ class RobotLimit:
295295
},
296296
"MyCobot280": {
297297
"id": [1, 2, 3, 4, 5, 6],
298+
"coord_id": [1, 2, 3, 4, 5, 6],
298299
"angles_min": [-168, -140, -150, -150, -155, -180],
299300
"angles_max": [168, 140, 150, 150, 160, 180],
300-
"coords_min": [-350, -350, -70, -180, -180, -180],
301-
"coords_max": [350, 350, 523.9, 180, 180, 180]
301+
"coords_min": [-281.45, -281.45, -70, -180, -180, -180],
302+
"coords_max": [281.45, 281.45, 412.67, 180, 180, 180]
302303
},
303304
"MyCobot280RDK-X5": {
304305
"joint_id": [1, 2, 3, 4, 5, 6],
@@ -311,6 +312,7 @@ class RobotLimit:
311312
},
312313
"MyCobot280Socket": {
313314
"id": [1, 2, 3, 4, 5, 6],
315+
"coord_id": [1, 2, 3, 4, 5, 6],
314316
"angles_min": [-168, -140, -150, -150, -155, -180],
315317
"angles_max": [168, 140, 150, 150, 160, 180],
316318
"coords_min": [-281.45, -281.45, -70, -180, -180, -180],

0 commit comments

Comments
 (0)