View Single Post
  #10   Spotlight this post!  
Unread 01-02-2013, 13:53
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Gyro Angle Problems

Quote:
Originally Posted by Gmercer View Post
What is the range of values the getAngle function will return? The gyro updates correctly, but starts at a very small angle and only increment by maybe .15 at a time.

If we have an example angle of 6.8 degrees, and the gyro stays at such a small number, the robot goes into a death spin until reaching 6.8 degrees(which is a long time).
getAngle requires that the sensitivity of the gyro is set correctly with the setSensitivity method. For the ADW22307 gyro available on FIRST Choice, the sensitivity is 0.007 V/°/s. If you are using a different gyro, you will need to find the sensitivity from the data sheet of the gyro.

If you are using Robot Builder version 619 or earlier, there is a bug that defaults the sensitivity to 1.25 V/°/s. See the post by Alex Henning above. This would cause an issue similar to what you saw. It would take approximately 3.4 full revolutions before the robot measured 6.8 degrees. You should make sure that the sensitivity matches your gyro.

Edit: sorry, I see that you are setting sensitivity. I'll leave this here in case it helps someone in the future.

With a DMM, what is the voltage on the rate and +5v pins of the gyro?

Last edited by Joe Ross : 01-02-2013 at 14:23.
Reply With Quote