Thread: Omnidrive help
View Single Post
  #3   Spotlight this post!  
Unread 04-02-2006, 19:17
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Omnidrive help

Assuming you have your omniwheels in a typical 45 degree setup "cutting the corners" of your drive base, the code is conceptually very simple.

Start with three values: frontward velocity, rightward velocity, and clockwise turn rate. (Negative values will represent backward, leftward, or counterclockwise.)

Compute the four motor speeds like this:
left front = forward + rightward + turn
left rear = forward - rightward + turn
right rear = forward + rightward - turn
right front = forward - rightward - turn

Of course, there are more details to work out, like how to deal with overflowing the valid range of motor control, and how to determine the control values in the first place.