How to calculate the tools center of gravity and payload for URe robot

How to calculate the tools center of gravity and payload for URe robot

There are two ways to calculate the payload and the center of gravity or CoG, the first is to do it manually.

To measure the CoG and payload manually go to the “Installation” tab then General > Payload. Here you will see a button labeled Measure, when pressed the instructions can be followed to measure and set the CoG and payload. The more varied the wrist angles are the more accurate the measurement is.


Photo from: Universal Robots Academy

The second is done using URScript.

To do this we use the estimate_payload() function withs needs two arguments:

  • a list of at least 4 tcp or joint positions (poses)
  • a list of the same lengte with the tcp forces at these positions (wrenches)

Wrenches can be recorded with the get_tcp_force() function. If the rotational distance between any two positions is less than Pi / (2*n) radians, where n the number of poses, an error will be given.
Estimate_payload() has a stuct[mass, cog] as a return value.
We had the problem that the robot would give an error if we set the payload to fast after measuring so we put a sleep before this.

def measure_payload():

  # add positions to pose list
  pose_list = [p1, p2, p3, p4] 

  # initialise wrench list with placeholders to fill later
  wrench_list = [p[0,0,0,0,0,0], p[0,0,0,0,0,0], p[0,0,0,0,0,0], p[0,0,0,0,0,0]]

  # wait a bit for stability
  sleep(1)

  i = 0
  while i < 4:
    movej(pose_list[i])                 # Move to positions
      
    # wait a bit for stability
    sleep(1)

    wrench_list[i] = get_tcp_force()    # Assign force data
    i = i + 1
  end

  # Estimate payload with positions and wrench forces
  payload = estimate_payload(pose_list, wrench_list)
  # wait a bit for stability
  sleep(1)
  # Set new payload
  set_payload(payload.mass, payload.cog)

end

Examples are valid for:

CB3 Software version: 3.3 and onwards
e-Series Software version: All versions

2 Likes