Software
xArm Python SDK
By UFACTORY, from github.com/xArm-Developer/xArm-Python-SDK (opens in a new tab)
- Robot arms and industry
- Driver or SDK
- BSD-3-Clause
A Python library for controlling UFACTORY xArm robot arms over network or serial connection, covering motion, settings, grippers, GPIO and force sensing.
Facts
- GitHub stars
- 333read on 29 Nov 2026
- Last update
- 27 Nov 2026Newest commit on master
- Maintenance
- Activea commit in the last 90 days
- Difficulty
- Beginner
Checked on GitHub on 29 Nov 2026.
Licenses
- Code
- BSD-3-Clause (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (BSD-3-Clause) at commit 2cb2f7a (opens in a new tab), on 29 Nov 2026.
- Commercial use
- Yes
At a glance
- What it is
- Connects to an xArm by IP address or serial port and manages connection state.
- Provides joint, Cartesian and servo motion commands, including circular and arc moves.
- Reads arm state such as position, joint angles, errors and warnings.
- Controls several gripper types, including xArm Gripper G2, BIO Gripper and RobotIQ Gripper.
- Accesses tool and controller GPIO, plus RS485 Modbus communication.
- Supports six-axis force/torque sensor configuration, admittance and force control.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- Used by U-Arm.
- Licence
- BSD-3-Clause. Commercial use: Yes. Where it was read
- Install
git clone https://github.com/xArm-Developer/xArm-Python-SDK.gitEvery step- Maintenance
- Active, last commit on 27 Nov 2026.
Works with
The robots on Robotheca that use it or can run it, each with how the link was found.
Found by Robotheca in requirements.txt (opens in a new tab)
Use it
Copied word for word from the creator's own documentation; each block links to the lines it comes from.
Installation (from source) (step 1 of 2)
git clone https://github.com/xArm-Developer/xArm-Python-SDK.git
cd xArm-Python-SDKInstallation (from source) (step 2 of 2)
pip install .Installation (pip)
pip install xarm-python-sdkRobotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/xArm-Developer/xArm-Python-SDK (opens in a new tab)
- The version Robotheca read2cb2f7a (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca read the repository at three versions: the summary at d911319, the facts and the README at 2cb2f7a (read on 29 Nov 2026) and the install commands at 8a6fa5c (read on 6 Nov 2026).
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by UFACTORY, at commit 2cb2f7a, under BSD-3-Clause (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
xArm-Python-SDK
Image: PyPI Downloads (opens in a new tab) (opens in a new tab)
Overview
xArm Python SDK
Caution
- Please keep away from the robot arm to avoid personal injury or equipment damage.
- Make sure to do a safety assessment before moving to prevent collisions.
- Protect the arm before unlocking the joint.
Installation
you can run examples without installation. Only Python 3 is supported.
- Install from source code
- download
git clone https://github.com/xArm-Developer/xArm-Python-SDK.git cd xArm-Python-SDK - install
- install with build
pip install build python -m build pip install dist/xarm_python_sdk-1.16.0-py3-none-any.whl - install with source code
pip install .
- install with build
- download
- Install from pypi
pip install xarm-python-sdk
Doc
-
API Document (opens in a new tab)
-
API Code Document (opens in a new tab)
-
UFACTORY ModbusTCP Manual (opens in a new tab)
Update Summary
-
1.18.3/1.18.4
- Added BytesData for data conversion
- Added data structure for report data
- Update the reported data for port 30002
- Increase execution speed by adding parameter to reduce the number of checks performed by the gripper APIs
-
1.17.0/1.17.1
- Change some API names
-
1.16.0
- Added parameter to support get raw data of the Six-axis Force Torque Sensor
- Added an interface to control xArm Gripper G2
- Optimize the interface for controlling BIO Gripper G2
- Extend the get_joint_states interface
-
1.15.0
- Added the Six-axis Force Torque Sensor collision detection related interfaces
- Added support for the new version of BIO Gripper control interface
-
1.14.7
- Fixed the problem that single joint or direction movement fails in some cases (valid from firmware 2.5.0)
- Added standard ModbusTcp client and Gcode client
- GPIO control supports immediate execution
- Support new version of vacuum gripper
- Support the studio-2.5.0 blockly project conversion to python
-
More (opens in a new tab)
API Change List
| OLD API NAME | NEW API NAME | SDK VERSION |
|---|---|---|
| set_tgpio_modbus_timeout | set_rs485_timeout | 1.17.1 |
| get_tgpio_modbus_timeout | get_rs485_timeout | 1.17.1 |
| set_tgpio_modbus_baudrate | set_rs485_baudrate | 1.17.1 |
| get_tgpio_modbus_baudrate | get_rs485_baudrate | 1.17.1 |
| getset_tgpio_modbus_data | set_rs485_data | 1.17.1 |
| set_impedance | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_impedance_mbk | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_impedance_config | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_force_control_pid | set_ft_sensor_force_parameters | 1.17.0 |
| config_force_control | set_ft_sensor_force_parameters | 1.17.0 |
| ft_sensor_set_zero | set_ft_sensor_zero | 1.17.0 |
| ft_sensor_iden_load | iden_ft_sensor_load_offset | 1.17.0 |
| ft_sensor_cali_load | set_ft_sensor_load_offset | 1.17.0 |
| ft_sensor_enable | set_ft_sensor_enable | 1.17.0 |
| ft_sensor_app_set | set_ft_sensor_mode | 1.17.0 |
| ft_sensor_app_get | get_ft_sensor_mode | 1.17.0 |
| get_linear_track_registers | get_linear_motor_registers | 1.17.0 |
| get_linear_track_pos | get_linear_motor_pos | 1.17.0 |
| get_linear_track_status | get_linear_motor_status | 1.17.0 |
| get_linear_track_error | get_linear_motor_error | 1.17.0 |
| get_linear_track_is_enabled | get_linear_motor_is_enabled | 1.17.0 |
| get_linear_track_on_zero | get_linear_motor_on_zero | 1.17.0 |
| get_linear_track_sci | get_linear_motor_sci | 1.17.0 |
| get_linear_track_sco | get_linear_motor_sco | 1.17.0 |
| clean_linear_track_error | clean_linear_motor_error | 1.17.0 |
| set_linear_track_enable | set_linear_motor_enable | 1.17.0 |
| set_linear_track_speed | set_linear_motor_speed | 1.17.0 |
| set_linear_track_back_origin | set_linear_motor_back_origin | 1.17.0 |
| set_linear_track_pos | set_linear_motor_pos | 1.17.0 |
| set_linear_track_stop | set_linear_motor_stop | 1.17.0 |
| shutdown_system | system_control | 1.13.3 |
| get_suction_cup | get_vacuum_gripper | 1.5.0 |
| set_suction_cup | set_vacuum_gripper | 1.5.0 |
| get_ik | get_inverse_kinematics | 1.0.0 |
| get_fk | get_forward_kinematics | 1.0.0 |
| set_sleep_time | set_pause_time | 1.0.0 |
| get_gpio_digital | get_tgpio_digital | 1.0.0 |
| set_gpio_digital | set_tgpio_digital | 1.0.0 |
| get_gpio_analog | get_tgpio_analog | 1.0.0 |
Example (opens in a new tab)
Before running the example, please modify the IP in robot.conf (opens in a new tab) to corresponding IP you want to control.
-
0000-template (opens in a new tab)
-
0001-event_register (opens in a new tab)
-
0002-get_property (opens in a new tab)
-
0003-api_get (opens in a new tab)
-
0004-servo_attach_detach (opens in a new tab)
-
1001-move_line (opens in a new tab)
-
1002-move_line (opens in a new tab)
-
1003-relative_move_line (opens in a new tab)
-
1004-move_arc_line (opens in a new tab)
-
1005-move_arc_line (opens in a new tab)
-
1006-move_tool_line (opens in a new tab)
-
1007-counter (opens in a new tab)
-
1008-move_line_aa (opens in a new tab)
-
1009-cartesian_velocity_control (opens in a new tab)
-
1010-cartesian_online_trajectory_planning (opens in a new tab)
-
2000-joint_velocity_control (opens in a new tab)
-
2006-joint_online_trajectory_planning (opens in a new tab)
-
2001-move_joint --> xarm5 (opens in a new tab) --- xarm6 (opens in a new tab) --- xarm7 (opens in a new tab)
-
2002-move_joint --> xarm5 (opens in a new tab) --- xarm6 (opens in a new tab) --- xarm7 (opens in a new tab)
-
2003-move_joint --> xarm5 (opens in a new tab) --- xarm6 (opens in a new tab) --- xarm7 (opens in a new tab)
-
2004-move_joint --> xarm5 (opens in a new tab) --- xarm6 (opens in a new tab) --- xarm7 (opens in a new tab)
-
2005-move_arc_joint --> xarm5 (opens in a new tab) --- xarm6 (opens in a new tab) --- xarm7 (opens in a new tab)
-
3001-move_circle (opens in a new tab)
-
3002-record_trajectory (opens in a new tab)
-
3003-playback_trajectory (opens in a new tab)
-
3004-get_report_data (opens in a new tab)
-
3005-task_feedback (opens in a new tab)
-
3006-standard_modbus_tcp (opens in a new tab)
-
5000-set_tgpio_modbus (opens in a new tab)
-
5001-get_tgpio_digital (opens in a new tab)
-
5002-get_tgpio_analog (opens in a new tab)
-
5003-set_tgpio_digital (opens in a new tab)
-
5004-set_gripper (opens in a new tab)
-
5005-get_cgpio_digital_analog (opens in a new tab)
-
5006-set_cgpio_digital_analog (opens in a new tab)
-
5007-set_cgpio_input_output_function (opens in a new tab)
-
5008-get_cgpio_state (opens in a new tab)
-
5009-set_bio_gripper (opens in a new tab)
-
6001-set_reduced_mode (opens in a new tab)
-
6002-set_fence_mode (opens in a new tab)
-
7001-servo_j (opens in a new tab)
-
7002-servo_cartesian (opens in a new tab)
-
7003-servo_cartesian_aa (opens in a new tab)
-
8000-load_identify_current (opens in a new tab)
-
8001-force_tech (opens in a new tab)
-
8002-admittance-control (opens in a new tab)
-
8003-force_control (opens in a new tab)
-
8004-load_identify (opens in a new tab)
-
8005-read_force_data (opens in a new tab)
-
8006-save_force_zero (opens in a new tab)
-
8010-get_ft_sensor_config (opens in a new tab)
-
9000-set_linear_motor (opens in a new tab)
-
blockly_to_python (opens in a new tab)
-
get_report_data_with_protocol (opens in a new tab)
-
Import
from xarm.wrapper import XArmAPI arm = XArmAPI('COM5') arm = XArmAPI('192.168.1.113') arm = XArmAPI('192.168.1.113', do_not_open=False) arm = XArmAPI('192.168.1.113', is_radian=False) -
Connect/Disconnect
arm.connect(...) arm.disconnect() -
Move
arm.reset(...) arm.set_position(...) arm.set_servo_angle(...) arm.set_servo_angle_j(...) arm.set_servo_cartesian(...) arm.move_gohome(...) arm.move_circle(...) arm.emergency_stop() arm.set_position_aa(...) arm.set_servo_cartesian_aa(...) arm.vc_set_joint_velocity(...) arm.vc_set_cartesian_velocity(...) -
Set
arm.set_servo_attach(...) arm.set_servo_detach(...) arm.set_state(...) arm.set_mode(...) arm.motion_enable(...) arm.set_pause_time(...) -
Get
arm.get_version() arm.get_state() arm.get_is_moving() arm.get_cmdnum() arm.get_err_warn_code() arm.get_position(...) arm.get_servo_angle(...) arm.get_position_aa(...) arm.get_pose_offset(...) -
Setting
arm.set_tcp_offset(...) arm.set_tcp_jerk(...) arm.set_tcp_maxacc(...) arm.set_joint_jerk(...) arm.set_joint_maxacc(...) arm.set_tcp_load(...) arm.set_collision_sensitivity(...) arm.set_teach_sensitivity(...) arm.set_gravity_direction(...) arm.config_tgpio_reset_when_stop(...) arm.config_cgpio_reset_when_stop(...) arm.set_report_tau_or_i(...) arm.set_self_collision_detection(...) arm.set_collision_tool_model(...) arm.clean_conf() arm.save_conf() -
Gripper/Gripper G2
arm.set_gripper_enable(...) arm.set_gripper_mode(...) arm.set_gripper_speed(...) arm.set_gripper_position(...) arm.get_gripper_position() arm.get_gripper_err_code() arm.clean_gripper_error() # only Gripper G2 arm.get_gripper_g2_position() arm.set_gripper_g2_position(...) -
BIO Gripper
arm.set_bio_gripper_enable(...) arm.set_bio_gripper_speed(...) arm.open_bio_gripper(...) arm.close_bio_gripper(...) arm.get_bio_gripper_status() arm.get_bio_gripper_error() arm.clean_bio_gripper_error() # only BIO Gripper G2 arm.get_bio_gripper_g2_position() arm.set_bio_gripper_g2_position(...) -
RobotIQ Gripper
arm.robotiq_reset() arm.robotiq_set_activate(...) arm.robotiq_set_position(...) arm.robotiq_open(...) arm.robotiq_close(...) arm.robotiq_get_status(...) -
Modbus of the RS485
arm.set_rs485_timeout(...) arm.get_rs485_timeout(...) arm.set_rs485_baudrate(...) arm.get_rs485_baudrate(...) arm.set_rs485_data(...) -
GPIO
# Tool GPIO arm.get_tgpio_digital(...) arm.set_tgpio_digital(...) arm.get_tgpio_analog(...) arm.set_tgpio_digital_with_xyz(...) # Controller GPIO arm.get_cgpio_digital(...) arm.get_cgpio_analog(...) arm.set_cgpio_digital(...) arm.set_cgpio_analog(...) arm.set_cgpio_digital_input_function(...) arm.set_cgpio_digital_output_function(...) arm.get_cgpio_state() arm.set_cgpio_digital_with_xyz(...) arm.set_cgpio_analog_with_xyz(...) -
Linear Motor
arm.get_linear_motor_pos() arm.get_linear_motor_status() arm.get_linear_motor_error() arm.get_linear_motor_is_enabled() arm.get_linear_motor_on_zero() arm.get_linear_motor_sci() arm.get_linear_motor_sco() arm.clean_linear_motor_error(...) arm.set_linear_motor_enable(...) arm.set_linear_motor_speed(...) arm.set_linear_motor_back_origin(...) arm.set_linear_motor_pos(...) arm.set_linear_motor_stop(...) -
FT Sensor
arm.set_ft_sensor_enable(...) arm.set_ft_sensor_mode(...) arm.get_ft_sensor_mode(...) arm.set_ft_sensor_zero(...) arm.iden_ft_sensor_load_offset(...) arm.set_ft_sensor_load_offset(...) arm.set_ft_sensor_admittance_parameters(...) arm.set_ft_sensor_force_parameters(...) arm.get_ft_sensor_data(...) arm.get_ft_sensor_config(...) arm.get_ft_sensor_error(...) -
Other
arm.set_pause_time(...) arm.system_control(...) arm.clean_error() arm.clean_warn() arm.set_counter_reset() arm.set_counter_increase(...) -
Register/Release
arm.register_report_callback(...) arm.register_report_location_callback(...) arm.register_connect_changed_callback(callback) arm.register_state_changed_callback(callback) arm.register_mode_changed_callback(callback) arm.register_mtable_mtbrake_changed_callback(callback) arm.register_error_warn_changed_callback(callback) arm.register_cmdnum_changed_callback(callback) arm.register_temperature_changed_callback(callback) arm.register_count_changed_callback(callback) arm.release_report_callback(callback) arm.release_report_location_callback(callback) arm.release_connect_changed_callback(callback) arm.release_state_changed_callback(callback) arm.release_mode_changed_callback(callback) arm.release_mtable_mtbrake_changed_callback(callback) arm.release_error_warn_changed_callback(callback) arm.release_cmdnum_changed_callback(callback) arm.release_temperature_changed_callback(callback) arm.release_count_changed_callback(callback) -
Property
arm.connected arm.default_is_radian arm.version arm.position arm.last_used_position arm.tcp_speed_limit arm.tcp_acc_limit arm.last_used_tcp_speed arm.last_used_tcp_acc arm.angles arm.joint_speed_limit arm.joint_acc_limit arm.last_used_angles arm.last_used_joint_speed arm.last_used_joint_acc arm.tcp_offset arm.state arm.mode arm.joints_torque arm.tcp_load arm.collision_sensitivity arm.teach_sensitivity arm.motor_brake_states arm.motor_enable_states arm.has_err_warn arm.has_error arm.has_warn arm.error_code arm.warn_code arm.cmd_num arm.device_type arm.axis arm.gravity_direction arm.gpio_reset_config arm.count arm.temperatures arm.voltages arm.currents arm.cgpio_states
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.