UFACTORY xArm Python SDK
xArm Python SDKAdvancedUFACTORY's official Python library for controlling its xArm-series robot arms from code.
The xArm Python SDK is the official open-source Python library from Shenzhen-based UFACTORY. It supports the xArm 5/6/7, Lite 6 and 850 arms and installs with pip install xarm-python-sdk. You connect by creating an XArmAPI object with the control box's IP address, then call motion_enable(True) to enable the motors, set_mode() to choose a motion mode, and set_state(0) to make the arm ready to move. Everyday calls include set_position (straight-line move of the end effector), set_servo_angle (joint move) and set_gripper_position (gripper control). Mode 0 is position mode: you give a target and a speed and the controller takes the arm there. Mode 1 is servo mode: you stream targets with set_servo_angle_j and similar calls, and the controller executes only the latest one, which suits teleoperation and other cases where the target keeps changing. There are also modes for joint teaching and velocity control. Watch the units: the defaults are millimeters and degrees, and angles switch to radians only when is_radian=True.
ExampleGELLO's xArm driver calls motion_enable(True), set_mode(1) and set_state(0) to enter servo mode, then runs a 50 Hz loop by default: it reads the current joint angles, caps how far each step moves toward the leader arm's joint angles, sends the result with set_servo_angle_j, and drives the gripper with set_gripper_position.
- Also called
- xarm-python-sdk, XArmAPI, xArm SDK
- Related
- UFACTORY xArm · Software Development Kit · Streaming Servo Control · MoveJ / MoveL · GELLO · Leader-Follower Teleoperation
- Sources
- xArm-Developer/xArm-Python-SDK (GitHub)
xArm-Python-SDK API Documentation: class XArmAPI
GELLO software: gello/robots/xarm_robot.py - As of
- 2026-10