I have been receiving the output not updated enough error that has been plaguing my team since last year. I have looked at multiple different threads regarding the issue on here but none of the causes that people list seem to be the issue for us. Here is my entire repository: https://github.com/FRC-4509-MechBulls/2022_Rapid_React_Bot/tree/ReillyBranch
JoystickDriveCmd is set as the default command for the DriveTrain Subystem in RobotContainer, so that is not the issue. I simply cannot figure it out. Thank you for the help!
We resolved the same issue by commenting out the differential drive instantiation in our drivetrain subsystem, and instead of using .arcadeDrive() or .tankDrive() we created our own commands to replace the functionality that differential drive served us. What still confuses us is why we receive this error only in autonomous and not in teleop.
Dont have a log atm, but in testing its been happening as soon as I press a button to activate a motor(not specifically the the drivetrain), and it just completely fills the riolog with the error over and over again. It does not say it’s associated with any specific motor.
public void initialize() {
while (!limelight.isTargetValid())
{
drivetrain.seekLimelight();
}
timer.reset();
timer.start();
while (timer.get() < 5)
{
drivetrain.aimLimelight(0, limelight.getSteer());
}
timer.stop();
finish = true;
}
Assuming there may be others in your commands as well.
The commands get run repeatedly by the scheduler. They need to be able to be called and return very quicjly. All active commands need to be able to run and return every 20mS.
As a rule of thumb you shouldn’t have any while loops in your commands. This will prevent normal execution of your robot code, and will likely lead to unresponsiveness.
If you go the route mentioned by PKfire, you’ll still have the same end result (unresponsiveness because you’re stuck in a while loop instead of updating your motor outputs) but no error messages…
In the above case, you’ll be updating your drivetrain outputs (depending on which of those while loops you’re stuck in), but no other subsystem on your robot will be updated in parallel. If you have similar while loops in other commands on your robot, those will similarly prevent other subsystem outputs from being updated…