Sequential Command Group & Default Command Issue

Hey everyone,

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.

1 Like

That’s what ProxyCommand is for: it allows the composition to track the command without including it inside: Command Compositions — FIRST Robotics Competition documentation

3 Likes

Man…if only I had known it was that simple.

Thank you so much for your help.

3 Likes

With the current state of command-based, most things are indeed that simple. Discoverability isn’t great, but wandering through the command-based docs section should display most stuff.

For the things that aren’t simple (or any other improvement/feature requests), open an issue!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.