xArm-Python-SDK 1.15.0__tar.gz → 1.16.0__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 (152) hide show
  1. xarm_python_sdk-1.16.0/.github/workflows/python-publish.yml +40 -0
  2. xarm_python_sdk-1.16.0/.gitignore +12 -0
  3. xarm_python_sdk-1.16.0/PKG-INFO +106 -0
  4. xarm_python_sdk-1.16.0/README.md +452 -0
  5. xarm_python_sdk-1.16.0/README.rst +78 -0
  6. xarm_python_sdk-1.16.0/ReleaseNotes.md +200 -0
  7. xarm_python_sdk-1.16.0/doc/UF_ModbusTCP_Manual.md +183 -0
  8. xarm_python_sdk-1.16.0/doc/api/xarm_api.md +3504 -0
  9. xarm_python_sdk-1.16.0/doc/api/xarm_api_code.md +185 -0
  10. xarm_python_sdk-1.16.0/doc/tool/gen_api.py +65 -0
  11. xarm_python_sdk-1.16.0/doc/tool/markdown_doc.py +208 -0
  12. xarm_python_sdk-1.16.0/example/wrapper/common/0000-template.py +65 -0
  13. xarm_python_sdk-1.16.0/example/wrapper/common/0001-event_register.py +86 -0
  14. xarm_python_sdk-1.16.0/example/wrapper/common/0002-get_property.py +81 -0
  15. xarm_python_sdk-1.16.0/example/wrapper/common/0003-api_get.py +59 -0
  16. xarm_python_sdk-1.16.0/example/wrapper/common/0004-servo_attach_detach.py +55 -0
  17. xarm_python_sdk-1.16.0/example/wrapper/common/1001-move_line.py +79 -0
  18. xarm_python_sdk-1.16.0/example/wrapper/common/1002-move_line.py +79 -0
  19. xarm_python_sdk-1.16.0/example/wrapper/common/1003-relative_move_line.py +63 -0
  20. xarm_python_sdk-1.16.0/example/wrapper/common/1004-move_arc_line.py +85 -0
  21. xarm_python_sdk-1.16.0/example/wrapper/common/1005-move_arc_line.py +66 -0
  22. xarm_python_sdk-1.16.0/example/wrapper/common/1006-move_tool_line.py +63 -0
  23. xarm_python_sdk-1.16.0/example/wrapper/common/1007-counter.py +95 -0
  24. xarm_python_sdk-1.16.0/example/wrapper/common/1008-move_line_aa.py +67 -0
  25. xarm_python_sdk-1.16.0/example/wrapper/common/1009-cartesian_velocity_control.py +71 -0
  26. xarm_python_sdk-1.16.0/example/wrapper/common/1010-cartesian_online_trajectory_planning.py +70 -0
  27. xarm_python_sdk-1.16.0/example/wrapper/common/2000-joint_velocity_control.py +66 -0
  28. xarm_python_sdk-1.16.0/example/wrapper/common/2006-joint_online_trajectory_planning.py +72 -0
  29. xarm_python_sdk-1.16.0/example/wrapper/common/3001-move_circle.py +67 -0
  30. xarm_python_sdk-1.16.0/example/wrapper/common/3002-record_trajectory.py +65 -0
  31. xarm_python_sdk-1.16.0/example/wrapper/common/3003-playback_trajectory.py +53 -0
  32. xarm_python_sdk-1.16.0/example/wrapper/common/3004-get_report_data.py +58 -0
  33. xarm_python_sdk-1.16.0/example/wrapper/common/3005-task_feedback.py +117 -0
  34. xarm_python_sdk-1.16.0/example/wrapper/common/3006-standard_modbus_tcp.py +66 -0
  35. xarm_python_sdk-1.16.0/example/wrapper/common/5000-set_tgpio_modbus.py +66 -0
  36. xarm_python_sdk-1.16.0/example/wrapper/common/5001-get_tgpio_digital.py +49 -0
  37. xarm_python_sdk-1.16.0/example/wrapper/common/5002-get_tgpio_analog.py +48 -0
  38. xarm_python_sdk-1.16.0/example/wrapper/common/5003-set_tgpio_digital.py +48 -0
  39. xarm_python_sdk-1.16.0/example/wrapper/common/5004-set_gripper.py +52 -0
  40. xarm_python_sdk-1.16.0/example/wrapper/common/5005-get_cgpio_digital_analog.py +43 -0
  41. xarm_python_sdk-1.16.0/example/wrapper/common/5006-set_cgpio_digital_analog.py +54 -0
  42. xarm_python_sdk-1.16.0/example/wrapper/common/5007-set_cgpio_input_output_function.py +54 -0
  43. xarm_python_sdk-1.16.0/example/wrapper/common/5008-get_cgpio_state.py +51 -0
  44. xarm_python_sdk-1.16.0/example/wrapper/common/5009-set_bio_gripper.py +49 -0
  45. xarm_python_sdk-1.16.0/example/wrapper/common/6001-set_reduced_mode.py +44 -0
  46. xarm_python_sdk-1.16.0/example/wrapper/common/6002-set_fense_mode.py +41 -0
  47. xarm_python_sdk-1.16.0/example/wrapper/common/7001-servo_j.py +65 -0
  48. xarm_python_sdk-1.16.0/example/wrapper/common/7002-servo_cartesian.py +69 -0
  49. xarm_python_sdk-1.16.0/example/wrapper/common/7003-servo_cartesian_aa.py +65 -0
  50. xarm_python_sdk-1.16.0/example/wrapper/common/8000-load_identify_current.py +58 -0
  51. xarm_python_sdk-1.16.0/example/wrapper/common/8001-force_tech.py +77 -0
  52. xarm_python_sdk-1.16.0/example/wrapper/common/8002-impedance.py +78 -0
  53. xarm_python_sdk-1.16.0/example/wrapper/common/8003-force_control.py +80 -0
  54. xarm_python_sdk-1.16.0/example/wrapper/common/8004-load_identify.py +87 -0
  55. xarm_python_sdk-1.16.0/example/wrapper/common/8005-read_force_data.py +58 -0
  56. xarm_python_sdk-1.16.0/example/wrapper/common/8006-save_force_zero.py +54 -0
  57. xarm_python_sdk-1.16.0/example/wrapper/common/8010-get_ft_sensor_config.py +72 -0
  58. xarm_python_sdk-1.16.0/example/wrapper/common/9000-set_linear_track.py +60 -0
  59. xarm_python_sdk-1.16.0/example/wrapper/common/get_report_data_with_protocol.py +73 -0
  60. xarm_python_sdk-1.16.0/example/wrapper/thridparty/set_robotiq_gripper.py +84 -0
  61. xarm_python_sdk-1.16.0/example/wrapper/thridparty/set_yinshi_gripper.py +59 -0
  62. xarm_python_sdk-1.16.0/example/wrapper/thridparty/set_yinshi_rh56_gripper.py +126 -0
  63. xarm_python_sdk-1.16.0/example/wrapper/tool/blockly_to_python.py +24 -0
  64. xarm_python_sdk-1.16.0/example/wrapper/tool/example.xml +66 -0
  65. xarm_python_sdk-1.16.0/example/wrapper/xarm5/2001-move_joint.py +82 -0
  66. xarm_python_sdk-1.16.0/example/wrapper/xarm5/2002-move_joint.py +82 -0
  67. xarm_python_sdk-1.16.0/example/wrapper/xarm5/2003-move_joint.py +82 -0
  68. xarm_python_sdk-1.16.0/example/wrapper/xarm5/2004-move_joint.py +82 -0
  69. xarm_python_sdk-1.16.0/example/wrapper/xarm5/2005-move_arc_joint.py +64 -0
  70. xarm_python_sdk-1.16.0/example/wrapper/xarm6/2001-move_joint.py +82 -0
  71. xarm_python_sdk-1.16.0/example/wrapper/xarm6/2002-move_joint.py +82 -0
  72. xarm_python_sdk-1.16.0/example/wrapper/xarm6/2003-move_joint.py +82 -0
  73. xarm_python_sdk-1.16.0/example/wrapper/xarm6/2004-move_joint.py +82 -0
  74. xarm_python_sdk-1.16.0/example/wrapper/xarm6/2005-move_arc_joint.py +64 -0
  75. xarm_python_sdk-1.16.0/example/wrapper/xarm7/2001-move_joint.py +82 -0
  76. xarm_python_sdk-1.16.0/example/wrapper/xarm7/2002-move_joint.py +82 -0
  77. xarm_python_sdk-1.16.0/example/wrapper/xarm7/2003-move_joint.py +82 -0
  78. xarm_python_sdk-1.16.0/example/wrapper/xarm7/2004-move_joint.py +82 -0
  79. xarm_python_sdk-1.16.0/example/wrapper/xarm7/2005-move_arc_joint.py +64 -0
  80. xarm_python_sdk-1.16.0/pyproject.toml +51 -0
  81. xarm_python_sdk-1.16.0/setup.py +67 -0
  82. xarm_python_sdk-1.16.0/xarm/build_backend.py +17 -0
  83. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/wrapper/uxbus_cmd.py +36 -33
  84. xarm_python_sdk-1.16.0/xarm/tools/__init__.py +0 -0
  85. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/gcode.py +27 -15
  86. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/modbus_tcp.py +27 -16
  87. xarm_python_sdk-1.16.0/xarm/version.py +1 -0
  88. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/wrapper/xarm_api.py +79 -22
  89. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/base.py +23 -8
  90. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/ft_sensor.py +3 -2
  91. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/gripper.py +122 -36
  92. xarm_python_sdk-1.15.0/PKG-INFO +0 -22
  93. xarm_python_sdk-1.15.0/README.rst +0 -7
  94. xarm_python_sdk-1.15.0/setup.cfg +0 -4
  95. xarm_python_sdk-1.15.0/setup.py +0 -59
  96. xarm_python_sdk-1.15.0/xArm_Python_SDK.egg-info/PKG-INFO +0 -22
  97. xarm_python_sdk-1.15.0/xArm_Python_SDK.egg-info/SOURCES.txt +0 -66
  98. xarm_python_sdk-1.15.0/xArm_Python_SDK.egg-info/dependency_links.txt +0 -1
  99. xarm_python_sdk-1.15.0/xArm_Python_SDK.egg-info/not-zip-safe +0 -1
  100. xarm_python_sdk-1.15.0/xArm_Python_SDK.egg-info/top_level.txt +0 -1
  101. xarm_python_sdk-1.15.0/xarm/version.py +0 -1
  102. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/LICENSE +0 -0
  103. /xarm_python_sdk-1.15.0/xarm/core/config/__init__.py → /xarm_python_sdk-1.16.0/requirements.txt +0 -0
  104. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/__init__.py +0 -0
  105. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/__init__.py +0 -0
  106. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/comm/__init__.py +0 -0
  107. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/comm/base.py +0 -0
  108. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/comm/serial_port.py +0 -0
  109. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/comm/socket_port.py +0 -0
  110. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/comm/uxbus_cmd_protocol.py +0 -0
  111. {xarm_python_sdk-1.15.0/xarm/tools → xarm_python_sdk-1.16.0/xarm/core/config}/__init__.py +0 -0
  112. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/config/x_code.py +0 -0
  113. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/config/x_config.py +0 -0
  114. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/utils/__init__.py +0 -0
  115. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/utils/convert.py +0 -0
  116. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/utils/crc16.py +0 -0
  117. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/utils/debug_print.py +0 -0
  118. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/utils/log.py +0 -0
  119. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/version.py +0 -0
  120. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/wrapper/__init__.py +0 -0
  121. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/wrapper/uxbus_cmd_ser.py +0 -0
  122. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/core/wrapper/uxbus_cmd_tcp.py +0 -0
  123. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/__init__.py +0 -0
  124. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/_blockly_base.py +0 -0
  125. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/_blockly_handler.py +0 -0
  126. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/_blockly_highlight.py +0 -0
  127. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/_blockly_node.py +0 -0
  128. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly/_blockly_tool.py +0 -0
  129. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/blockly_tool.py +0 -0
  130. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/list_ports.py +0 -0
  131. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/threads.py +0 -0
  132. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/tools/utils.py +0 -0
  133. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/wrapper/__init__.py +0 -0
  134. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/wrapper/studio_api.py +0 -0
  135. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/__init__.py +0 -0
  136. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/base_board.py +0 -0
  137. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/code.py +0 -0
  138. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/decorator.py +0 -0
  139. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/events.py +0 -0
  140. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/gpio.py +0 -0
  141. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/grammar_async.py +0 -0
  142. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/grammar_coroutine.py +0 -0
  143. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/modbus_tcp.py +0 -0
  144. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/parse.py +0 -0
  145. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/record.py +0 -0
  146. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/report.py +0 -0
  147. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/robotiq.py +0 -0
  148. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/servo.py +0 -0
  149. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/studio.py +0 -0
  150. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/track.py +0 -0
  151. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/utils.py +0 -0
  152. {xarm_python_sdk-1.15.0 → xarm_python_sdk-1.16.0}/xarm/x3/xarm.py +0 -0
@@ -0,0 +1,40 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ push:
13
+ tags:
14
+ - 'v*'
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ deploy:
21
+
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v3
28
+ with:
29
+ python-version: '3.x'
30
+ - name: Install dependencies
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ pip install build
34
+ - name: Build package
35
+ run: python -m build
36
+ - name: Publish package
37
+ uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
38
+ with:
39
+ user: __token__
40
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,12 @@
1
+ files__pycache__/
2
+ .idea
3
+ *.py[cod]
4
+ *$py.class
5
+ build/
6
+ dist/
7
+ *.egg-info/
8
+ example/test/
9
+ example/wrapper/bak/
10
+ example/wrapper/robot.conf
11
+ bak-xarm/
12
+ .vscode/
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: xarm-python-sdk
3
+ Version: 1.16.0
4
+ Summary: Python SDK for UFACTORY robotic arm 850, xArm 5/6/7, and Lite6.
5
+ Project-URL: Homepage, https://www.ufactory.cc
6
+ Project-URL: Documentation, https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/doc/api/xarm_api.md
7
+ Project-URL: Repository, https://github.com/xArm-Developer/xArm-Python-SDK.git
8
+ Project-URL: Issues, https://github.com/xArm-Developer/xArm-Python-SDK/issues
9
+ Author-email: Vinman <vinman.wen@ufactory.cc>
10
+ Maintainer-email: Vinman <vinman.wen@ufactory.cc>, Minna <minna.zhong@ufactory.cc>
11
+ License-File: LICENSE
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.5
17
+ Classifier: Programming Language :: Python :: 3.6
18
+ Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Software Development
26
+ Requires-Python: >=3.5
27
+ Description-Content-Type: text/x-rst
28
+
29
+ xarm-python-sdk
30
+ ===============
31
+
32
+ .. image:: https://badge.fury.io/py/xarm-python-sdk.svg
33
+ :target: https://pypi.org/project/xarm-python-sdk/
34
+
35
+ .. image:: https://static.pepy.tech/badge/xarm-python-sdk
36
+ :target: https://pepy.tech/projects/xarm-python-sdk
37
+
38
+ .. image:: https://img.shields.io/github/license/xArm-Developer/xArm-Python-SDK.svg
39
+ :target: https://github.com/xArm-Developer/xArm-Python-SDK/blob/main/LICENSE
40
+
41
+ .. image:: https://img.shields.io/pypi/pyversions/xarm-python-sdk.svg
42
+ :target: https://pypi.org/project/xarm-python-sdk/
43
+
44
+ Official Python SDK for UFACTORY robots.
45
+
46
+ Supported Products
47
+ ------------------
48
+
49
+ - UFACTORY xArm 5/6/7
50
+ - UFACTORY 850
51
+ - UFACTORY Lite 6
52
+
53
+ Compatibility
54
+ -------------
55
+
56
+ - Python 3.5 - 3.13
57
+
58
+ Installation
59
+ ------------
60
+
61
+ Install from PyPI:
62
+
63
+ .. code-block:: bash
64
+
65
+ pip install xarm-python-sdk
66
+
67
+ Quick Start
68
+ -----------
69
+
70
+ .. code-block:: python
71
+
72
+ from xarm.wrapper import XArmAPI
73
+
74
+ # Connect to the robot
75
+ arm = XArmAPI('192.168.1.100') # Replace with your robot's IP address
76
+
77
+ # Enable motion
78
+ arm.motion_enable(enable=True)
79
+
80
+ # Set robot to ready state
81
+ arm.set_mode(0) # Position control mode
82
+ arm.set_state(0) # Set to ready state
83
+
84
+ # Move to a target position
85
+ arm.set_position(x=300, y=0, z=200, roll=180, pitch=0, yaw=0, speed=100)
86
+
87
+ # Disconnect
88
+ arm.disconnect()
89
+
90
+ Documentation
91
+ -------------
92
+
93
+ Full documentation and examples are available at:
94
+
95
+ https://github.com/xArm-Developer/xArm-Python-SDK
96
+
97
+ Website: https://www.ufactory.cc/
98
+
99
+ Release Note: https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/README.md#update-summary
100
+
101
+ Bug Reports: support@ufactory.cc
102
+
103
+ License
104
+ -------
105
+
106
+ - License: BSD 3-Clause License. See `LICENSE <https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/LICENSE>`_ for details.
@@ -0,0 +1,452 @@
1
+ # xArm-Python-SDK
2
+
3
+ [![PyPI Downloads](https://static.pepy.tech/badge/xarm-python-sdk)](https://pepy.tech/projects/xarm-python-sdk)
4
+
5
+ ## Overview
6
+ xArm Python SDK
7
+
8
+ ## Caution
9
+ - Please keep away from the robot arm to avoid personal injury or equipment damage.
10
+ - Make sure to do a safety assessment before moving to prevent collisions.
11
+ - Protect the arm before unlocking the joint.
12
+
13
+ ## Installation
14
+ &ensp;&ensp;you can run examples without installation.Only Python3 is supported.
15
+ - Install from source code
16
+ - download
17
+ ```bash
18
+ git clone https://github.com/xArm-Developer/xArm-Python-SDK.git
19
+ cd xArm-Python-SDK
20
+ ```
21
+ - install
22
+ - install with build
23
+ ```bash
24
+ pip install build
25
+ python -m build
26
+ pip install dist/xarm_python_sdk-1.16.0-py3-none-any.whl
27
+ ```
28
+ - install with source code
29
+ ```bash
30
+ pip install .
31
+ ```
32
+ - Install from pypi
33
+ ```bash
34
+ pip install xarm-python-sdk
35
+ ```
36
+
37
+ ## Doc
38
+ - #### [API Document](doc/api/xarm_api.md)
39
+
40
+ - #### [API Code Document](doc/api/xarm_api_code.md)
41
+
42
+ - #### [UFACTORY ModbusTCP Manual](doc/UF_ModbusTCP_Manual.md)
43
+
44
+ ## Update Summary
45
+ - > ### 1.16.0
46
+ - Added parameter to support get raw data of the Six-axis Force Torque Sensor
47
+ - Added an interface to control xArm Gripper G2
48
+ - Optimize the interface for controlling BIO Gripper G2
49
+ - Extend the get_joint_states interface
50
+
51
+ - > ### 1.15.0
52
+ - Added the Six-axis Force Torque Sensor collision detection related interfaces
53
+ - Added support for the new version of BIO Gripper control interface
54
+
55
+ - > ### 1.14.7
56
+ - Fixed the problem that single joint or direction movement fails in some cases (valid from firmware 2.5.0)
57
+ - Added standard ModbusTcp client and Gcode client
58
+ - GPIO control supports immediate execution
59
+ - Support new version of vacuum gripper
60
+ - Support the studio-2.5.0 blockly project conversion to python
61
+
62
+ - > ### 1.13.30
63
+ - Supports obtaining unsaved track recording duration
64
+ - Fix the abnormal path of running blockly program in some cases
65
+ - Fix the return format of getting C23 and C38 errors
66
+ - Supports obtaining identification status
67
+
68
+ - > ### 1.13.19
69
+ - Friction identification supports xarm7_mirror model
70
+ - Fix the abnormal return value of blockly conversion robotiq related interface
71
+
72
+ - > ### 1.13.0
73
+ - Compatible with the standard Modbus TCP protocol, providing part of the standard Modbus TCP protocol interface
74
+
75
+ - > ### 1.12.2
76
+ - Support partial Task feedback (requires firmware version greater than or equal to v2.1.0)
77
+
78
+ - > ### 1.11.6
79
+ - Correct the ambiguity that the `set_position_aa` interface is true when both relative and is_tool_coord are true. After the correction, when is_tool_coord is true, relative is invalid (previously is_tool_coord was invalid when relative was true)
80
+
81
+ - > ### 1.11.5
82
+ - Optimization pause time is too long (wait=true)
83
+ - Add common motion api (Enabled after firmware version 1.11.100)
84
+ - The Cartesian motion-related interface adds the motion_type parameter to determine the planning method (Enabled after firmware version 1.11.100)
85
+
86
+ - >### [More](ReleaseNotes.md)
87
+
88
+
89
+ ## [Example](example/wrapper/)
90
+
91
+ &ensp;&ensp; __Before running the example, please modify the IP in [robot.conf](example/wrapper/robot.conf) to corresponding IP you want to control.__
92
+
93
+ - #### [0000-template](example/wrapper/common/0000-template.py)
94
+
95
+ - ##### [0001-event_register](example/wrapper/common/0001-event_register.py)
96
+
97
+ - ##### [0002-get_property](example/wrapper/common/0002-get_property.py)
98
+
99
+ - ##### [0003-api_get](example/wrapper/common/0003-api_get.py)
100
+
101
+ - ##### [0004-servo_attach_detach](example/wrapper/common/0004-servo_attach_detach.py)
102
+
103
+ - ##### [1001-move_line](example/wrapper/common/1001-move_line.py)
104
+
105
+ - ##### [1002-move_line](example/wrapper/common/1002-move_line.py)
106
+
107
+ - ##### [1003-relative_move_line](example/wrapper/common/1003-relative_move_line.py)
108
+
109
+ - ##### [1004-move_arc_line](example/wrapper/common/1004-move_arc_line.py)
110
+
111
+ - ##### [1005-move_arc_line](example/wrapper/common/1005-move_arc_line.py)
112
+
113
+ - ##### [1006-move_tool_line](example/wrapper/common/1006-move_tool_line.py)
114
+
115
+ - ##### [1007-counter](example/wrapper/common/1007-counter.py)
116
+
117
+ - ##### [1008-move_line_aa](example/wrapper/common/1008-move_line_aa.py)
118
+
119
+ - ##### [1009-cartesian_velocity_control](example/wrapper/common/1009-cartesian_velocity_control.py)
120
+
121
+ - ##### [1010-cartesian_online_trajectory_planning](example/wrapper/common/1010-cartesian_online_trajectory_planning.py)
122
+
123
+ - ##### [2000-joint_velocity_control](example/wrapper/common/2000-joint_velocity_control.py)
124
+
125
+ - ##### [2006-joint_online_trajectory_planning](example/wrapper/common/2006-joint_online_trajectory_planning.py)
126
+
127
+ - ##### 2001-move_joint --> [xarm5](example/wrapper/xarm5/2001-move_joint.py) --- [xarm6](example/wrapper/xarm6/2001-move_joint.py) --- [xarm7](example/wrapper/xarm7/2001-move_joint.py)
128
+
129
+ - ##### 2002-move_joint --> [xarm5](example/wrapper/xarm5/2002-move_joint.py) --- [xarm6](example/wrapper/xarm6/2002-move_joint.py) --- [xarm7](example/wrapper/xarm7/2002-move_joint.py)
130
+
131
+ - ##### 2003-move_joint --> [xarm5](example/wrapper/xarm5/2003-move_joint.py) --- [xarm6](example/wrapper/xarm6/2003-move_joint.py) --- [xarm7](example/wrapper/xarm7/2003-move_joint.py)
132
+
133
+ - ##### 2004-move_joint --> [xarm5](example/wrapper/xarm5/2004-move_joint.py) --- [xarm6](example/wrapper/xarm6/2004-move_joint.py) --- [xarm7](example/wrapper/xarm7/2004-move_joint.py)
134
+
135
+ - ##### 2005-move_arc_joint --> [xarm5](example/wrapper/xarm5/2005-move_arc_joint.py) --- [xarm6](example/wrapper/xarm6/2005-move_arc_joint.py) --- [xarm7](example/wrapper/xarm7/2005-move_arc_joint.py)
136
+
137
+ - ##### [3001-move_circle](example/wrapper/common/3001-move_circle.py)
138
+
139
+ - ##### [3002-record_trajectory](example/wrapper/common/3002-record_trajectory.py)
140
+
141
+ - ##### [3003-playback_trajectory](example/wrapper/common/3003-playback_trajectory.py)
142
+
143
+ - ##### [3004-get_report_data](example/wrapper/common/3004-get_report_data.py)
144
+
145
+ - ##### [3005-task_feedback](example/wrapper/common/3005-task_feedback.py)
146
+
147
+ - ##### [3006-standard_modbus_tcp](example/wrapper/common/3006-standard_modbus_tcp.py)
148
+
149
+ - ##### [5000-set_tgpio_modbus](example/wrapper/common/5000-set_tgpio_modbus.py)
150
+
151
+ - ##### [5001-get_tgpio_digital](example/wrapper/common/5001-get_tgpio_digital.py)
152
+
153
+ - ##### [5002-get_tgpio_analog](example/wrapper/common/5002-get_tgpio_analog.py)
154
+
155
+ - ##### [5003-set_tgpio_digital](example/wrapper/common/5003-set_tgpio_digital.py)
156
+
157
+ - ##### [5004-set_gripper](example/wrapper/common/5004-set_gripper.py)
158
+
159
+ - ##### [5005-get_cgpio_digital_analog](example/wrapper/common/5005-get_cgpio_digital_analog.py)
160
+
161
+ - ##### [5006-set_cgpio_digital_analog](example/wrapper/common/5006-set_cgpio_digital_analog.py)
162
+
163
+ - ##### [5007-set_cgpio_input_output_function](example/wrapper/common/5007-set_cgpio_input_output_function.py)
164
+
165
+ - ##### [5008-get_cgpio_state](example/wrapper/common/5008-get_cgpio_state.py)
166
+
167
+ - ##### [5009-set_bio_gripper](example/wrapper/common/5009-set_bio_gripper.py)
168
+
169
+ - ##### [6001-set_reduced_mode](example/wrapper/common/6001-set_reduced_mode.py)
170
+
171
+ - ##### [6002-set_fense_mode](example/wrapper/common/6002-set_fense_mode.py)
172
+
173
+ - ##### [7001-servo_j](example/wrapper/common/7001-servo_j.py)
174
+
175
+ - ##### [7002-servo_cartesian](example/wrapper/common/7002-servo_cartesian.py)
176
+
177
+ - ##### [7003-servo_cartesian_aa](example/wrapper/common/7003-servo_cartesian_aa.py)
178
+
179
+ - ##### [8000-load_identify_current](example/wrapper/common/8000-load_identify_current.py)
180
+
181
+ - ##### [8001-force_tech](example/wrapper/common/8001-force_tech.py)
182
+
183
+ - ##### [8002-impedance](example/wrapper/common/8002-impedance.py)
184
+
185
+ - ##### [8003-force_control](example/wrapper/common/8003-force_control.py)
186
+
187
+ - ##### [8004-load_identify](example/wrapper/common/8004-load_identify.py)
188
+
189
+ - ##### [8005-read_force_data](example/wrapper/common/8005-read_force_data.py)
190
+
191
+ - ##### [8006-save_force_zero](example/wrapper/common/8006-save_force_zero.py)
192
+
193
+ - ##### [8010-get_ft_sensor_config](example/wrapper/common/8010-get_ft_sensor_config.py)
194
+
195
+ - ##### [9000-set_linear_track](example/wrapper/common/9000-set_linear_track.py)
196
+
197
+ - ##### [blockly_to_python](example/wrapper/tool/blockly_to_python.py)
198
+
199
+ - ##### [get_report_data_with_protocol](example/wrapper/common/get_report_data_with_protocol.py)
200
+
201
+
202
+ - #### Import
203
+ ```python
204
+ from xarm.wrapper import XArmAPI
205
+ arm = XArmAPI('COM5')
206
+ arm = XArmAPI('192.168.1.113')
207
+ arm = XArmAPI('192.168.1.113', do_not_open=False)
208
+ arm = XArmAPI('192.168.1.113', is_radian=False)
209
+ ```
210
+
211
+ - #### Connect/Disconnect
212
+ ```python
213
+ arm.connect(...)
214
+ arm.disconnect()
215
+ ```
216
+
217
+ - #### Move
218
+ ```python
219
+ arm.reset(...)
220
+ arm.set_position(...)
221
+ arm.set_servo_angle(...)
222
+ arm.set_servo_angle_j(...)
223
+ arm.set_servo_cartesian(...)
224
+ arm.move_gohome(...)
225
+ arm.move_circle(...)
226
+ arm.emergency_stop()
227
+ arm.set_position_aa(...)
228
+ arm.set_servo_cartesian_aa(...)
229
+ arm.vc_set_joint_velocity(...)
230
+ arm.vc_set_cartesian_velocity(...)
231
+ ```
232
+
233
+ - #### Set
234
+ ```python
235
+ arm.set_servo_attach(...)
236
+ arm.set_servo_detach(...)
237
+ arm.set_state(...)
238
+ arm.set_mode(...)
239
+ arm.motion_enable(...)
240
+ arm.set_pause_time(...)
241
+ ```
242
+
243
+ - #### Get
244
+ ```python
245
+ arm.get_version()
246
+ arm.get_state()
247
+ arm.get_is_moving()
248
+ arm.get_cmdnum()
249
+ arm.get_err_warn_code()
250
+ arm.get_position(...)
251
+ arm.get_servo_angle(...)
252
+ arm.get_position_aa(...)
253
+ arm.get_pose_offset(...)
254
+ ```
255
+
256
+ - #### Setting
257
+ ```python
258
+ arm.set_tcp_offset(...)
259
+ arm.set_tcp_jerk(...)
260
+ arm.set_tcp_maxacc(...)
261
+ arm.set_joint_jerk(...)
262
+ arm.set_joint_maxacc(...)
263
+ arm.set_tcp_load(...)
264
+ arm.set_collision_sensitivity(...)
265
+ arm.set_teach_sensitivity(...)
266
+ arm.set_gravity_direction(...)
267
+ arm.config_tgpio_reset_when_stop(...)
268
+ arm.config_cgpio_reset_when_stop(...)
269
+ arm.set_report_tau_or_i(...)
270
+ arm.set_self_collision_detection(...)
271
+ arm.set_collision_tool_model(...)
272
+ arm.clean_conf()
273
+ arm.save_conf()
274
+ ```
275
+
276
+ - #### Gripper
277
+ ```python
278
+ arm.set_gripper_enable(...)
279
+ arm.set_gripper_mode(...)
280
+ arm.set_gripper_speed(...)
281
+ arm.set_gripper_position(...)
282
+ arm.get_gripper_position()
283
+ arm.get_gripper_err_code()
284
+ arm.clean_gripper_error()
285
+ ```
286
+
287
+ - #### BIO Gripper
288
+
289
+ ```python
290
+ arm.set_bio_gripper_enable(...)
291
+ arm.set_bio_gripper_speed(...)
292
+ arm.open_bio_grippe(...)
293
+ arm.close_bio_gripper(...)
294
+ arm.get_bio_gripper_status()
295
+ arm.get_bio_gripper_error()
296
+ arm.clean_bio_gripper_error()
297
+ ```
298
+
299
+ - #### RobotIQ Gripper
300
+
301
+ ```python
302
+ arm.robotiq_reset()
303
+ arm.robotiq_set_activate(...)
304
+ arm.robotiq_set_position(...)
305
+ arm.robotiq_open(...)
306
+ arm.robotiq_close(...)
307
+ arm.robotiq_get_status(...)
308
+ ```
309
+
310
+ - #### Modbus of the end tools
311
+
312
+ ```python
313
+ arm.set_tgpio_modbus_timeout(...)
314
+ arm.set_tgpio_modbus_baudrate(...)
315
+ arm.get_tgpio_modbus_baudrate(...)
316
+ arm.getset_tgpio_modbus_data(...)
317
+ ```
318
+
319
+ - #### GPIO
320
+
321
+ ```python
322
+ # Tool GPIO
323
+ arm.get_tgpio_digital(...)
324
+ arm.set_tgpio_digital(...)
325
+ arm.get_tgpio_analog(...)
326
+ arm.set_tgpio_digital_with_xyz(...)
327
+ # Controller GPIO
328
+ arm.get_cgpio_digital(...)
329
+ arm.get_cgpio_analog(...)
330
+ arm.set_cgpio_digital(...)
331
+ arm.set_cgpio_analog(...)
332
+ arm.set_cgpio_digital_input_function(...)
333
+ arm.set_cgpio_digital_output_function(...)
334
+ arm.get_cgpio_state()
335
+ arm.set_cgpio_digital_with_xyz(...)
336
+ arm.set_cgpio_analog_with_xyz(...)
337
+ ```
338
+
339
+ - #### Linear Track
340
+
341
+ ```python
342
+ arm.get_linear_track_pos()
343
+ arm.get_linear_track_status()
344
+ arm.get_linear_track_error()
345
+ arm.get_linear_track_is_enabled()
346
+ arm.get_linear_track_on_zero()
347
+ arm.get_linear_track_sci()
348
+ arm.get_linear_track_sco()
349
+
350
+ arm.clean_linear_track_error(...)
351
+ arm.set_linear_track_enable(...)
352
+ arm.set_linear_track_speed(...)
353
+ arm.set_linear_track_back_origin(...)
354
+ arm.set_linear_track_pos(...)
355
+ arm.set_linear_track_stop(...)
356
+ ```
357
+
358
+ - #### FT Sensor
359
+ ```python
360
+ arm.set_impedance(...)
361
+ arm.set_impedance_mbk(...)
362
+ arm.set_impedance_config(...)
363
+ arm.config_force_control(...)
364
+ arm.set_force_control_pid(...)
365
+ arm.ft_sensor_set_zero(...)
366
+ arm.ft_sensor_iden_load(...)
367
+ arm.ft_sensor_cali_load(...)
368
+ arm.ft_sensor_enable(...)
369
+ arm.ft_sensor_app_set(...)
370
+ arm.ft_sensor_app_get(...)
371
+ arm.get_ft_sensor_data(...)
372
+ arm.get_ft_senfor_config(...)
373
+ arm.get_ft_sensor_error(...)
374
+ ```
375
+
376
+ - #### Other
377
+ ```python
378
+ arm.set_pause_time(...)
379
+ arm.system_control(...)
380
+ arm.clean_error()
381
+ arm.clean_warn()
382
+ arm.set_counter_reset()
383
+ arm.set_counter_increase(...)
384
+ ```
385
+
386
+ - #### Register/Release
387
+ ```python
388
+ arm.register_report_callback(...)
389
+ arm.register_report_location_callback(...)
390
+ arm.register_connect_changed_callback(callback)
391
+ arm.register_state_changed_callback(callback)
392
+ arm.register_mode_changed_callback(callback)
393
+ arm.register_mtable_mtbrake_changed_callback(callback)
394
+ arm.register_error_warn_changed_callback(callback)
395
+ arm.register_cmdnum_changed_callback(callback)
396
+ arm.register_temperature_changed_callback(callback)
397
+ arm.register_count_changed_callback(callback)
398
+ arm.release_report_callback(callback)
399
+ arm.release_report_location_callback(callback)
400
+ arm.release_connect_changed_callback(callback)
401
+ arm.release_state_changed_callback(callback)
402
+ arm.release_mode_changed_callback(callback)
403
+ arm.release_mtable_mtbrake_changed_callback(callback)
404
+ arm.release_error_warn_changed_callback(callback)
405
+ arm.release_cmdnum_changed_callback(callback)
406
+ arm.release_temperature_changed_callback(callback)
407
+ arm.release_count_changed_callback(callback)
408
+ ```
409
+
410
+ - #### Property
411
+ ```python
412
+ arm.connected
413
+ arm.default_is_radian
414
+ arm.version
415
+ arm.position
416
+ arm.last_used_position
417
+ arm.tcp_speed_limit
418
+ arm.tcp_acc_limit
419
+ arm.last_used_tcp_speed
420
+ arm.last_used_tcp_acc
421
+ arm.angles
422
+ arm.joint_speed_limit
423
+ arm.joint_acc_limit
424
+ arm.last_used_angles
425
+ arm.last_used_joint_speed
426
+ arm.last_used_joint_acc
427
+ arm.tcp_offset
428
+ arm.state
429
+ arm.mode
430
+ arm.joints_torque
431
+ arm.tcp_load
432
+ arm.collision_sensitivity
433
+ arm.teach_sensitivity
434
+ arm.motor_brake_states
435
+ arm.motor_enable_states
436
+ arm.has_err_warn
437
+ arm.has_error
438
+ arm.has_warn
439
+ arm.error_code
440
+ arm.warn_code
441
+ arm.cmd_num
442
+ arm.device_type
443
+ arm.axis
444
+ arm.gravity_direction
445
+ arm.gpio_reset_config
446
+ arm.count
447
+ arm.temperatures
448
+ arm.voltages
449
+ arm.currents
450
+ arm.cgpio_states
451
+ ```
452
+
@@ -0,0 +1,78 @@
1
+ xarm-python-sdk
2
+ ===============
3
+
4
+ .. image:: https://badge.fury.io/py/xarm-python-sdk.svg
5
+ :target: https://pypi.org/project/xarm-python-sdk/
6
+
7
+ .. image:: https://static.pepy.tech/badge/xarm-python-sdk
8
+ :target: https://pepy.tech/projects/xarm-python-sdk
9
+
10
+ .. image:: https://img.shields.io/github/license/xArm-Developer/xArm-Python-SDK.svg
11
+ :target: https://github.com/xArm-Developer/xArm-Python-SDK/blob/main/LICENSE
12
+
13
+ .. image:: https://img.shields.io/pypi/pyversions/xarm-python-sdk.svg
14
+ :target: https://pypi.org/project/xarm-python-sdk/
15
+
16
+ Official Python SDK for UFACTORY robots.
17
+
18
+ Supported Products
19
+ ------------------
20
+
21
+ - UFACTORY xArm 5/6/7
22
+ - UFACTORY 850
23
+ - UFACTORY Lite 6
24
+
25
+ Compatibility
26
+ -------------
27
+
28
+ - Python 3.5 - 3.13
29
+
30
+ Installation
31
+ ------------
32
+
33
+ Install from PyPI:
34
+
35
+ .. code-block:: bash
36
+
37
+ pip install xarm-python-sdk
38
+
39
+ Quick Start
40
+ -----------
41
+
42
+ .. code-block:: python
43
+
44
+ from xarm.wrapper import XArmAPI
45
+
46
+ # Connect to the robot
47
+ arm = XArmAPI('192.168.1.100') # Replace with your robot's IP address
48
+
49
+ # Enable motion
50
+ arm.motion_enable(enable=True)
51
+
52
+ # Set robot to ready state
53
+ arm.set_mode(0) # Position control mode
54
+ arm.set_state(0) # Set to ready state
55
+
56
+ # Move to a target position
57
+ arm.set_position(x=300, y=0, z=200, roll=180, pitch=0, yaw=0, speed=100)
58
+
59
+ # Disconnect
60
+ arm.disconnect()
61
+
62
+ Documentation
63
+ -------------
64
+
65
+ Full documentation and examples are available at:
66
+
67
+ https://github.com/xArm-Developer/xArm-Python-SDK
68
+
69
+ Website: https://www.ufactory.cc/
70
+
71
+ Release Note: https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/README.md#update-summary
72
+
73
+ Bug Reports: support@ufactory.cc
74
+
75
+ License
76
+ -------
77
+
78
+ - License: BSD 3-Clause License. See `LICENSE <https://github.com/xArm-Developer/xArm-Python-SDK/blob/master/LICENSE>`_ for details.