Announcement

Collapse
No announcement yet.

EV3 Gyro Sensor Drift - how often

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EV3 Gyro Sensor Drift - how often

    Hi, I just received my ev3 core set and started noticing the infamous gyro sensor drift issue almost immediately after I started using it.

    My question is, how often have you experienced the gyro drift and need to reset it? I am running into it almost once every 5 - 6 runs and that seems to make it impossible to use in the actual competition. Sometimes the software reset doesn't even fix the issue and a hardware reset (unplug/re-plug) is needed.

    I am trying to determine if this is normal (how can it?) or my gyro is just faulty. Thanks!

  • #2
    Your gyro is not faulty, it's just like the ones my team uses and what others have experienced. The team created a display on the brain to show the drift and had to unplug/replug the cable during a match between runs if it was drifting. This season, they are going to try a program to monitor the reading and automatically reset it if possible. I haven't seen anyone post a software reset that works. Maybe someone else knows of a solution and will post.
    FLL coach Trash Trek on, State 4x, World 2x, state ref, state judge.

    Comment


    • #3
      After reading the previous post I wonder how much of the solution is the software versus making sure the robot is motionless at startup, since once I learned about the problem the solution I gave the team involves doing both.
      Builderdude35 has lots of how to videos -
      https://www.youtube.com/watch?v=7V16AEW3GG4
      More sophisticated calibration program -
      https://www.youtube.com/watch?v=yDUf1Jj4YHA
      Downloadable gyro and light sensor program -
      http://www.legoengineering.com/light-and-gryo-sensor-calibration/

      Apparently there are different gyro types and the solutions I've used in the past might not work with some gyros-

      http://ev3lessons.com/en/Programming...oRevisited.pdf

      Comment


      • #4
        Thanks DJR and EHMentor. I will try the methods suggested and see if the drift can be controllable.
        It's still a little surprising to me that the drift would happen so often. Because if it occurs in the middle of a run it would be hard to recover automatically even if you detect it and perform a reset.

        Comment


        • #5
          Just a warning note: When people say doesn't work on newer gyro sensors - they mean any sensor made in 2014 or later. So only the 2012/2013 sensors can use the code that you see on youtube/other web sites.

          You will need to read the Gyro Sensor Revisited lesson at http://ev3lessons.com/en/Lessons.html?tab=advanced for code that will work with the newer gyro sensors. We also recommend that you read the other Gyro lessons on our site if you are having difficulties with the gyro. We have used the gyro in every season since it came out with great success.
          **************************
          EV3Lessons.com and FLLTutorials.com Founders
          FLL #51 World Festival Champion's 2018 (retired)
          FRC Not the Droids You Are Looking For (Rookie season 2020)

          Comment


          • #6
            The main problem with the gyro is that most teams using the gyro have no understanding of how it works. Even if all teams knew they should not hold or touch the robot during power on, or there wasn't some bug in the sensor that causes it to spontaneously reset, the sensor will drift. Because of how angle is calculated, there cannot be a sensor without drift. For short duration events, like turning, the drift has to be quite large to have much affect. For longer duration events, like using the gyro angle to measure robot heading during an entire table run, even a slow drift will add up to several degrees of offset.

            Even if the gyro was perfect, knowing which way the robot is pointing is not as useful as you would think. I have yet to see a high scoring robot that depends on an accurate gyro. High scoring robots use more dependable navigation methods than odometry, and use the gyro as a landmark navigation assist, not a replacement. The lines and walls and bumping into things on purpose will always work much better than using the gyro and wheel sensors..

            Comment


            • #7
              Originally posted by Dean Hystad View Post
              . I have yet to see a high scoring robot that depends on an accurate gyro. ..
              I used to say that as well, until I saw this video.
              they are using a touch and the gyro sensor for navigation (as stated in the comments)
              https://youtu.be/agLSE9_MRLg

              Comment


              • #8
                Originally posted by BlueEarth View Post

                I used to say that as well, until I saw this video.
                they are using a touch and the gyro sensor for navigation (as stated in the comments)
                https://youtu.be/agLSE9_MRLg
                I am not seeing a dependency on the gyro sensor. They do make a turn (probably gyro assisted), but they also check for lines, square up against walls, bump into models, and have attachments that aren't picky at all about precise positioning. I would say that video is a great example of how to use every trick you have and not depend on any one thing.

                Comment


                • #9
                  Originally posted by mchen View Post
                  Thanks DJR and EHMentor. I will try the methods suggested and see if the drift can be controllable.
                  It's still a little surprising to me that the drift would happen so often. Because if it occurs in the middle of a run it would be hard to recover automatically even if you detect it and perform a reset.
                  I don't think the gyro just suddenly develops a big drift in the middle of a run, at least not in my experience. During calibration it needs to not move to compute a low drift value. One of the links I sent has a program that keeps running the calibration until you get a zero value. Presumably to at least get a drift rate that is undetectable for the short time between end of calibration and the time you read it.

                  That's not to say that the drift rate is necessarily constant once computed. I have plotted data from a stationary FTC Modern Robotics gyro because it seemed to always have drift. There were some plots where the drift would be positive for awhile then go negative. But there was never a dramatic large change or jump in the drift rate.

                  Comment


                  • #10
                    Originally posted by EHMentor View Post

                    I don't think the gyro just suddenly develops a big drift in the middle of a run, at least not in my experience. During calibration it needs to not move to compute a low drift value. One of the links I sent has a program that keeps running the calibration until you get a zero value. Presumably to at least get a drift rate that is undetectable for the short time between end of calibration and the time you read it.

                    That's not to say that the drift rate is necessarily constant once computed. I have plotted data from a stationary FTC Modern Robotics gyro because it seemed to always have drift. There were some plots where the drift would be positive for awhile then go negative. But there was never a dramatic large change or jump in the drift rate.
                    To clarify the drift rate I am concerned about. If you skip to ~1:35 of this video https://youtu.be/oUK7STch6II, you can see that the gyro is drifting at a rate of about couple degrees per second, and it did occur to me in the middle of a run. Good news is some of the re-calibration techniques introduced here do seem to work and I have had this happen a lot less frequent last couple days. I also bought another gyro as backup and just to observe if there is a difference in how often this would happen there.

                    Comment


                    • #11
                      I found this link of a firmware bug not resolved as of 9/2018

                      https://forums.usfirst.org/forum/gen...-to-gyro-drift

                      Comment


                      • #12
                        Originally posted by EHMentor View Post

                        I don't think the gyro just suddenly develops a big drift in the middle of a run, at least not in my experience. During calibration it needs to not move to compute a low drift value. One of the links I sent has a program that keeps running the calibration until you get a zero value. Presumably to at least get a drift rate that is undetectable for the short time between end of calibration and the time you read it.

                        That's not to say that the drift rate is necessarily constant once computed. I have plotted data from a stationary FTC Modern Robotics gyro because it seemed to always have drift. There were some plots where the drift would be positive for awhile then go negative. But there was never a dramatic large change or jump in the drift rate.
                        Some sensors do seem to pick up a drift. Its been reported by too many people using solid science to disavow. Thinking is that the sensor spontaneously resets due to a communication issue.

                        Comment


                        • #13
                          Originally posted by Dean Hystad View Post

                          Some sensors do seem to pick up a drift. Its been reported by too many people using solid science to disavow. Thinking is that the sensor spontaneously resets due to a communication issue.
                          I was trying to indicate that I had now discovered that by my post #11 in this thread.

                          Comment


                          • #14
                            We have also had some gyro strangeness. I call it "spinning". The primary symptom is that when the robot is sitting still, you can go into port view and see the gyro numbers counting up or counting down AT ALL. Often it will be spinning quite fast, on the order of a couple of degrees per second. Sometimes it spins a single degree every few seconds. When the robot is sitting still, the gyro heading should not change at all, regardless of how long it has been since the gyro was last reset and regardless of how much driving you have done since then. Like Dean has told us many times, gyros work by measuring and accumulating acceleration (and deceleration) and integrating it over time to get the heading. So eventually the heading will be off, but it shouldn't spin when it is sitting still (i.e., no acceleration).

                            My kids are trained to reset the gyro in a quiet, solid place a few minutes before we push our cart to the table before a match. When they get to the table, while they are setting up, they check the port view again, just to be sure it isn't spinning. Of course, even after doing that, we have been bitten by the gyro during a match, which will usually manifest itself by the robot spinning (not the gyro) when trying to do a gyro drive or gyro turn as it tries to keep up with the spinning gyro.

                            Gyros are great and all, but we are getting to the point where we are using it less and less. I think it is more important to have a solid robot that can drive nice straight lines and use a lot of mechanical corrections (wall following, squaring, and mechanical alignment with mission models).
                            Norfolk, Virginia, USA
                            FLL Coach and Regional Tournament Head judge since 2014

                            Comment

                            Working...
                            X