# KUKA iiwa - Measuring weight/mass of grabbed objects

• Hi,
I want to calculate the weight of objects that are grabbed with the robot (objects with irregular shapes). I was wondering wether it is possible to do it by using the internal force/torque sensors of the robot, has anyone experience or any ideas to perform the weighing task?
Accuracy is important but not critical. My guess is to read the values of the force/torque sensor of the flange (when the robot is not in motion) and compute the weight from those values. Physics is not my strong suite so any help would be appreciated

Edited once, last by AdvikRasha ().

• Orient your TCP so that when you are grabbing the object one of the vectors is pointing straight to the ground/roof. You could then get the force in that direction. That would be the force of gravity pulling this object to the ground. With the force you now can calculate mass.

I think you might want to enter an impedance mode with high resistance before polling the sensors just to make sure that all the mechanical brakes are open. I don't if the torque sensors can produce meaningful data with the brakes shut.

Might be good to filter the values by polling the sensors x number of times during 1-5 seconds and then calculating the average of that, just to remove the jitter from the sensors.

Make sure to identify your tools load data before doing any of this.

• But if the object is not grabbed form its center of mass, shouldn't I consider the torque instead of the force?. Let's say the robot grabs a bottle from one of its ends and then it grabs it from its center, the readings in Fz should be different right?

• But if the object is not grabbed form its center of mass, shouldn't I consider the torque instead of the force?. Let's say the robot grabs a bottle from one of its ends and then it grabs it from its center, the readings in Fz should be different right?

The gravitational pull should still be the same. The LBR iiwa calculates the directional force on the TCP from the torque values of all seven joints. The calculated values might not be as accurate as a direct measurement i.e. a scale. In my experience the iiwa is accurate for most applications.

If you are measuring liquid containers make sure that the liquid inside is not being stirred, this will produce inaccurate sensor readings.

• If the weight value is not that critical as you said, I guess the code below will do the job for you. Or a clue at least.

Code
1. double forceZ = - ( lbr.getExternalForceTorque( tcp, World.Current.getRootFrame() ).getForce().getZ() );
2. double weight = forceZ / 9.8;

* You can get gravity directional force with the first line no matter how your tcp is oriented.
* 1N = 9.8kgf as far as I know.

• The gravitational pull is the same but that is not what you are getting from the force of the TCP z-axis when there is something grabbed by the Tool.

AdvikRasha is in the right track, you have to think of torque. Are you picking up the same object every time?