Skip to main content

Torque control

@control

Command constraints

Necessary conditions for direct torque control

Torque commands must stay within limits and be continuous:

τ˙jmax<τ˙jc<τ˙jmaxτjmax<τjc<τjmax\begin{aligned} -\dot{\tau}_{j \max } & < \dot{\tau}_{jc} < \dot{\tau}_{j \max } \\ -\tau_{j \max } & < \tau_{jc} < \tau_{j \max } \end{aligned}

Direct torque control limits

xMateER3 Pro / xMateER7 Pro

ParameterAxis 1Axis 2Axis 3Axis 4Axis 5Axis 6Axis 7Unit
Max torque85858585363636NmNm
Max torque derivative1500150015001500100010001000Nm/sNm/s

xMate3 / xMate7

ParameterAxis 1Axis 2Axis 3Axis 4Axis 5Axis 6Unit
Max torque858585363636NmNm
Max torque derivative150015001500100010001000Nm/sNm/s
  • 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 the getStateData() interface.
Data Name (fieldName)TypeUnitMeaningAdditional Notes
tau_mArrayXDNmJoint torque / Link-side sensor torque feedbackPure feedback from the sensor, does not include friction.
tau_cArrayXDNmCommanded joint torqueSDK 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_mArrayXDNmFiltered joint torqueThe filtered result of the link-side feedback joint torque tau_m. Valid only after real-time mode is enabled.
tau_vel_cArrayXDNm/sCommanded torque derivativeThe derivative of tau_c. Valid only after real-time mode is enabled.
tau_ext_baseArray6DNmExternal torque in base frameValid only after real-time mode is enabled.
tau_ext_stiffArray6DNmExternal torque in stiffness frameValid only after real-time mode is enabled.
theta_mArrayXDradMotor positionPosition feedback from the motor side.
theta_vel_mArrayXDrad/sMotor velocityVelocity feedback from the motor side.
motor_tauArrayXDNmMotor torqueThe 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_filteredArrayXDNmFiltered motor torqueThe 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 calibrateForceSensor interface. When controlling the robot's motion through the SDK, it is recommended to call the calibrateForceSensor interface 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.
  • 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.