Sequential Command Groups not Running Drive Commands Properly After First Command

We are trying to run sequential command groups in our autonomous, and we have two autonomous routines (an older time based one located in Robot.Java and odometry based one located properly in getAutonomousCommand in the Robot Container). Regardless of the routine however, after the first command is run, all future driving of the robot during auto is jittery, inconsistent, and not as expected, with the Falcon motors not actuating consistently. Is there a reason for this, and a way to fix this? Or, if that does not work, Is there another way to do this without sequential command groups? Thanks. Attached below is our code. (34.0 MB)

Thanks for attaching source code, but just a note that you’ll get more responses if you post a Github link instead.

I think your main problem is in DriveSubsystem.periodic:


Here you’re forcing the drive motors to honor the joysticks every event loop, and the joysticks are therefore fighting the autonomous for control of the robot. This causes the jitter.

Move all the arcade drive code into the drive subsystem’s default command. That way it won’t run while you’re running an autonomous drive command.


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