|
Re: Impressions: Command Based Robot
One thing that will help with having a ton of similar commands is to try to make your commands as reusable as possible.
We have a DeployArmCommand this year that pretty much covers all of the uses we need. We pass in a boolean if the arm should be deployed or not and a speed at which the rollers should spin. This command can then be used for any situation we need it for.
One of the biggest cons so far IMHO with the command based structure is the lack of conditionals for command groups. What we did to get around this was save the state that we need from a previous command in that command and pass the command in to the next command through the constructor. That way we can access the state of the first command after it has finished executing.
Overall we have very much enjoyed using the command based structure as I believe it is a great tool to teach OOD.
|