Default commands with PathPlanner

We’re using PathPlanner’s auto builder, and I’m wondering if I’m missing a pre-made solution to running “default commands” while a path is running.

Here’s a basic scenario. My LED subsystem has a default command that lights up the LEDs with some default logic. When I’m picking up a cone, I have a command that runs a different sequence.

In teleop mode this works fine because the LED subsystem is released when I’m done picking up a cone. In auto, since the command group has a superset of all of the subsystem requirements, the default command does not automatically start when picking up a cone is complete.

I can set up my own command group, using a deadline group with the path and default LED commands, but I’m wondering if I’m missing a simple solution that’s already available in PathPlanner’s auto builder.

1 Like

Try making the LED command that’s part of the auto a Proxy command. That way its requirements won’t be included in the list of requirements of the whole auto sequence.

If I do that, won’t the default command also try to run while the cone pickup command is using the LED subsystem? I need the cone pickup command to use it during an auto event, but the default command should run while paths are running.

I might be wrong, but I don’t think it would. The proxy command will start the cone led pattern by scheduling the command, which will cancel the default command, and cancel the cone led command when the proxy command ends which will bring back the default command.
I hope this was clear enough

Oh, I was thinking proxy the default command, but you’re suggesting to proxy the cone pickup command. That might work :thinking: