Examples are valid for:

UFACTORY xArm Studio version:  ≥ 1.6.0
UFACTORY xArm Firmware version: ≥ 1.6.0
UFACTORY xArm Python-SDK:
1.6.0

The main parameters that affect the movement speed of UFACTORY xArm are:
speed, acceleration, and jerk. It is recommended to adjust the jerk of UFACTORY xArm to the maximum, which will speed up the motion of UFACTORY xArm.

Parameter adjustment in UFACTORY xArm Studio

Jerk setting Speed setting:  Set the speed value in the interface of different motion commands.

Acceleration setting:  Set the mvacc value in the interface of different motion commands.

Jerk setting:   set_tcp_jerk( )     set_joint_jerk( )

``arm.set_tcp_jerk (10000)arm.set_joint_jerk (500, is_radian = True)arm.save_conf ()``

### 2)  Motion planning

Linear motion

The continuous motion of UFACTORY xArm can be realized by planning LineB motion, thereby speeding up the motion of UFACTORY xArm.

The realization of continuous motion must meet the following three conditions: ### Examples

For the video display and script file of example 1, please check the following link:
xArm-linear motion-example1.py

Blockly Key parameter description

Radius = 5 in the "move (arc) line" command refers to setting the radius (R = 5mm) of the transition arc between two straight lines, which is used to achieve a smooth transition of the arc in linear motion.

The parameters of Radius can be set as Radius > 0, Radius = 0, Radius < 0, different parameters correspond to different trajectories.

Radius> 0. For example, setting Radius = 5, the turning trajectory is as shown in the black arc in the figure below, which can achieve a smooth turning effect. Radius = 0. There is no arc transition at the turn, it is a right-angle turn, as shown in the figure below. Radius <0. There is no arc transition at the turn, it is a right-angle turn and the motion trajectory is discontinuous, as shown in the figure below. Note:  If you need to plan the continuous movement of the robot arm, please make sure Radius>0.

●  Wait = false

The wait in the "move (arc) line" command refers to whether it is necessary to wait for the execution of this command before sending the next command.
If you need to plan for continuous motion, make sure to wait = false.

Python-SDK

``import osimport sysimport timesys.path.append(os.path.join(os.path.dirname(__file__), '../../..'))from xarm.wrapper import XArmAPIarm = XArmAPI('192.168.1.135')arm.motion_enable(enable=True)arm.set_mode(0)arm.set_state(state=0)arm.set_tcp_jerk(10000)arm.set_joint_jerk(500,is_radian=True)arm.save_conf ()arm.reset(wait=True)speed1=1000mvacc1=50000while True:  arm.set_position(x=400, y=-100, z=250, roll=180, pitch=0, yaw=0,radius=50,   speed=speed1, mvacc=mvacc1, wait=False)  print(arm.get_position(), arm.get_position(is_radian=True))  arm.set_position(x=400, y=100, z=250, roll=180, pitch=0, yaw=0, radius=50,   speed=speed1, mvacc=mvacc1, wait=False)  print(arm.get_position(), arm.get_position(is_radian=True))  arm.set_position(x=300, y=0, z=250, roll=-180, pitch=0, yaw=0, radius=50,   speed=speed1, mvacc=mvacc1, wait=False)  print(arm.get_position(), arm.get_position(is_radian=True))``

Note：
If the above three conditions cannot be met at the same time, the xArm will not realize continuous motion:

●  If Radius> 0; but wait = True;

For the video display and script file of example 2, please check the following link:
xArm-linear motion-example2.py

●  If the waiting time is set, wait = False; but Radius <0;

For the video display and script file of example 3, please check the following link:
xArm-linear motion-example3.py