View Single Post
  #2   Spotlight this post!  
Unread 02-03-2015, 13:00
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,717
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Driving Straight With Encoders

Quote:
Originally Posted by microbuns View Post
How do you drive straight with a tank style drivetrain using encoders (no gyro)? Our bot has 2 wheels which each have identical encoders on them, but unfortunately one side has more friction than the other side.

Our best solution we have right now (which isn't amazing) is to have a speed PID controller on both sides, which ensures they are both going the correct speed relative to the floor. However, this doesn't always guarantee the wheels get up to speed in time - meaning one side may get as much as 2-3 inches ahead of the other while they are speeding up - this difference will be maintained as they stay at speed.

I was thinking about somehow trying to minimize the difference between the two sides' encoders, but I'm not exactly sure what/how to go about that. Do you just have some speed factor you add to one side and subtract to the other that scales off the difference of the two sides?
What language are you using?

Last year we read the values of the encoder and then used a PID controller with a setpoint of 0 and did as you said, added to one side and subtracted from the other. This can also be done using arcade style driving just just putting your PID output into the turn value.