Pathplanner 2025 cant work with trapezoid swerve

I have updated my offseason robot code to use path planner 2025 beta 2.1, our offseason robot code has 2 mk4 modules and 2 mk4i modules, because of the different position of the wheel in those different modules the module positions relative to the center are not just trackwidth/2 and wheelbase/2 with changing signs depend on the side the module is in.
the RobotConfig class only has an option to construct it using trackwidth and wheelbase to determine the module position for the SwerveDriveKinematics object, this creates a wrong trajectory for our robot.
I would like to know if there is any way to change that or create a new constructor that takes the module positions as a parameter

thanks

1 Like

Just wondering, how come you’re using 2 different module types?

We needed the vertical space the Mk4i frees up in the rear of the robot but in the front of our robot there wasn’t enough horizontal space for Mk4i modules and we don’t have any other modules at the moment

There’s no internal technical limitation that would prevent using arbitrary module positions. It just currently uses trackwidth/wheelbase for simplicity. Updating the configuration to use individual module positions instead of just wheelbase/trackwidth is something I want to implement before kickoff.

3 Likes

Thank you