Go to Post The object of the team is not to design, build and compete a robot, it is to design, build and compete students. If after four years we have opened a student's eyes to the infinite possibilities they have in their life, it is worth all the effort. - adunakin [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2009, 20:19
Phoenix Spud's Avatar
Phoenix Spud Phoenix Spud is offline
Everyone. Everywhere.
FRC #3132 (Thunder Down Under)
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Sydney, Australia
Posts: 703
Phoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond repute
WPI gyro code question

We hooked up the gyro (yeah!!!) and used WPI's sample code. We found that thatthe gyro that came in the KOP does not work with WPI's library. It will give you half (apx.) of the correct value. We hooked up an old gyro and found that it actually worked. Next we doubled the value of SetSensitivity, we thought that this would fix the problem. What it actually did is halved the number we were getting. This made our reading 1/4 of what it actually should be. We looked at the library more and realized that the library was using the reciprocal of the number we were supplying to SetSensitivity. So we gave it half of the original number. Although this was closer to the actual reading, it still was not exact. Our best guess is that WPI made the gyro class with the old gyro, hence why our old gyro worked. Has anyone else found this problem, or the fix? Or do you know if WPI plans to put out a fix for this?
__________________
Sarah Heimlich
Outreach Mentor | Business Mentor
FIRST® TEAM 3132
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2009, 21:00
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: WPI gyro code question

Don't forget to read the sensor manual!

The WPIlib gyro/accelerometer code was written before we knew what this year's sensors would be. It still works, you just need to wire in new constants, which are found in that manual.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2009, 21:03
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: WPI gyro code question

It looks like they have the default Volts per degree per second as .0125 and this year's sensor is 7mV per degree per second It should be in the sensor manual. Try .007 as sensitivity?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -

Last edited by wt200999 : 15-01-2009 at 21:34.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-01-2009, 09:14
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,055
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: WPI gyro code question

0.007 is what we are using. Now we just have to connect the temperature output to compensate for the error... (which, the error is *really* low)
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
WPI camera code error Phoenix Spud C/C++ 3 15-01-2009 17:44
WPI Lib Source Code from subversion at WPI Sourceforge steinra Programming 6 02-12-2008 16:34
Gyro Code Problems railerobotics Programming 8 27-01-2006 10:45
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
gyro code odin892 Programming 2 08-04-2003 14:50


All times are GMT -5. The time now is 17:29.

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