Robot Leg Torque Tutorial

@Samsara As a first robot, a legged robot is quite complex. If you need higher current, you need to go for LiPo, but that would also mean using a higher voltage servo. The other way would be to use two smaller capacity NiMh batteries (one for the left side, the other for the right side).

I notice you assume the linkages to be weightless - this would surely make your calculations a little undervalued?
Also have you any good approaches to calculating the additional torque when moving?

@Dillon Correct, though ideally the linkages are only a small fraction of the weight of the actuators themselves. Terrain adaptation is not easy, so unfortunately we do not yet have any suggested equations. If you assume a flat surface, T3 and T4 should remain roughly constant, so it’s a question of the three legs pushing the body forward (T5 and T6) and up an incline.

So, I am using an aluminium frame for my hexapod, and MG996R servos for the actuators (which are, quite frankly, a bit rubbish) - I ended up including the mass of the leg linkages in my calculations to work out the Torques also - and worked out the COM on the tibia linkage as it is asymmetrical

The bot I’ve now built weighs around 2.4kg. when I work out the torques around the leg joints using your equations, with the additional linkage forces included, I get results that seem a little on the small side - for the knee joint I’m getting around 0.146 N.m and for the hip joint I’m getting around 0.007N.m
I’ve been over your method and it seem right to me - and it does look as if the torques cancel each-other out more with the hip joint, with it being more central, but my intuition and observations lead me to think the servos are working harder than this result would indicate. - the sevos claim a stall torque of 12kg.cm or 1.18N.m

I also built a FBD in Autodesks online ForceEffect and output a report - the normal reactions at the feet matched the results I got numerically, but the torques at the joints were quite different - though I’m not sure what algorithm they are using to get those results!

Incidentally I’m using an 11.1V LiPo battery, but stepping it down with a couple of 15A (switch mode) buck converters to 6V

Hello again. I’ve also calculated the torque on the hip when the leg is in swing mode, setting the two angles at 45 - when in stance I get 0.007 N.m but I get 0.056 N.m in swing - could that be right? What is confusing me is that I would expect that the servo is doing more work when supporting the body

update: well, I worked out where I have gone wrong - rather than balancing the torques across the the whole system - to get the load torque at the left hip for example, you analyse it from it’s fixed point on the body, looking left, balancing the moment ar the left tarsus or foot

So consider for this example that the fixed point is to the body, and the normal reaction at the foot is the load on the joint

So - the load torque at the left hip is ((L1 cos(theta1))+(L2 cos(theta2))) * N1 - Correct?- (meaning also that my servos are hoplessly underpowered!)

@Dillon MacEwan Each servo weighs 55g, so 18 would be 1Kg. It sounds like your mechanical frame is greatly overweight. Using an 11.1V and stepping down to 6V seems rather inefficient as well. Regarding the files, please note that unfortunately it is beyond the scope of this article to offer individual / personalized support / consultation.

@Dillon You would need to explain the calculations / equations you used. Feel free to create a new topic on the RobotShop Forum.

@Dillon For a 2.4Kg robot, the servos you are using do seem quite under-powered.

Using a switching (buck) power converter claims >90% efficiency for power conversion

The frame is lazercut aluminium and comes to around 900g

The battery is 200g, and the rest is just the controllers, cables fixings and sensors

I think it would help in the tutorial if you showed that the torque on the hip was just the N1 normal force times the horizontal distance of the foot from the hip
((L1 cos(theta1))+(L2 cos(theta2))) * N1
Likewise for the knee:
L1 cos(theta1) * N1

This greatly simplifies the calculations for working out the servos needed for a particular configuration

Sir, could you please upload a video explaining all these things, so that we can understand better ?
Please include the explanation for derivation of the equations.
How do we take the angles Theta 1,2,3 ??

@Goutam Unfortunately a video in the near future will not be possible. We do hope to work on the automatic tool this coming year. We have tried to include the basics of the equations, so if you need additional insight, we suggest learning about the concept of torque. The angles are dynamically calculated based on your walking gait and inverse kinematics (not covered in this article).

Hi! I agree that in the calculations in e.g. Tknee you are calculating the torque in the knee, but only if the knee was stiff. A motor would work against a torque from each side. The N1 part would be negative, but wouldn’t the 2*N2 part also be negative, since it is working against the torque of the motor?(assuming the motor is trying to contract the knee).

@Hozt Given that the weight of the robot is in the -z direction, only the normal force of the surface acting against the feet prevents it from falling (force balance)

Yes. I agree. The normal forces are all pointing upwards. But when calculating \Sigma T_{Knee}, the motor is trying to contract the joint (to keep it from falling down to the ground). Wouldnt all the normal forces be working against T_{knee }, hence have a negative sign, and all the parts with w1, w2, w3 etc. be working the same way as the motor, hence have a positive sign?
like this:
SUM(T_knee) = T1 - N1*(L1cos(ø1))
+W2
(L2cos(ø2)) + w3(L2cos(ø2))
+W4
(L2*(cos(ø2)) + L3) + 2W3*(L2cos(ø2) + 2L3)
+2W2
(L2cos(ø2) + 2L3)
+2W1
(2L2cos(ø2) + 2L3)
-2N2
(2L2cos(ø2) + 2L3 + L1cos(ø1)

The calculations in the tutorial is calculating the torque from the knee to a fixed point in space, which does not exist (unless you are holding on to the knee with your hand).
Am i mistaken?

@Hozt Appreciate the insight, and we are happy to take a look. If we take T1 as the positive, the weight (W1 to W4) must be downwards, while the normal force comes from the table / surface. The torque at the knee would be the sum. For simplicity, we must have the torque balance be zero (therefore zero motion, simply having the robot standing). The normal force is not acting “against the torque” but rather against the weight of the robot (W’s). If you’d like to include images, we might start a new topic on the RobotShop Forum.

I would like that. If you could send me an email (I assume you can find it from where I send these comments), so that I find the topic. The thing I have a problem in understanding is that the robot is applying a torque that would work the opposite ways on either side of the motor. Either contracting or extracting (?). If we imagine that the motor is just a joint with no motor, and the “robot” is simplified with equal links, just one link on either side, the sum(T) would be zero, but the joint would still collapse. If you could start a thread or send me an email, I could send you an illustration to help my explanation. (sorry for the bad english)

@Hozt You can create a new topic here (you’ll need to join anyway): https://www.robotshop.com/forum/hexapod-robots-f86 Call it something like “Hexapod Static Force Calculations”

sir how to calculate length of the actuator at the time of compression and expansion and how select the actuator length for two leg robot

@venugopal Unfortunately this tool does not cover the situation where a linear actuator is used (or for a two legged robot). You will need to do a force / torque diagram in order to know the lengths / stroke and force needed for each joint.