Introduction to ServoJ
Function
ServoJoint
refers to the method of precisely controlling the movement of the robot arm joints through servo motors with built-in control systems. The ServoJoint
interface represents the servo position in joint space (linear).
1. ServoJ
Interface
1.1 Parameters of Interface
// ServoJ Joint Space Servo
/**
* Parameter definitions:
* q: Target value, that is, the radians of the six joints.
* a: Acceleration, not yet implemented.
* v: Velocity, not yet implemented.
* t: Expected movement time of the robot arm controlled by the command [s]
* lookahead_time: Specifies the movement duration of the robot before starting to decelerate, which is used to smooth the trajectory [0.03, 0.2]. When lookahead_time is less than a control cycle, the smaller it is, the greater the overshoot. The optimal value of this parameter is one control cycle. This parameter has not yet been implemented.
* gain: Proportional gain for tracking the target position [100, 200], used to control the smoothness and accuracy of the movement. The larger the control gain, the longer it takes to reach the target position, and the smaller the overshoot. This parameter has not yet been implemented.
*/
int servoJoint(const std::vector<double> &q, double a, double v, double t,
double lookahead_time, double gain);
1.2 Parameter Adjustment Method
- Set the
t
value (t >= 0.005). The larger thet
value, the slower the robot arm moves; the smaller thet
value, the faster the robot arm moves. - 运行
servoJoint
示例,调整std::this_thread::sleep_for()
的参数来模拟网络延迟; - Run the
ServoJoint
example and adjust the parameters ofstd::this_thread::sleep_for()
to simulate the network delay.
Note: Currently, the available parameters for the
ServoJoint
interface areq
andt
.q
represents the target trajectory point sent to the robot arm, andt
represents the expected running time from the previous point to the current point. When this t value is set as the interval time for continuously calling theServoJoint
interface, the effect is theoretically the best.
1.3 Usage Conditions
To ensure real-time performance, please use the Linux
operating system and use a wired network for connection.
1.4 Automatic Exit Mechanism
The ServoJ
function has a mechanism to automatically exit the servo
mode. After exiting the servo
mode, this function cannot control the movement of the robot arm anymore. To execute such control again, this function must re-enter the servo
mode.
The automatic exit mechanism includes:
- When any of interfaces such as "stopJoint/stopLine/abort" is called through the "SDK", the
servo
mode will automatically exit; - Once the drag mode is enabled, the
servo
mode will automatically exit; - If no
ServoJoint
command is received for a long time (5 times the expected movement time,t
), theservo
mode will automatically exit;
After the servo
mode exits, to continue using the ServoJ
function, setServoMode(true)
must be called through the "SDK" to re-enter the servo
mode;
1.3 Typical Application Scenarios
- This function is suitable for applications that require precise and stable motion control, such as assembly, cell separation and electronic component assembly;
- This function is suitable for applications that require high torque and precision, such as machining and automotive manufacturing;
- This function is suitable for applications that need to adapt to various workpieces in fixed and non-fixed shapes, such as mold manufacturing and material handling;
1.4 Problem Handling
Problem 1: Robot Arm Shaking
- Check if the network communication is normal, and use a wired network for connection;
- To improve the real-time performance, use a
Linux
operating system with a real-time kernel; - Check if the time intervals of the issued trajectory points are uniform and continuous, and appropriately increase the
t
value.
Problem 2: Robot Arm Stops Moving After a Period of Time
The following log may appear:

- Due to the uneven call time of the
servoJoint
interface executed by the customer's own program, the interval time of a certain call is too long (exceeding t*5s). As a result, the automatic exit mechanism is triggered. Appropriately increase thet
value and run the program again;
2. Test
Considerations: CPU processing capability, memory size, bandwidth, latency, and other factors of the system.
System Platform Test:
windows
platform (without live patching)linux ubuntu16.04
platform (without live patching)linux ubuntu16.04
platform (with live patching)
Performance Test:
Use benchmarking methods: Cycle time comparison, maximum payload test, transmission efficiency test, and real-time performance test.
Note: When running the servoJ
example, wait till the program execution is completed. Do not interrupt it midway. Otherwise, after the servo
mode is enabled, the servoJ
example will not be closed.
2.1 Preparation before Test
2.1.1 Network and Firewall Settings
ARCS Software Network Configuration:
https://docs.aubo-robotics.cn/application_notes/26-arcs-networkconfig/
A wired static network configuration is used on the linux ubuntu16.04
platform (with live patching).
2.1.2 Check linux ubuntu16.04
Platform for Live Patching
Steps:
Open the terminal.
Run the command:
bashuname -r # This command displays the currently running kernel version number
If the kernel version number ends with
-rt
plus more characters (for example:4.14.195-rt94
), it indicates that the live patching of the kernel is installed; If there is no-rt
, there is no live patching on the current machine.
2.2. Test Using ServoJ
Example in SDK
2.2.1 Test Process
Note:
When performing test on various system platforms, bind the routine to be tested to an isolated CPU
, call the ServoJ
interface, adjust parameters, and analyze the collected data through plotting and observe the robot arm's shaking phenomenon by touching the robot arm to determine the test results.
Example Code of example_servoj2
Execution Result:

2.2.1.1 windows
Platform (without Live Patching)
Configure the network and test the connectivity of the network.
Execute the test example of
example_servoj2
.Record the results.
Use a real-time system, set up real-time processes, bind the real-time processes to an isolated
CPU
, and callservoj with a period of
5ms`.
Qualitative analysis
Touch the robot arm by hand to feel it, which shakes obviously, seen with naked eyes.
Quantitative analysis
From the figure below, it can be analyzed that the robot arm has significant vibration.







2.2.1.2 linux ubuntu16.04
Platform (without Live Patching)
Configure the network and test the connectivity of the network.
Execute the test example of
example_servoj2
.Record the results.
Use a real-time system, set up real-time processes, bind the real-time processes to an isolated
CPU
, and callservoj
with a period of5ms
.
Qualitative analysis
Touch the robot arm by hand to feel it. There is slight shaking during the movement, which is more noticeable compared to the
linux ubuntu16.04
platform (with live patching). However, the shaking is not obvious during the ascent and descent.Quantitative analysis
From the figure below, it can be analyzed that the robot arm basically does not vibrate.










2.2.1.3 linux ubuntu16.04
Platform (with Live Patching)
Steps:
Configure the network and test the connectivity of the network.
Execute the test example of
example_servoj2
.Record the results.
Use a real-time system, set up real-time processes, bind the real-time processes to an isolated
CPU
, and callservoj
with a period of5ms
.
Qualitative Analysis
Touch the robot arm by hand to feel it. There is some shaking during the ascent and descent of the robot arm, but there is no shaking phenomenon during the motion except ascent and descent.
Quantitative Analysis
Real Robot Arm (running
aubo_control
in the control box)From the figure below, it can be analyzed that the robot arm basically does not vibrate.
Simulated Robot Arm (running "aubo_control" on the virtual machine)
From the figure below, it can be seen that in the
hw joint speed
graph, the robot arm has some shaking during the ascent and descent.
2.2.2 Test Results
System Platform | CPU | Test Result |
---|---|---|
windows platform (without live patching) | 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz | Significant vibration |
linux ubuntu16.04 platform (without live patching) | 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz | Slight vibration |
linux ubuntu16.04 platform (with live patching) | Control box (real robot arm): Intel(R) Celeron(R) CPU N3160 @ 1.60GHz virtual machine (simulated robot arm): 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz | Minimal vibration |
2.2.3 Comparative Analysis of Test Results
Known from the analysis above, the degree of vibration of the robot arm is as follows: windows
platform (without live patching) > linux ubuntu16.04
platform (without live patching) > linux ubuntu16.04
platform (with live patching). Among them, the linux ubuntu16.04
platform (with live patching) has the best effect, the difference in effect between linux ubuntu16.04
platform (without live patching) and linux ubuntu16.04
platform (with live patching) is not significant, and the windows
platform (without live patching) has the worst effect, with significant vibration.