You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take any Choreo generated path that has some rotation and use it in a PathPlanner auto. If you run it on blue (not mirrored) it runs fine. If you run it on red (mirrored) none of the rotation actually happens unless you use rotational feedback. Rotational feedforward doesn't work.
I cloned pplib and traced the bug to this line here: mirrored.holonomicAngularVelocityRps.ifPresent(v -> mirrored.holonomicAngularVelocityRps = Optional.of(-v));
This checks if the mirrored path has the holonomicAngularVelocityRps field which it doesn't because it was just instantiated above. If you change this to state instead of mirrored for the check if it's present it works. I tested this in my own codebase.
#566 Sorry im new to making PRs and stuff on other people's repos. Probably shouldn't have created this issue and should have just posted all this to my PR, not this issue.
Take any Choreo generated path that has some rotation and use it in a PathPlanner auto. If you run it on blue (not mirrored) it runs fine. If you run it on red (mirrored) none of the rotation actually happens unless you use rotational feedback. Rotational feedforward doesn't work.
Video:
https://github.com/mjansen4857/pathplanner/assets/57022309/ff2c5c82-bd6c-47f3-a5ce-5159a5efad68
I cloned pplib and traced the bug to this line here:
mirrored.holonomicAngularVelocityRps.ifPresent(v -> mirrored.holonomicAngularVelocityRps = Optional.of(-v));
This checks if the
mirrored
path has theholonomicAngularVelocityRps
field which it doesn't because it was just instantiated above. If you change this tostate
instead of mirrored for the check if it's present it works. I tested this in my own codebase.This is what it looks like with the change:
https://github.com/mjansen4857/pathplanner/assets/57022309/766541e6-7fc1-41bc-8925-702a62f77ae0
The text was updated successfully, but these errors were encountered: