2024 ctre swerve wizard - auton driving in reverse on our second bot

When we run a straight path from PathPlanner to drive forward 2m, it drives backwards 2 m. Teleop drives opposite after that too (i.e. using Practice mode)

But if we start in Teleop (skipping auton), then teleop drives proper.

We are using CTRE swerve wizard generated code.

Stranger is that we have been using this code on our chassis bot since before the season started.
Teleop and auton worked fine on it.
When we moved that code to comp bot which is nearly identical (just offsets, trackwidth/wheelbase different) , we got teleop running but when we tried auton paths we had from chassis bot they drove backwards.

The other difference in code are these left and right side inverts:


I really don’t understand why they would be different from our chassis bot.
We did the factory defaults in swerve wizard before running.
The swerve design is identical. That same inverts should have worked but we reversed them to make teleop drive correctly only to find auton drives wrong now.

We put this same code back on chassis bot and it runs fine with that invert.

We swapped the inverts to match that from the chassisbot and then auton drives straight and teleop is fine after auton (i.e. practice mode). But if we enable teleop, forward and reverse work, but left and right are backwards.

Should we run the swerve wizard again?
We ran with bevel inward on each wheel like it says. But YAGSL says to put bevels all facing same way.

Is there something else we should do when starting teleop that auton is doing for us?

This is our code on github. The try2-to-fix-auton branch has the changes to make auton work.

Thanks in advance for any clues one might provide.

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