Skip to content

Get Payload Center of Gravity

SUMMARY

Get Payload Center of Gravity returns the configured center of gravity offset of the payload relative to the TCP frame, as a 3-element vector [x, y, z] in meters.

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
cog = robot.get_payload_cog()

The Code

Example: Read and Log Payload Center of Gravity

Connect to the robot and read the configured payload center of gravity offset.

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)

cog = robot.get_payload_cog()
logger.success(f"Payload center of gravity: {cog}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_payload_cog reads the payload_cog field from the RTDE data stream. The returned vector is the position of the payload's center of gravity relative to the TCP frame, in meters. This value is set in the controller's payload configuration, not measured dynamically.

How to Tune the Parameters

This skill takes no input parameters.

Return Value

FieldTypeDescription
coglist[float]CoG offset [x, y, z] in meters, relative to the TCP frame.

Where to Use the Skill

  • Verify CoG configuration before tasks where incorrect CoG leads to force-control errors or unexpected torque.
  • Log CoG alongside joint torques for validation.

When Not to Use the Skill

Use a different skill when:

  • You only need the payload mass value — use Get Payload instead.