View Single Post
  #14   Spotlight this post!  
Unread 28-01-2016, 12:37
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 519
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Problems driving straight.

Two different gearboxes will never produce the same exact output power/torque/rpm, because small variances in gear friction and efficiency can drastically change the performance.
I assume you don't have encoders you can use to match the wheel speeds?
If not, then simply add a "bias" multiplier to the motors in the faster gearbox so its max speed is slower such that it matches the other gearbox.

For example, if the robot is steering to the left, that means the right gearbox needs to be slowed down:

bias=0.9; // Figure out what number to use here until the robot drives straight, should be between 0 and 1 noninclusive

leftmotor.set(joystick.getY());
rightmotor.set(joystick.getY()*bias);
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)