We keep getting error messages when we run autonomous

We are trying to test our autonomous but every time we try to run it we get the error messages

“ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.” we also get the messages "

and

“ERROR  1  Unhandled exception: java.lang.ClassCastException: class frc.robot.DriveForwardTimed cannot be cast to class edu.wpi.first.wpilibj2.command.Command (frc.robot.DriveForwardTimed and edu.wpi.first.wpilibj2.command.Command are in unnamed module of loader ‘app’)”

A link to your code would make it easier. But that message means that DriveForwardTimed does not extend edu.wpi.first.wpilibj2.command.Command and you are trying to pass it in somewhere where that type is expected. A link to your repository would make it easier to help you.

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