Differential Drive Output not updated often enough

our code: https://github.com/FRC4418/2022_Offseason-Auton_test

I’ve been following this write up: WPILib Trajectory Guide - Alex Beaver

Every time I enable the robot from driver station, I get the follow error:

ERROR  1  DifferentialDrive… Output not updated often enough.  edu.wpi.first.wpilibj.MotorSafety.check(MotorSafety.java:96)

I can’t find any problems with the DifferentialDrive, and its not a wiring/power problem(tested with known good program). Any help with debugging would be great appreciated, this is my first year of FRC and I’m still sprinting to get up to speed.

This caused by the WPILib motor watchdog system. Basically, if a motor doesn’t have it’s speed set frequently enough, WPILib assumes something went wrong in the code, throws that error message, and sets the motor speed to 0. This is a safety feature than can (but probably shouldnt) be disabled.

If that error message is only happening 2 or 3 times right when the robot is enabled, it’s perfectly fine to ignore.

If it happens repeatedly, you probably aren’t setting the motor speeds anywhere. If it happens intermittently while enabled (with more than 2 or 3 repeats of the message each time), it could be due to loop time overruns (slow code) or some other coding bug, and youd need to dig deeper.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.