View Single Post
  #1   Spotlight this post!  
Unread 30-03-2010, 14:17
FRC4ME FRC4ME is offline
Registered User
FRC #0339
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Fredericksburg, VA
Posts: 324
FRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant futureFRC4ME has a brilliant future
Re: It is impossible... ...until there is no other way...

Quote:
Originally Posted by Formerly Famous View Post
Another thing I would say is in the design. Does anyone else have times when they sit there for hours thinking about something and how to fix this one little problem, and then someone walks in and tells you the solution? I know that has happened to me many times. I am always shocked at how simple an impossible solution is.
I had a similar experience when working on autonomous code in 2008. We had the robot running laps around the practice field just fine, using encoders for distance and a gyro for turns. We had SuperShifters on the robot. Our turn loop wasn't very well-tuned, so we had to turn corners in first gear while going forward in second gear.

So the robot would go across the field in second gear, shift to first, turn left 90 degrees, traverse the field (still in first) turn left 90 degrees, shift to second, go across the field...etc until time ran out.

The problem is, the second turn would always overshoot by 10-20 degrees. We had no idea why this was occurring. We looked through the code and verified that the code being called for the first turn was exactly the same as the code being called for the second turn. Both turns took place in first gear, both were 90 degrees using the same feedback loop, and both were followed immediately by a straight section. We spent hours working on this, but couldn't figure out why the turns should be any different.

Then, we asked a mechanical mentor to watch autonomous run. He immediately understood the problem: "you're shifting into second gear immediately after that second turn. It takes about a half-revolution for the gears to engage after a shift."

Swapping the position of two lines of code, to stop the motors before shifting gears, solved the problem.
__________________
Go directly to queue. Do not pass pit.
Reply With Quote