|
Re: Regarding Loop frequency
Don't quote me on this, but I believe that it runs at 50hz because that is how often the driver station sends packets to the robot.
If you are using Java or C++, it is entirely possible to create a separate thread that updates at a higher rate, and many teams do so - this is beneficial because a higher update rate gives quicker responses, which is especially important in control loops. Another reason to do this is for more accurate estimations. If you are trying to approximate the integral of a sensor value, say, integrating angular velocity from a gyro to keep track of the robot's angle, you are going to be using a Riemann sum. Logic dictates that the smaller the value of dt (the higher the sampling rate) the more accurate the results.
|