Torque calculation of complex robot arm

Hello, so I’m building a robot arm for Science Olympiad and it would be really useful for me to be able to calculate the torque that the motors need to have. Normally I would find the weight of the arm and use the torque formula, but I think that won’t work for this design. I’m using a copy of the uArm project, so it’s designed such that the end stays parallel to the ground.
robot arm.blend (561 KB)

I attached a basic rigged thing controlled by the two bones on either side to show how it works. What I want is to be able to move the arm to different positions and have blender show me the resulting torque on the pivot joints of the two arms. Thanks for your time, any help is greatly appreciated!

you can measure deviation, but we don’t have access to the impulse per frame :frowning:


import bge
cont = bge.logic.getCurrentController()
own = cont.owner


if 'LastFrame' not in own:
    own['LastFrame = own.localAngularVelocity.copy()


lastframe = own['LastFrame']
change = (lastFrame.localAngularVelocity - thisFrame.localAngularVelocity) 
X = change.x 
Y = change.y
Z = change.z

Does your code give me a velocity or torque? I want to basically place the arm at a position then see the torque of the arm on the two joints. I am inexperienced in bge, so I don’t completely understand the code.

this is the change in angular velocity you must overcome , I don’t know the exact forces involved to counter things,
(I fake it by manipulating angV)

It would definitely be easier to map the torque and position with a handful data points and then interpolate or even do line fitting in wolfram alpha.

The problem is that blender, while having a physics engine, is not built for real physics simulations.

Also you have not specified if the torque is static (ie some unit on continuous pressure will result in exact position)
or relative impulses (x force moves the actuator y degrees).

Measure it from the arm itself! A useful trick is that you can approximate the force on a servo by the current it is drawing. So with either a hall-effect current sensor around the power wire to each servo, (or a milli-ohm resistor and instrumentation amplifier), you can get the torques that are actually being applied!


If you have a known load, then you can calculate it.

The magic of the uArm design is it’s parallel beam design. This means that the torques on the joints is the same as the torque on the servos - for the most part. This means you can just do the good ol’ T=F*r between the end-point and the joint (remembering that F and r are vectors, or using the horizontal distance and vertical force).
If you want me to prove this, I can draw some diagrams.

Remember that this is not a massless robot arm, so to calculate it you’ll also have to find the masses of each arm section, it’s centre of gravity, and incorporate that into the calculations as well.

If you could draw me some diagrams, that would be really useful.

^Ditto! Because I love this kind of stuff!
My main reason for using Blender these days, is playing with ideas of robotics and aerodynamics :slight_smile: