View Single Post
  #2   Spotlight this post!  
Unread 17-04-2010, 15:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Swerve vs. Mecanum Programming

Quote:
Originally Posted by kgzak View Post
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 View Post
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)


~

Last edited by Ether : 17-04-2010 at 15:53.