View Single Post
  #9   Spotlight this post!  
Unread 28-01-2010, 18:20
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Mecanum Wheels Programming

Quote:
Originally Posted by daltore View Post
One way to get around this is to multiply the magnitude by .7, which will bring the max value back down to 1. However, this means that you can't go as fast forward or sideways, and you're only getting full speed diagonally. The way I prefer is to measure all of the motor values, and if any of them are out of range, scale all of the motors down to the most out-of-range motor (if the fastest motor is getting a value of 1.141, divide all of the motors by 1.141). This allows you to have full power in all directions, while maintaining correct vectors.
Just FYI, very similar changes were made to the WPILib code a while back and will be in the next update.
Reply With Quote