View Single Post
  #2   Spotlight this post!  
Unread 09-06-2011, 23:20
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Getting the bot to go straight?

I think you must be mis-remembering. Gearing both sides (left and right) of a differential drive together with a 1:1 ratio IS a surefire way to drive straight*, but good luck turning Otherwise, there is nothing magical about a 1:1 ratio (perhaps in the old days with heavily biased drill motors, using an extra 1:1 ratio would let both motors spin CW/CCW at the same time, but in the CIM era, this is a much more minor issue).

In general, there are a few strategies teams use to drive straighter:

1. Pay close attention to the mechanics. Alignment. Weight distribution. Friction in the drivetrain. Everything on the left should look and feel like everything on the right (always a good idea).

2. Using encoders. When you are driving perfectly straight, the left and right encoders should report the same speed and distance traveled. But when you are veering, one side moves faster than the other. You can write code to automatically boost the power on the slower side or lower the power on the faster side to force the bot to go straight (a good application for a PID controller).

3. Using gyros. Gyros provide you with angular rate information (how fast you are turning). Integrate their output over time (e.g. sum it all up) and you get the heading of the robot. A perfectly straight robot should have 0 angular rate, or in other words, should maintain the same heading. Similar to above, you can write code to tell the bot to adjust motor power to fight any heading changes that you see.

*Assuming everything is aligned, weight is reasonably balanced, etc.