View Single Post
  #3   Spotlight this post!  
Unread 20-03-2011, 17:16
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Help the field crew, reset your gyro in autonomous

We had one match at Kettering where our robot spun in circles while looking for the second tube. That was not because the gyro was not reset in the beginning of auto (it is), but because the gyro was moved while determining the centerpoint.

I really don't understand why there is no way, in the WPI library, to force a known centerpoint. It is much easier for the robot to determine it for itself (and it does a good job, averaging 1000 samples to get it), but if it moves, then that is very very bad.

I modified and attached my copy of WPI_GyroOpen to allow me to force setting of the gyro centerpoint. If set it to 0, it will determine the centerpoint for itself, and tell you what it is on the Center output. You can take that, and set it as a constant to centerpoint, so in the future it will use the known centerpoint. It will still find its own centerpoint (takes 2 extra seconds to boot up), but it will use the one you give it instead. I also have several other configuration options brought out to the connector, but in this version they are all set as they are in Gyro Constants. Oh, you can also set the gain in this VI instead of calling another VI to do it.
Attached Files
File Type: vi WPI_GyroOpen.vi (26.9 KB, 12 views)
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack