Go to Post I am a firm believer that there is no model that can be transplanted/copied from one team to another and have the same level of success. There just isn't a formula for it. The mindset you should have is: "I know I have made a positive impact on my community". - tim-tim [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 18-03-2015, 08:57
Aero Aero is offline
consumes pizza, produces code
AKA: Ari Lotter
FRC #0865 (Warp7)
Team Role: Programmer
 
Join Date: May 2013
Rookie Year: 2013
Location: Toronto
Posts: 30
Aero is on a distinguished road
Large amounts of gyro drift

I'm trying to use the KOP Gyro to control our orientation during auton, but the angle is drifting a lot without the robot moving.
This makes our robot drive in curves, and not in straight lines.
We're not doing anything funky programming-wise, the drift is observable with barebones code

Code:
from wpilib import SampleRobot, run, Gyro, Timer, SmartDashboard
class GyroTest(SampleRobot):
	def robotInit(self):
		self.gyro = Gyro(0)
	
	def disabled(self):
		while self.isDisabled():
			SmartDashboard.putNumber('Gyro', self.gyro.getAngle())
			Timer.delay(0.01)

if __name__ == "__main__":
	run(GyroTest)
The gyro starts at 0 (as it should) and without the robot moving, slowly starts creeping at a rate of about -1 degree / 5 seconds.

Any ideas? We've already checked our gyro's pwm cable.
__________________
2014 Waterloo Regional Winner (254 & 2056)
2014 Curie Semifinalist (118, 359 & 4334)
2014 Fall Fiesta Finalist (2056, 4476)
6 X Gracious Professionalism Award Winner
 


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 01:51.

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