Sensor torque transformation

Convert a joint torque sensor’s value to Nm, check its sign and calibrate its zero.

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/.

Torquesensor sensorTorqueTransformation offset and gain, no gearbox Axescontrol sensorTorqueActual actuatorSensorTorqueActual sensor units Nm all axes together: root/AxesControl/sensorTorquesActual
Using the standard robot GUI?

The sensor torque transformation is under Torque Sensor Calibration on the robot GUI’s Compliance tab.

Torque Sensor Calibration panel of the robot GUI for axis 1: Offset, GainNum, GainDen, Filter, Ref in Nm with a Ref button, Sensor Torques and Static Grav. Tq.
  • Offset, GainNum, GainDen: transducer/offset, transducer/gainNum, transducer/gainDen.
  • Ref and the Ref button: referenceLoadSide, and the calibration trigger setHardwareReference.
  • 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

  1. 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.
  2. Write that torque to sensorTorqueTransformation/referenceLoadSide.
  3. Set setHardwareReference in sensorTorqueTransformation/transducer/referencing/:fromState to 1, then back to 0.
  4. Check that actuatorSensorTorqueActual now reads the known torque, then save the parameter tree.