Torque control
@control
Command constraints
Necessary conditions for direct torque control
Torque commands must stay within limits and be continuous:
Direct torque control limits
xMateER3 Pro / xMateER7 Pro
| Parameter | Axis 1 | Axis 2 | Axis 3 | Axis 4 | Axis 5 | Axis 6 | Axis 7 | Unit |
|---|---|---|---|---|---|---|---|---|
| Max torque | 85 | 85 | 85 | 85 | 36 | 36 | 36 | |
| Max torque derivative | 1500 | 1500 | 1500 | 1500 | 1000 | 1000 | 1000 |
xMate3 / xMate7
| Parameter | Axis 1 | Axis 2 | Axis 3 | Axis 4 | Axis 5 | Axis 6 | Unit |
|---|---|---|---|---|---|---|---|
| Max torque | 85 | 85 | 85 | 36 | 36 | 36 | |
| Max torque derivative | 1500 | 1500 | 1500 | 1000 | 1000 | 1000 |
Torque-related State Parameters
- These state data can be obtained in real-time mode. You can subscribe to the data by calling the
startReceiveRobotState()interface, and then fetch their real-time values in the control loop using thegetStateData()interface.
| Data Name (fieldName) | Type | Unit | Meaning | Additional Notes |
|---|---|---|---|---|
tau_m | ArrayXD | Nm | Joint torque / Link-side sensor torque feedback | Pure feedback from the sensor, does not include friction. |
tau_c | ArrayXD | Nm | Commanded joint torque | SDK sent command value. Gravity compensation and other parameters need to be added to become the final torque command value in the system. Valid only after real-time mode is enabled. |
tau_filtered_m | ArrayXD | Nm | Filtered joint torque | The filtered result of the link-side feedback joint torque tau_m. Valid only after real-time mode is enabled. |
tau_vel_c | ArrayXD | Nm/s | Commanded torque derivative | The derivative of tau_c. Valid only after real-time mode is enabled. |
tau_ext_base | Array6D | Nm | External torque in base frame | Valid only after real-time mode is enabled. |
tau_ext_stiff | Array6D | Nm | External torque in stiffness frame | Valid only after real-time mode is enabled. |
theta_m | ArrayXD | rad | Motor position | Position feedback from the motor side. |
theta_vel_m | ArrayXD | rad/s | Motor velocity | Velocity feedback from the motor side. |
motor_tau | ArrayXD | Nm | Motor torque | The actual torque feedback from the motor, includes friction. This feedback value can be converted into the joint feedback torque (i.e., link-side torque converted via motor force) by multiplying it with the reduction ratio. |
motor_tau_filtered | ArrayXD | Nm | Filtered motor torque | The filtered result of the motor feedback torque, which is also the final sent command. You can use setFilterFrequency to configure the filter parameters. Valid only after real-time mode is enabled. |
4. Common issues
Sag under direct torque control
Torque behavior depends on arm hardware, load parameters, and force-control model accuracy.
-
Verification (pick one)
- Enable drag mode, hold the drag button, and check whether the arm stays still (no float or sag).
- Run RL force-control related routines and confirm they behave normally.
If either check fails, there is likely a force-control model error.
-
Recommendations
- If the model is wrong:
- Set load mass and COM accurately (do not guess).
- Run force-sensor calibration via the HMI interface or the SDK's
calibrateForceSensorinterface. When controlling the robot's motion through the SDK, it is recommended to call thecalibrateForceSensorinterface in the program to calibrate the force sensor before each movement.
- If the model is fine:
- Check commanded torques first.
- Reason for robot drifting under zero-torque control: During torque control, the controller's underlying layer compensates for friction and gravity, so the actual commanded torque executed by the servo is friction + gravity + commanded torque sent by SDK. Since static friction lacks a precise mathematical model, inadequate torque compensation may cause the robot to move; this can be addressed by adjusting the friction compensation coefficient.
- If the model is wrong:
-
Debugging tips
- Start with small magnitude and low slew rate, then ramp up.
- Avoid blocking or heavy work in the control callback to keep the torque loop stable.
- If network jitter is present, prefer a direct, simple link.