PDA

View Full Version : Changes to Walking



ralphcampbell
07-03-2016, 09:59 AM
I have been trying to get my HROS-1 to walk better. I used the walk_tuner to slow down the rate (~5 second period). It seemed like the foot would roll to the outside as it is lifted. I analyzed the source code for Walking.cpp and fixed what I think are a some bugs in computeIK(). For one, the line from the hip pivot point to the knee and the knee to the ankle isn't in-line with the thigh/calf so there is an offset that is needed for the hip and ankle roll.
After correcting for those, I can see that a very large (~50mm) left/right offset is needed before the robot can balance on one leg. Usually, the weighted hip rolls as the opposite leg is lifted. I tried adding a bit of offset to help compensate but the motor seems to be near the torque limit.
I tried changing the y_swap value to hold its position while moving the opposite leg and setting the forward/back ration to 50%. This makes the robot lean left, hold, lift right leg, step forward, set down right foot, lean right back to center. However, the left hip still rolls.

I'm nearing the limit of things I can think of to fix this in software.
One hardware solution would be to make the legs longer so there is less left/right lean needed and less torque required when lifting the opposite leg.
Has anyone else had similar problems?
Any other suggestions?

jwatte
07-03-2016, 03:36 PM
so there is less left/right lean needed and less torque required when lifting the opposite leg


How does that work? The torque really is the horizontal distance out from the center of rotation.
A longer leg will rotate less in degrees, but you still need to shift the same amount of mass the same horizontal distance, so the torque should be the same?

tician
07-03-2016, 05:34 PM
How does that work? The torque really is the horizontal distance out from the center of rotation.
A longer leg will rotate less in degrees, but you still need to shift the same amount of mass the same horizontal distance, so the torque should be the same?

It is not so much requiring less torque as it is expending less energy due to slower, smaller, and/or smoother movements. Lower energy expenditure means longer battery life and can mean slower overheating of servos depending on construction and control system.

Stability of an inverted pendulum can be reasonably maintained by keeping the center of mass within a few degrees of vertical above the center of support (in the case of bots, it is a foot of some sort). The longer the legs: the higher the center of mass, the larger the moment of inertia (which makes it more 'reluctant' to rotate about the support point; i.e. falling over), and the wider the horizontal range where stability can be maintained (larger area at base of inverted cone). Larger range/area of relative stability means you can keep the center of mass further horizontally from the center of support, which means less shifting of the legs and/or body.

jwatte
07-03-2016, 08:03 PM
I understand the balancing part (why plate spinners have long sticks!)
I don't think that the goal of requiring less torque to lift the opposite leg will be solved through longer legs, though.

ralphcampbell
07-04-2016, 01:06 PM
I tried rotating the knee motors #13 and #14 90 degrees by attaching them to the ankle brackets by the narrow end of the motor instead of the side.
This lengthens the calf from 73 to 93 mm. I modified the Kinematics.h and Walking.cpp to account for the changes and now less left/right swing is needed.
However, it isn't preventing the robot from "dipping" the weighted leg's hip as the opposite leg is being lifted.

tician
07-04-2016, 03:07 PM
There are a few ways to decrease the torque required by the hip roll servo: 1) decrease the width of the hips, which would increase interference between the two legs; 2) decrease the mass of the torso, or make it shift, so that the center of mass moves closer to the hip of the support leg; 3) add external devices (usually system of springs, cables, and levers) to counter the weight of the torso so that the leg shifts on its own to become perpendicular to the hip and the servo only has to work hard when swinging the leg in or out laterally; 4) etc.

Increasing the length of the leg makes it possible to not swing the foot as close to the center of the bot while maintaining a semblance of stability which can permit smaller and smoother motions. However, not keeping the ankle directly underneath the center of mass will increase the torque required by the ankle roll servo to hold the bot upright.

Brooks
07-04-2016, 07:07 PM
After correcting for those, I can see that a very large (~50mm) left/right offset is needed before the robot can balance on one leg. Usually, the weighted hip rolls as the opposite leg is lifted. I tried adding a bit of offset to help compensate but the motor seems to be near the torque limit.

This is interesting!

Are you saying that your hip servo is "buckling" under the load? If so, would stronger servo help? Or better posing?

ralphcampbell
07-04-2016, 07:23 PM
Yes, the hip servo is buckling under the load. I assume a stronger servo would help but maybe not.
Part of the problem is the hips are relatively wide so that is why I was trying longer legs to reduce the angle needed to bring the COM over the ankle.
I could make the robot tip more at the hip but it would look like a drunken walk.

Brooks
07-04-2016, 09:59 PM
These are the types of issues I find fascinating! I see from the picture you posted that the "thigh" attaches to the servo at the hip at almost a 45-degree angle? Is this by design? Or simply because of the pose he's in? I would guess that pose would take a lot of energy to sustain.

Too bad you can't rotate the legs at the hips while walking. You could keep the feet close together while walking (keeping them tucked in close to the CG), and open them out as you came to a halt. It's what I'm doing with my hexapod; he's to adjust his stance as he comes to a halt. Even now he parks himself on his bottom, servos in 0-torque, if left un-commanded for more than a few seconds.