Help with Getting Named Commands to operate in Pathplanner

We are needing help in getting our named commands to work in Pathplanner. We are able to get the robot to follow a simple path, but the robot does not execute the named commands. We have registered the Commands before building the Auto Chooser.

The link to our code is Wildbots9031/2024-Robot-Code (github.com)

Thanks for any guidance you all can offer.

Can you elaborate on how you know it’s not executing the named commands? Have you tried adding dummy commands that just prints statements or something to prove it’s not running? Are you selecting the correct command in your dashboard? Have you confirmed that the chosen value shows up in network tables?

The named command appears in the deploy folder for the auto/path we have selected. We have tried multiple commans in the auto/path. Each of the commands work during teleop. I didn’t see in the implementation instructions that we would be utilizing network tables. We have not implemented any network tables for our code this year. The command we are callins should turn on our intake, which works in teleop. Whe we try it in auto the intake does not turn on.

We will try adding some print commands tomorrow to see if it doing anything with command.

You’re using AutoBuilder.buildAutoChooser(), which generates a SendableChooser that lets you select your auto via a dashboard (i.e. SmartDashboard or Shuffleboard). These dashboards communicate back to your code by updating values in NetworkTables under the hood.

Got it. We were not knowingly using network tables. We had used network tables in past for vision, but haven’t been using network tables explicitly this year.

Neither of those autos in the github repo you posted have Named Commands in them.

In your robot container you’ve registered a bunch of named commands, but your auto files don’t reference them.

We had inserted the command “IntakeCommandGroup” in Path2. It shows up at line 44 in the deploy/pathplanner/paths folder. We then used Path2 in Auto2 to attempt to execute the command.

Is this the wrong implementation? Do we need to many short paths with a separate command call between the patha in auto?

We were able to get named commands working by using a series of short paths without any event markers in a sequential in the auto. The end of each short path(where an event would have been placed to add a command) is now the start position for the new short path. In the sequence within the auto we placed the commands we wanted to execute at each event marker. Not sure if this is correct methodology, but it is working for us

Thanks to LASER 3284 for helping us to find this workaround, and to 4522 for letting us use their practice facility.

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