Quote:
Originally Posted by kgzak
I want to be able to go any direction with mecanum wheels not just forward backward and strafe.
|
The algorithms in both links allow all 3 degrees of freedom: forward/reverse, stafe left/right, and rotate clockwise/counterclockwise.
Quote:
Originally Posted by kgzak
I want to use that to create a field oriented drive so I press the joystick in any direction and it moves in that direction.
|
The 3-axis joystick algorithm can be made field-oriented simply by doing a coordinate axis rotation of the X,Y joystick values before feeding them to the algorithm.
x' = xcos(theta) - ysin(theta)
y' = xsin(theta) + ycos(theta)
... but Buchanan's approach is technically more correct and will yield more optimal control (more accurate directional control, smoother operation, and less scrubbing of the wheels)
~