PathPlanner Error when Adding Requirements to Command

Hi there, today my team attempted to finalize our 2 amp auto, however we’ve ran into a critical issue: When adding our intake as a command requirement, PathPlanner returned an error saying the following:

RuntimeError: Events that are triggered during path following cannot require the drive subsystem

We don’t know the root cause of thise issue, since our swerve drive code and intake are seperate subsystems, so we believe it’s simply an issue of how our NamedCommands are being registered. However, any workaround or help is appreciated.

Our code repository can be found here: https://github.com/SteelRidgeRobotics/2024MetalMelody

Our NamedCommands are registered in robotcontainer.py here

Our swerve subsystem and intake subsystem can be found at their appropriate links.

Stacktrace for full error can be found here.

Any help is appreciated.

Looking at the stack trace, it looks like the error message is misleading here, and it is actually complaining that two marker commands both use the intake. Comparing the relevant code in the Python and Java versions of the library, they seem to have different behaviour and this might be a bug.

1 Like

Interesting, hopefully this gets fixed soon. Would there be any way to work around this bug at the moment, or should I cross my fingers for now and hope for the best?

The pathplanner team is pretty responsive. In the meantime, as a workaround you could consider removing the requirements from your auto intake methods, or finding a way to combine them into one command.

1 Like

Should be fixed in 2024.2.3

2 Likes

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