Default Commands Not Running

In the RobotContainer class, I am running

public RobotContainer{
DrivetrainSubsystem.getInstance().setDefaultCommand(new DriveCommand);
}

In the DriveCommand class, I have

public DriveCommand() {
addRequirements(DrivetrianSubsystem.getInstance());
System.out.println((“a”);
}

It deploys to the robot and runs without any errors, yet nothing is printed to the console and the DriveCommand does not run. Does anyone know what could be the issue?

The “a” would be printed when the DriveCommand is constructed, not when it runs. If you’re not seeing it get constructed, is RobotContainer getting constructed by your main robot class? A link to your complete code would be helpful in diagnosing these types of issues.

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