I was wondering how you can check the rate of the gyro to see if we are exceeding the 300 degrees per second rating on our gyro as it currently stops reading if we turn about 95 percent speed.
Depends on a number of things, but primarily the gyro model, connectivity interface (how it’s wired), programming language used, etc.
In short, we need more information.
Sure thing, Adxrs 450 on the spi port (the top right port)
Okay, I’ll assume java then. To check the rate, just call gyro.getRate(). You can use that value however you’d like for troubleshooting (debug and view directly, write out to SmartDashboard/Shuffleboard, write to System.out.println()
, etc)
Look at the gyro rate when doing 50%, 75%, and 90%. Does that line look like it will reach 300°/s at 95%? If not, look for a loose connection.
Beat me to it. This was going to be my next comment.
I wouldn’t expect the gyro to stop outputting data at 300 deg/sec. I’d expect it to give inaccurate data. I’d check for loose connections or whether the roborio is browning out.
The DS says it isnt
What gyro are you using? For our particular gyro (BNO055), we found that we have to sometimes recalibrate it if we go over bumps. This really threw us off a in a few matches last year and we are 100% sure it wasn’t because of wire connections.
If your gyro uses the I2C bus and requires constant power, sometimes we found that the rio won’t supply the power that the gyro needs to keep its reading.
This, except it is the I2C port if it’s the top right port - I don’t have a picture of the Rio right now
Ah I didn’t see that. I can’t guarantee that this will work with that gyro, but if you’re able to detect the gyro “locking up”, you might be able to recalibrate it by calling calibrate() or you could do something else manually in your code to try and reinitialize it maybe by creating a new instance of ADXRS450_Gyro. Again, I don’t know if that will work.
Maybe someone with more experience with that particular gyro can comment if they’ve had this problem before.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.