Creating a command that runs other commands
Often you will want to run multiple commands, one after another to enable more complex behaviors in your program. Once each of the individual commands have been debugged, you can create a CommandGroup. A CommandGroup is a named set of commands that may be executed sequentially or in parallel.
Creating a Command Group
To create a CommandGroup
- Drag the command group from the palette to Commands folder in the robot description
- Name the command group so that is has a meaningful name
Edit the the generated code in the command group (Java)
Add each command to command group that should be sequentially scheduled when the command group is scheduled. This allows you to build up complex commands based on simpler and tested commands. For each command that should run, call the addSequential() method with a reference to the instance of the command.
Edit the generated code in the command group (C++)
Add each command to command group that should be sequentially scheduled when the command group is scheduled. This allows you to build up complex commands based on simpler and tested commands. For each command that should run, call the addSequential() method with a reference to the instance of the command.