Quote:
Originally Posted by jreneew2
We are doing a field oriented drive system on our robot this year and have been coding the IMU and other commands for field oriented driving. One of these commands is a RotateToAngle command. When you press a button on the controller it will rotate back to zero (or whatever you pass into it). This works fine when in a separate command, but when you run the command, you can't drive normally while it is rotating.
My question is: Is there a way you can run both commands in parallel but able to drive forward and rotate to zero at the same time. Would a command group work? Would I have to implement the rotate to angle command into the driveCommand file?
Thanks,
Team 2053
|
I'm not sure this is doable in two commands because both commands need to be controlling the same type of behavior. I think you'll need to combine these behaviors into one command and run it when the button is pressed.
You might be able to store the last sets of drive values in the subsystem and control the separate parts with the two different commands, but I think you're better off combining them.