How can an autonomous command in the command base robot be used?

Can it call other commands to run?

Any examples would be helpful.


The title is spelled wrong it should be autonomous!

You would create a class thats extends CommandGroup and start it in the initAutonomous method in the robot template class. Look it it up in the WPI cookbook.

Here is an example of creating a command group that can run during the autonomous period. It is important to note that once you have created the command, it can be used during teleop too. So for this year, if you have a command that can, say for example, shoot from the pyramid, then if the robot finds itself next to the pyramid during teleop and you have that command “wired” to a button, you can use it.


How could i add a wait statement into the code between the commands as they run?

You can either add a WaitCommand:

addSequential(new WaitCommand(5));

or you can use a command that does nothing (we have a command called DoNothing which does nothing and returns false from isFinished()) along with addSequential’s timeout parameter:

addSequential(new DoNothing(),5);