Swerve position relative in field

In our robot code we use the YAGSL library to configure our swerve, and we use the pathplanner to create our autonomous paths, however we face a problem, the front of our robot is always defined in front of our autonomous path, at starting pose, meaning that during the teleoperated period the front of our robot is not actually relative to the field, which makes it unfeasible to use a standalone not aligned with the front of the field, as this makes life very difficult for our drive team as The robot’s teleoperator is affected by the frontal position defined in our ParhPlanner, does anyone who has faced this problem know how to solve it?

1 Like

You can zero the heading at the start of teleop which would allow you to drive “forward”.

OR you can set the offset of the gyro using this function in the javadocs.

Test both in sim before you test on the robot!

1 Like

Thank you !! Your help was much important for our team.

1 Like

No problem! Good luck and I hope you guys have a fun time learning it!

1 Like