Is there a way to force re-calibration of the gyro when using a drivetrain with gyro in VEXcode IQ Blocks? Carrying the robot seems to decrease the gyro accuracy, but physically moving the robot is needed to reposition it during a programming skills run.
Not sure about IQ Blocks, but it used to be possible in RobotC back in the day.
That being said, moving robot around mid-skills-run shouldn’t affect accuracy much. What does is moving the robot while it is initially calibrating, such as when you’re turning it on, or while you ask for explicit recalibration.
Just to make sure we’re on the same page: Calibration is the time when the gyro finds the mid-position, zero angular rate signal. Reset is when you tell the system that “this is the zero heading”.
My students never needed costly (2+s) recalibration during a match, but they would routinely reset the gyro whenever they got a good reference (robot pushing against the wall, for example).
If you just want to reset to zero, you can use the Set Drivetrain Heading block which can be found under Drivetrain.
I don’t think that you can recalibrate though.
You can calibrate at any time by using the calibrate block… Unless you are using a drivetrain. Then you can’t. But, if you’re using a drivetrain, I would encourage you to learn more about blocks so you don’t have to.
Of for sure, this is how I prefer teams to go but for rookies the Drivetrain solutions are excellent.
Yes, I have written code using gyro readings based on its drift in different programming environments, but I coach beginners and they need to start somewhere less complicated. Using the drivetrain with gyro with VEXcode IQ Blocks is a good start. However, the robot still does not move in the exact same way every time the program is run. There is enough variability to cause tens of points to be lost or gained based on apparent luck. We have looked at other sources of variability and are trying to do all that can be done to reduce it. Gyro calibration is one of those possible sources of variability. The execution of a sequence of forward and turn commands results in the robot orientation being about 10 degrees off in heading in the end after some runs. I don’t understand how the turns using a drivetrain with gyro can allow this.
I’m not sure how much (if any) P control there is on drivetrain gyro turns, @tfriez is your man for that. But maybe try adding your own basic P control, e.g if you want to turn 90 degrees, do 65 degrees at 80% turn speed then 25 degrees at 15% turn speed to reduce inertia-driven overshoot.
You can calibrate the gyro for 2, 4, or 8 seconds. The default is 2 seconds. The longer you calibrate without moving the robot, the more accurate the gyro will remain. I have found that calibrating for 8 seconds before the start of the match results in the gyro remaining significantly more accurate throughout the match. After that if the gyro gets disoriented, you only need to orient the robot against a reference (the wall) and reset (not recalibrate).
We’ve received some feedback on this, so we’re going to expose different drivetrain calibration options / recalibrate drivetrain blocks in a future update.
Awesome! Is there an ETA for delivery?
Likely in our post-worlds update… we’re focused on bug fixes only between now and worlds to minimize changes for teams.