Quote:
Originally Posted by Ether
See Joe's post.
The joystick makes a square, not a circle. The algorithms mentioned here map every point in the square to a set of left/right motor outputs.
You don't need trig to do this.
FR = -Y -X -Z
FL = -Y +X +Z
RR = -Y +X -Z
RL = -Y -X +Z
How does trig make the above any easier ?
How does using trigonometry make the above mec code any "cleaner", or "more efficient"? The above code is kinematically correct, even after normalization.
|
thanks for the feedback.
I guess if you approach the js as a square, you are def right. I personally always approach the joystick as a circle as the points you can get on a joystick can be easily mapped to either a circle or a square.
The way you solve the grid seems to be a case statement. Personally I would rather have one equation that gets the value based on heading and magnitude.
Again your algorithm certainly solves the problem well and I do not believe it would have any dead spots. But i guess we approach the joystick from 2 different views: a square vs a circle. I believe both approaches to be correct.
approaching it as a square requires normalization where as approaching it as a circle does not (unless we start looking at mecanum where factoring in rotation requires normalization )