View Single Post
  #12   Spotlight this post!  
Unread 16-01-2011, 11:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: Holonomic Control System

Quote:
Quote:
Originally Posted by Ether
I'm trying to make sense out of the above. Did you add extra code to purposely zero-out the first joystick when the second one is giving a command (or vice versa)? If so, why did you think that was necessary?
SudoSammich replied:
I wasn't entirely sure how it would mix.
The drivetrain you described in your original post (4 omnis placed at 45 degree angles relative to the frame) is holonomic, which means it can perform fore/aft (Y), right/left (X), and rotate (Z) motion simultaneously, if the inverse kinematic calculation for wheel speeds is done correctly.

Quote:
I programmed it in the method that I first came up with, which consisted of converting the joystick inputs to a polar coordinate scale (rotated 45 degrees) and mapped each set of motors across from one another to either the X or Y coordinate of the point (respectively). This doesn't exactly lead to an easy blend with spinning as far as I can tell. While it's something I'll probably try to tackle later, it's not done YET.
You don't have to re-invent the wheel (sorry for the pun) if you don't want to. The FRC-provided software development environment contains library functions for the omni drive you described. In LabVIEW for example, using the Cartesian Holonomic vi, all you have to do is wire your Y, X, and Rotate inputs into the vi, and it does all the math. If you have a gyro, there is an input on the vi for that too, so you can have field-centric control.