|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Example gyro code released.
Has anyone tried this code yet? I'd like to get a sense of how (if) it's working for teams.
-Kevin |
|
#2
|
|||
|
|||
|
Re: Example gyro code released.
Quote:
First of all, thank you for your undying effort keeping this huge event on track. I just started this year as a programming mentor and do not know the ins and outs of what has happened over the last few years with the code. The programming student on the team is new, and he is a little anxious with everything. He first saw "C" just a few weeks ago and is feeling a little overwhelmed. I am guiding him through how to layout the functionality he needs to meet the required game rules and translate all of that into working code. In one of your previous posts, you stated you were working on a new robot.c (and I hope a new robot.h). Do you have any idea when we would see that? Having that will help immensely since my role is to help and not perform the actual work instead of the student doing it himself. Respectfully, Gary D. |
|
#3
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
1) Because I now return angular units expressed in milliradians instead of degrees, line 198 needs to be changed from: heading = Gyro_Angle()*PI_MRAD/180L; to: heading = Get_Gyro_Angle(); 2) The programming interface was expanded and many functions were renamed. To fix this, I would just drop the new version of gyro.c/.h into your build directory and let the compiler find the deltas for you (there will only be a few). -Kevin |
|
#4
|
|||
|
|||
|
Re: Example gyro code released.
Quote:
:-) Gary |
|
#5
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
-Kevin |
|
#6
|
|||
|
|||
|
Re: Example gyro code released.
Kevin, the gyro code has worked fine for us. We are able to track heading, and stick to a heading. We arent using the scripting, for lack of need.
As soon as we get our encoders in, I will post how the PID works out. |
|
#7
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
-Kevin |
|
#8
|
|||
|
|||
|
Re: Example gyro code released.
For now, we are using the BEI gyrochip provided in the 2003 kit. This is for testing purposes, seeing as they are illegal for robot use. We are getting gyro bias at startup, with the Calc_Gyro_Bias() function (we plan to poll it more, but we have only done basic tests, seeing how we are learning this as we go). Our gyro use code hasnt really been developed, since we are waiting for our encoder delivery, and we are planning to tackle the PID system all at once. But in our initial tests, we were seeing a bit of drift; The heading would waver about +- 17 milliradians every 8 seconds. (I dont believe we had the scale factor set the right way, seeing as one rotation was giving us a heading of about 10000 mRads.)
In order to keep costs down, I was hoping to use the provided accelerometer in place of a yaw gyro for the bot. Im guesing this would work with the gyro driver you wrote, but is there anything I need to change? (yanno.. something that I would probably never be able to figure out on my own.) As for the drift, we have explored 2 options. One was to mount the gyro to a piece of foam tape or rubber, hoping it would cut out motor/compressor vibrations. I think the gyro bias is being set incorrectly due to the vibrations, and since for now we are only polling for bias once, it may have ill effect on our code. Any tips? Thanks. |
|
#9
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
Quote:
Quote:
-Kevin |
|
#10
|
|||||
|
|||||
|
Re: Example gyro code released.
Quote:
Quote:
Last edited by neilsonster : 22-01-2005 at 12:19. |
|
#11
|
|||
|
|||
|
Re: Example gyro code released.
Quote:
|
|
#12
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
-Kevin |
|
#13
|
|||
|
|||
|
Re: Example gyro code released.
Quote:
Thanks |
|
#14
|
||||
|
||||
|
Re: Example gyro code released.
Quote:
-Kevin |
|
#15
|
|||
|
|||
|
Re: Example gyro code released.
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sourceforge for Code Repository and other stuff | SilverStar | Programming | 9 | 15-01-2005 21:16 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Wierd gyro code problems...pls help | Salik Syed | Programming | 4 | 14-03-2004 01:29 |
| Infrared Beacon and Sensor Diagnostics Code Released | Kevin Watson | Programming | 3 | 25-02-2004 17:50 |
| gyro code | odin892 | Programming | 2 | 08-04-2003 14:50 |