Go to Post Jon is very right, going forward I have a hard time envisioning any future Championship Chairman's award winners without a significant social media presence. It's just too big of an avenue to be ignored. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2015, 19:04
SteveS's Avatar
SteveS SteveS is offline
Registered User
FRC #2594
 
Join Date: Jan 2015
Rookie Year: 2007
Location: Idaho
Posts: 5
SteveS is an unknown quantity at this point
Gyro gets lost

We are new at using gyro, but have tried to read up on them. We are using C++ and are reading back the angle from a gyro. We are using the KoP gyro that is half of the am-2067 board.

Our problem is that when moving the gyro around (twisting it), it will measure to 90' fine and then back to 0', but after twisting it a few time it will lose track of where it is pointing. After twisting it around and back for 20 seconds or so, it will read ~20' at the origin (0') position. Is this normal? This does not seen to be related to drift. We have 2 gyros and they both do this same thing.

If this is normal operation, then how do you keep orientation on the field while using a mecanum drive? If this in not normal, then any suggestions would be greatly appreciates!
  #2   Spotlight this post!  
Unread 29-01-2015, 19:09
weaversam8 weaversam8 is offline
Team Captain
AKA: Sam Weaver
FRC #4534 (Wired Wizards)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Wilmington, North Carolina
Posts: 137
weaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to behold
Re: Gyro gets lost

Sometimes, drift occurs. Our gyro has an integrated temperature sensor, which is supposed to be used for calculations making it more accurate, but we haven't used it yet. What we use is a function which resets the gyro every time we make a turn. That way, it minimizes drift.
__________________
ORB Haow!

  #3   Spotlight this post!  
Unread 29-01-2015, 19:40
SteveS's Avatar
SteveS SteveS is offline
Registered User
FRC #2594
 
Join Date: Jan 2015
Rookie Year: 2007
Location: Idaho
Posts: 5
SteveS is an unknown quantity at this point
Re: Gyro gets lost

Thanks for the quick reply!

We can observe the drift with the gyro not moving and it drifts about 1' per minute. Will gyro movement amplify the drift to this extent? We are seeing about 20' in less then 20 seconds and it is worse with the more movement.
  #4   Spotlight this post!  
Unread 29-01-2015, 20:23
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Gyro gets lost

Quote:
Originally Posted by SteveS View Post
We can observe the drift with the gyro not moving and it drifts about 1' per minute. Will gyro movement amplify the drift to this extent? We are seeing about 20' in less then 20 seconds and it is worse with the more movement.
A couple things come to mind on why you might be seeing more "drift" when moving:
  • The movement is saturating the gyro. Gyros have a maximum rotation rate they can measure - make sure your movements are slower than that (or get a gyro with a larger range. The tradeoff is usually larger range means less precision for the same price point.) The am-2067's max rate is 250 deg/sec. If you're twisting the gyro with your hand or using an unloaded drivebase, you can easily move faster than this.
  • Your integration timescale is too large. The gyro outputs rate information which is then integrated over time. If you wrote your own integration routine, the sampling rate might be too low. If you're using WPIlib's Gyro class, that uses one of the RoboRIO's FPGA accumulators to do the integration, which is about as fast as you can get.
  • Make sure you keep the gyro flat when turning it. The gyro will only measure in-plane rotation, so if you change the angle, it might read different measurements for the 0->90 and 90->0 movements.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
  #5   Spotlight this post!  
Unread 29-01-2015, 21:23
Mister Braun's Avatar
Mister Braun Mister Braun is offline
Registered User
AKA: Theo
FRC #0847 (PHRED)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Philomath, Oregon
Posts: 1
Mister Braun is an unknown quantity at this point
Re: Gyro gets lost

We're using the am-2067, and we've found it to only have drift of about 30' after 2:30 of crazy rotation and haphazard driving.

The documentation of the am-2067 that says it needs 5 seconds after first activating to calibrate. Are you letting it do that?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:03.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi