We are having issues where our auto calls a parallel commands as event markers. It does run those commands but the PID function linked to those commands seems to have no affect. We use those same functions for PID movement of our wrist and works amazing in teleop so it has to be a pathplanner/auto issue. Any ideas on how to make sure a named command in pathplanner follows the PID function we have assigned to it?
We are running Speaker 2 Note Auto as the auto routine defined in the PathPlanner GUI
I’m not exactly sure but you seem to have never created an instance of the command that you are trying to run (though I am unsure however if it matters)? What if you did: return new Commands.run() instead of return Commands.run() in your intakeCommand.
Your MoveWristPID command isn’t getting exclusive access to the Intake, so maybe you’ve got a default command or something else interacting with it while it’s executing.
However, I think you’d do better to just use the same methodology you have in teleop, in that your auto command could just be a cmd.run( () -> intake.wristDown()).until( intake::atDownSetpoint )
You would actually probably do well to use this type of command composition for your intake. It really mimics what you are doing, and doing commands inline like that implicitly get an exclusive lock on the subsystem.
In auto all of these command requirements get unioned together and so things that work in teleop via default commands, need to get run explicitly during auto. So… I think what is happening is your PIDCommands are never getting scheduled to run. Consider not extending a PIDCommand to drive your intake. I would recommend declaring PIDController explicitly in the subsystem and have it function in the subsystem periodic. Then create commands to enable, disable and change the setpoint. And you’ll probably want an “WaitUntilAtSetPoint” command too.
Hopefully, somebody else has an easier/better way to make it work for you!
Last year we used a PIDSubsystem that worked, but I know it isn’t the preferred implementation either. But here it is… complete with a lot of “extras!”