Frank:
Thanks for.sharing. Our teams have had a lot of trouble with gyro drift last year and this and we have some fixes using cooling sprays etc.
Your procedure doesn't fix gyro drift as much as detects its nonocurrence, unless I am missing something. So we could be waiting for ever for the problem to correct itself.
I also was unsure about the meaning of reading the angle and rate at the same time. Are these in quick succession? Or did you mean parallel programming?
Also, if a number is not greater, lesser or equal to zero, there is some representation error in the transmission protocol, as all sensor data values are software generated, since the Lego sensor does not have a microprocessor in it. In other words, you seem to be suggesting that the gyro drift is a synthetic problem caused by a software bug rather than a hardware flaw.
Nari Narayanan
______________________________________
Anant S Narayanan
Founder & Executive Director
McLean Robotics Institute
(202) 421-3826 (mobile)
[log in to unmask]
______________________________________,On Oct 28, 2014 2:11 PM, "Frank Levine" <[log in to unmask]> wrote:If you're using the Gyro, you'll want to make sure you're resetting it properly. The best gyro reset code that we have found comes from the Hoosier Girlz via Droid Robotics advanced lesson #5. If your Gyro occasionally starts to drift, this is for you...While gyro is calibrating, it returns 'NaN' which stands for "Not a Number". NaN's are a serious pain and cause all sorts of problems in real world code. Taking the square root of -1 is one way to geneate a NaN in 'real' programming languages. Anyways, NaN's have the interesting property that they return false when compared to other numbers. This allows the clever EV3 programmer (ie, the Hoosier Girlz) to detect them and wait for the Gyro to reset.Step 1: Read both the Angle and Rate at the same timeStep 2: Start a loopStep 3: Read the angleStep 4: Check to see if the Angle is >= 0Step 5: Check to see if the angle is < 0Step 6: "or" the results of steps 4,5 togetherIf the result of step 6 is true, then the number is >=0 or <0 so you're good to goIf the result of step 6 is false, then the number must be NaN (it's not >=0 or <0) so repeat the loop.This solved all of our Gyro drift problems and I think it is something that all teams should know and understand. Honestly, the 'reset' block should have come standard with the EV3 environment. It's hard enough to use the Gyro when it's calibrated correctly. When it's not it can waste valuable team time.In response to Droid Robotic's efforts, our team shared their Proportional Control turn code (which is made even better with a calibrated gyro!). If your teams have any basic building blocks that they want to share, the guys at Droid Robotics appear to be compiling a very nice set of building blocks that are easy to understand and explain to FLL kids. What I like about them is that they don't just re-post solutions, they take the time to understand what's going on and explain it in a way that kids their age will understand. I think it's a great project and I fully support what they're doing.Thanks,Frank LevineCoach "The Construction Mavericks"On Tue, Oct 28, 2014 at 1:49 PM, Nancy Nguyen <[log in to unmask]> wrote:Just goes to show you that every team is different and has different experiences. My team has had great success with the gyro sensor. Does not affect the speed of our robot and makes nice precise turns in tight spaces. The kids have not been very successful with the color sensor. They feel it is more trouble than it's worth. Like I said, different experiences for different teams.
Sent from my iPhone-Nancy NguyenTry scrimmaging against a team that uses sensors. The improvement with sensors vs no sensors will be obvious...but don't use the gyro. It can be made to work reliably but it's performance will be agonizingly slow.-Regards,Marvin HomCoachFalls Church, VAOn Oct 28, 2014, at 12:51 PM, Betsy T. Wilco <[log in to unmask]> wrote:Honestly, I want my kids to learn to use sensors, but before tournament I am very "hands-off" with any building or programming. I ask them questions, I cheer them on, but all decisions are made by the kids. So my opinion is that if they don't want to use sensors, they should be alloewed to make that decision. Possibly they just aren't ready. But in any case, they will learn a ton from participating at all. They will see other teams using different methods at tournament and want to try some of them when they come back. And, next year the experienced kids may encourage the newbies to new heights. Or not. But it is their work, their bot, their strategy that counts. Just one opinion!From: First Lego League in Virginia and DC <[log in to unmask]> on behalf of VA-DC Referee Advisor <[log in to unmask]>
Sent: Tuesday, October 28, 2014 12:47 PM
To: [log in to unmask]
Subject: Re: [VADCFLL-L] Between runsSteveIt's fun for team building, too!I haven't been an FLL coach, but you might try the blindfolded instructions approach:Go forward 4 steps. Turn right. Move forward until you hit the wall. Turn left. Go three steps. Line yourself up with the table. etc...On Tue, Oct 28, 2014 at 12:33 PM, Fredrik Nyman <[log in to unmask]> wrote:Somewhat off-topic, but:I'm having a hard time getting my kids to use sensors. Since the sensors (color and gyro in particular) are pretty finicky, the kids think that there isn't much of an advantage of using them compared to doing navigation in terms of motor rotations.How is everyone else doing? Have you found a way to convince the kids that the sensors are worthwhile?
To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.htmland select "Join or leave the list".
VADCFLL administrative announcements are sent via VADCFLL-ANNOUNCEMENTS-L. Visithttps://listserv.jmu.edu/archives/vadcfll-announcements-l.html to subscribe.
To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.htmland select "Join or leave the list".
VADCFLL administrative announcements are sent via VADCFLL-ANNOUNCEMENTS-L. Visithttps://listserv.jmu.edu/archives/vadcfll-announcements-l.html to subscribe.
To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.html and select "Join or leave the list".
VADCFLL administrative announcements are sent via VADCFLL-ANNOUNCEMENTS-L. Visit https://listserv.jmu.edu/archives/vadcfll-announcements-l.html to subscribe.
To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.html and select "Join or leave the list".
VADCFLL administrative announcements are sent via VADCFLL-ANNOUNCEMENTS-L. Visit https://listserv.jmu.edu/archives/vadcfll-announcements-l.html to subscribe.
To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.html and select "Join or leave the list".
VADCFLL administrative announcements are sent via VADCFLL-ANNOUNCEMENTS-L. Visit https://listserv.jmu.edu/archives/vadcfll-announcements-l.html to subscribe.