How does Pathplanner handle headings while on Red Alliance?

We should be able to test paths tomorrow, but we only have the blue half of the field set up. I’ve been thinking about how we could test from the Red end, but that also got me thinking about how Pathplanner is working this year.
I understand it doesn’t change origin, just recalculates the paths for the other end of the field, but how does it handle headings? Do we need to give it values from the gyro that are rotated 180 degrees? I don’t see anything in the documents about accounting for changes in heading.

The bottom line: If our gyro initializes to read zero facing away from the driverstation, how does that affect pathplanner on the red side?

You can test all of this (other than swerve physics but you don’t need that for your questions) right now in simulation.

PathPlanner handles the angle.

As to if it will work with your code it is hard to know without code posted.

For us, the case was that the robot rotated itself 180 degrees and proceeded doing the blue path instead of the red path. Wonder what we are doing wrong.

The code is as follows:

Our thoughts at this time are to comment out the block of code in pathplanner that detects red or blue and reverses the paths. Then we will just build a red path and a blue path.

1 Like

Really seems the way to go rn. Or just write a custom command-line tool to flip the paths…

I checked your github and I can’t find any of that code. Showing us a snippet doesn’t really allow us to help you!

Do you have simulation working? Does it do the same thing in simulation?

Why when you run into an issue are you just creating more work for yourself hacking around it rather than helping us help you fix the problem. If you really aren’t interested in help then why post?

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