Quote:
Originally Posted by lineskier
The way you solve the grid seems to be a case statement
|
No, its not a case statement. It's simply this:
L = Y+X
R = Y-X
I can't imagine anything simpler. It works for all 4 quadrants. No case statement is necessary.
Quote:
|
Personally I would rather have one equation that gets the value based on heading and magnitude.
|
If that's your personal choice I cannot argue. But what "one equation" are you referring to? To get heading and magnitude, you need two equations right there. Then you have to calculate the wheel speeds from those.
Quote:
|
But i guess we approach the joystick from 2 different views: a square vs a circle. I believe both approaches to be correct.
|
I also believe both approaches are correct.
Quote:
|
approaching it as a square requires normalization where as approaching it as a circle does not
|
If your X,Y values are (1,1) then your magnitude calculation will give 1.4 and you will need to clip or normalize... unless you aren't using the magnitude but converting it back to X and Y values... in which case I'm puzzled why you converted them to polar in the first place.
Would you be willing to post your code ? I'd like to understand better what you are saying.