We are running into an issue with our auto that I’m not sure what the best way to fix is.
A bit of background: we have a command that moves our arm to a setpoint, but when there is no PID running, the arm falls. To fix this problem in Telelop, we have default commands that run the arm to its current position to prevent sagging or movement in the arm.
Our problem: Sequential Command Groups require all the subsystems at all times:
For example, if you have a command that runs an arm, and then a grabber, the default command for the arm will not run even if the grabber command is the current command in the sequential command group.
I looked into writing my own sequential command group, but I couldn’t find a way to do it that didn’t have to have the overall sequential command group require all the subsystems. Because the sequential command group is the only command truly scheduled by the command scheduler, it has to require all the subsystems to prevent double calling, and the requirements of a command cannot be changed while it’s scheduled. The other commands in the command group are run by calling their .initialize, .execute…etc in the sequential command groups .initialize, .execute…etc.
We are using pathplanner with our robot, and the only way I can see to fix this issue is to call a command that locks our arm after every arm movement during auto…which is a lot of calls since we have many different auto paths…not trying to sound lazy here, just looking for a better way to accomplish this.
Any help or ideas are appreciated.