Hi guys
Ive been trying to solve the following problem:
Basically i have a platform with 4 lifts/motors and i want to level it but i only have access to the following info:
-The amount the legs have extended, and the pitch and roll of the platform (in degrees).
The only way i can think of doing it is checking the pitch and roll and then adjusting as follows:
If the pitch of the platform is outside of the level threshold, lift a leg and a see if it improves or makes the the pitch worse. If it improves it keep lifting that leg, if it makes it worse reverse it a little and move to the next leg.
Repeat the same on each leg for correcting the roll.
Once everything is level the platform will start to raise all four legs up and down together.
Though this logic doesnt work right, it will work if the surface its on is relatively flat (eg. just pitch is out) , but if its on a surface thats very uneven on all four legs it doesnt seem to be able to reach level.
Im guessing my solution is wrong, there is probably a better way for me to be adjusting the legs (maybe in stages or using pairs) but i dont know how.
If you can help me i would appreciate it very much