Skip to content

Get Joint Torques

SUMMARY

Get Joint Torques returns the net torque at each joint after gravity and friction compensation, expressed in Newton-meters.

These values reflect the torque contributed by external loads and contact forces, making them useful for force-based control and collision detection.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
joint_torques = robot.get_joint_torques()

The Code

Example: Read and Log Joint Torques

Connect to the robot and read its current net joint torques.

python
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots

robot_ip = "192.168.1.2"  # replace with your robot's IP

robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)

joint_torques = robot.get_joint_torques()
logger.success(f"Joint torques: {joint_torques}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_joint_torques reads the target_moment field from the RTDE data stream. Gravity and friction are compensated, so non-zero values in a stationary robot indicate an externally applied load. Values are in Newton-meters, ordered from the base joint to the wrist.

How to Tune the Parameters

This skill takes no input parameters.

Return Value

TypeDescription
list[float]Net joint torques in N·m, one value per joint. Gravity and friction are compensated.

Where to Use the Skill

  • External load monitoring — Detect contact forces or unexpected loads without a dedicated force/torque sensor
  • Compliant control — Use torque feedback to implement admittance or impedance control
  • Collision detection — Trigger a safe stop when a joint torque exceeds a configured threshold

When Not to Use the Skill

Do not use Get Joint Torques when: