Hey everyone we recently got our MAX Swerve up and running and I was wondering how i could begin running auton trajectories. I am on mac and have already downloaded PathPlanner and made a sample trajectory and i am wondering how you set up the rest of path Planner in the MAX Swerve code.
I can’t really find any resources online for this so I was wondering if someone could point me in the right direction for this.
We’re also stuck on auto swerve. Currently getting an interface error at run time, like pathplanner calls don’t match WPILib or something. We have the latest versions of each installed. Correction!: we did not in fact have all updates. Now that we do, we’re having the gradle issue. Will update as we solve…
We are with you also. We are using the REV example template and are able to drive without any problems. Hoping someone has an example code so we can get some better idea where to start.
Check the github in the last post here!
They are running MaxSwerve with Pathplanner.
Important caveat - I don’t actually know if this works or not, but thought I’d pass along!
We do have it working! Last Saturday we worked through the steps to add Pathplanner support to our swerve code base. I’d suggest looking at this PR for what we had to add. I’ve got some videos of the 2023 robot pathing (on 2024 code) that we’ll include in our next OA post.
Y’all are awesome!!!
I’m actually the lead mentor for 9092 - we were your playoff alliance members last year in Iowa!
I came across your post yesterday and was super excited - we bought some MaxSwerve units in the offseason and spent the fall putting it together. We will definitely be looking at your code as we get PathPlanner up and running! Glad to hear you got it working!
Thank you so much. I will pass this on to our programmers. Hopefully they will be able to figure out where we were going wrong.
Hey thanks for this code! I just had one question so I was looking through the code and so I saw the path json file and so I was wondering where this file path is being used in the code. I looked through the code and I can’t see any mention to the file json thats being downloaded from path Planner.
Sorry im just looking through it again so i’m assuming that the auto builder takes the autoChallenge file and runs whatever path is stored there and that path is the PathChallenge.path correct?
I’m going to paraphrase the documentation a bit here, but here is my understanding of how it works:
- You create a “path” in the GUI, this gets saved as a json file in the deploy directory.
- You create an “auto” in the GUI using "NamedCommand"s and "path"s, the auto also gets saved as a json file in the deploy directory.
- In your code you call
NamedCommands.registerCommand
to tell it what each “NamedCommand” string in the GUI actually runs. - In your code you call
AutoBuilder.configureHolonomic
to tell it how to make your robot move, and to know where the robot is. - You can then call
AutoBuilder.buildAutoChooser()
to create a dashboard chooser to select the autos. On startup this will read all the auto files that were deployed to the roborio and build up the autos and paths based on the json files. - The auto chooser is then just a selection of which auto to run, and you don’t need any code changes (other than maybe adding “NamedCommands”) to build whole new auto routines.
Feel free to keep asking questions here or in our OA thread, we’re hoping to have our 2024 drivebase running tonight and get an auto going.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.