|
Re: Mixing Joystick Values for mecanum wheels
There are other ways of doing this that will get you the full range of values. By the way, the range is 0-255.
I made up some mixing equations for an omni drive that I was making, but its outputs aren't the wheel setup that you have, so they would have to be revised.
One suggestion that might help to get you in the right direction is to first map out your stuff for going forward/backward and left right.
Then, consider turning as an override so that you have one speed that each wheel wants to go in the desired x-y direction and the value of how much you want to turn and scale down the effect of the x-y motion as the desired turn gets sharper.
Assume X, Y, and Z are your inputs, Z being rotation. I beleive your final product will look something like:
n=abs(z-127)/128;
LF=Z+n( (X-Y); //and adjust this for each of your wheels
|