Sensor torque transformation
2 minute read
A joint torque sensor measures the torque at the load directly, where the motor torque is only an estimate. The sensor torque transformation turns its value into Nm. It works in one direction only, from the sensor to the application, and the gearbox ratio is not applied. Paths are under actuatorControlLoopNN/.
Using the standard robot GUI?
The sensor torque transformation is under Torque Sensor Calibration on the robot GUI’s Compliance tab.
- Offset, GainNum, GainDen:
transducer/offset,transducer/gainNum,transducer/gainDen. - Ref and the Ref button:
referenceLoadSide, and the calibration triggersetHardwareReference. - Sensor Torques: the calibrated torque in Nm. Static Grav. Tq.: the gravity torque the robot calculates for its current pose.
To calibrate in the GUI: set GainNum and GainDen, put the robot in a still pose, copy Static Grav. Tq. into Ref, press the Ref button, and press Save Settings.
Enter the gain
Link the sensor’s value to sensorTorqueActual, then tell the transformation how many sensor units make one Nm. The parameters are under sensorTorqueTransformation/:
| Parameter | What it does | Default |
|---|---|---|
transducer/gainNum, transducer/gainDen |
Sensor units per Nm, as a fraction. A negative gainNum reverses the sign |
1, 1 |
referenceLoadSide |
The torque in Nm the sensor should read when you calibrate | 0 |
transducer/offset |
Sensor value at zero torque, stored by the calibration | 0 |
Leave the gain at 1, 1 if the sensor already reports Nm.
Check the sign
A sensor with the wrong sign reports every torque in the wrong direction. Engage the axis and hold it still in a pose where gravity loads the joint: the motor then carries the same torque as the sensor, so actuatorSensorTorqueActual must have the same sign as actuatorTorqueActual. If it has the opposite sign, make transducer/gainNum negative.
Calibrate the zero
A torque sensor rarely reads exactly zero at zero torque. Calibration measures its offset in a pose where you know the torque on the joint, and stores it:
offset = sensor value − referenceLoadSide × gain
- Put the axis in a still pose where you know the torque on the joint. On a robot that is the gravity torque, in
root/ManipulatorControl/idJointTorque/actual/gravity. - Write that torque to
sensorTorqueTransformation/referenceLoadSide. - Set
setHardwareReferenceinsensorTorqueTransformation/transducer/referencing/:fromStateto1, then back to0. - Check that
actuatorSensorTorqueActualnow reads the known torque, then save the parameter tree.