We have been using pathplanner for our swerve autonomous for quite a while and we recently encountered the following issue:
When running our autonomous sequence with our main computer, when the robot tries and needs to move left, it moves right, therefore creating a large integrating error and moving even more right.
BUT! when we switch to our secondary computer(and many other too), even without rebuilding/redeploying the code, the robot moves exactly like expected.
We are very frustrated and would really appreciate you help.
Maybe it’s got something to do with the Alliance inversion? In the driver station is the same alliance color selected for all the computers?
Just to expand a little on what @LaviRZ said in case you don’t know, PathPlannerLib will invert your paths automatically depending on alliance color so that you can use the same path for both alliances. Because of the non-standard field mirroring this year, a path that would turn left on the blue alliance would need to turn right on the red alliance to do the same thing. So, when testing your auto paths, you will want to make sure you have your driver station alliance color set to match the side of the field you actually want to test it for.
One thing to note: I believe the driver station will default to the red alliance if it hasn’t been manually set. But, the paths are made for the blue side so by default the will get inverted unless you make sure your alliance color is set.
Finally, if you want to disable this automatic inversion for testing, the PPLib path following commands have constructor overloads with a
useAllianceColor boolean. If you set this to false it won’t invert the path.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.