VADCFLL-L Archives

First Lego League in Virginia and DC

VADCFLL-L@LISTSERV.JMU.EDU

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Frank Levine <[log in to unmask]>
Reply To:
Frank Levine <[log in to unmask]>
Date:
Tue, 28 Oct 2014 21:02:06 -0400
Content-Type:
multipart/alternative
Parts/Attachments:
text/plain (10 kB) , text/html (15 kB)
Nari,

  This thread seems to indicate that switching from angle+rate mode to
angle mode causes the gyro to go into reset mode.:
http://forums.usfirst.org/showthread.php?20801-EV3-Gyro-sensor-drift

  While it's calibrating, it returns NaN's that you can detect (not >= or <
0) and wait for it to reset.  If you put the code into a loop until the
gyro starts returning numbers you'll see that it usually takes 2-3 seconds
to get through the loop.  My team uses beeps at the beginning and end of
the loop so they know to keep the robot still, and we have a standalone
program we run to do it right before we start running missions.
Furthermore we did some experiments where we moved the robot around while
it was 'calibrating'.  It takes the same amount of time, but when it's done
the gyro is drifting all over the place.  If you then set the robot on the
table and run the program again the drift is gone... it's awesome.  My
suggestion would be to implement it as a quick program (or better yet, have
your team read and understand the presentation and implement it).  My team
thought that the whole concept of "Not a Number" was totally cool.
  On a side note - as a professional software engineer I can say that NaN's
have wasted more than a few days of my time over the years.  They're a
serious pain in the rear to detect and they cause the software to behave in
all sorts of strange ways.
  Finally, I don't think it's reasonable to expect 4th and 5th graders to
figure this one out.  I showed it to my team and I explained what was going
on.  They all learned a little bit about computer representations of
numbers and have a little more insight into how things like yaw-rate
sensors work.  In the end my goal is to have these kids learn stuff, not
spend hours being frustrated by a sensor that has no documentation on how
to properly calibrate :)

-Frank



On Tue, Oct 28, 2014 at 8:28 PM, Anant Narayanan <
[log in to unmask]> wrote:

> 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 <http://www.fllhoosiergirlz.com/> via Droid Robotics
>> <http://www.ev3lessons.com/advanced.html> 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 time
>> Step 2: Start a loop
>> Step 3: Read the angle
>> Step 4: Check to see if the Angle is >= 0
>> Step 5: Check to see if the angle is < 0
>> Step 6: "or" the results of steps 4,5 together
>> If the result of step 6 is true, then the number is >=0 or <0 so you're
>> good to go
>> If 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 Levine
>> Coach "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 Nguyen
>>>
>>> On Oct 28, 2014, at 1:03 PM, MARVIN HOM <[log in to unmask]> wrote:
>>>
>>> Try 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 Hom
>>> Coach
>>> Falls Church, VA
>>>
>>> On 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!
>>>
>>> *Betsy T Wilco*
>>> *Gifted Resource Teacher*
>>> *Prince William County Schools*
>>> *703.754.9061 <703.754.9061>*
>>> ------------------------------
>>> *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 runs
>>>
>>> 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...
>>>
>>> It's fun for team building, too!
>>>
>>> Steve
>>>
>>> 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. 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.htmland 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.
>>>
>>
>> ------------------------------
>> 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.


ATOM RSS1 RSS2