View Single Post
  #5   Spotlight this post!  
Unread 02-02-2008, 00:13
ZZII 527's Avatar
ZZII 527 ZZII 527 is offline
"Scale Electric Vehicle"
AKA: Shane Colton
FRC #0097
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Cambridge, MA
Posts: 366
ZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond repute
Send a message via AIM to ZZII 527
Re: Bizarre Mecanum Programming Bug

We saw this too, a bit. Weight distribution and frame straightness/rigidity is also very important, I'm told.

This can be fixed by feeding back the gyro into the rotation command. Something like:

...
read joysticks and adc for gyro, scale to same units
...
rotation = (joystick_rotation - gyro_rotation) * gain;
...
do mecanum algorithm
...

So if you try to purely translate and get some rotation, the gyro picks it up and the controller sends a rotation command the other way, even if the joystick is in the zero rotation position. Your results may vary, but when we stuck this in we got this:

http://techtv.mit.edu/file/544

This is with both joystick and gyro scaled to a value of -127 to 127 and then the difference fed into a mecanum routine with a gain of 1. You can see it auto-correcting rotation if you look closely.
__________________
MIT Mechanical Engineering
>> College Mentor, Team 97: Cambridge Rindge and Latin School with The Edgerton Center, MIT Mechanical Engineering, Bluefin Robotics, and Draper Laboratory
>> Alumnus, Team 527: Plainedge HS

Last edited by ZZII 527 : 02-02-2008 at 00:19.