Converting 364s Swerve Base to Phoenix6

Hello, my team is having an issue with the 364 swerve base this year with phoenix6. Last year we used this base and it worked without any issues, but now when I config our robot the the new version it doesn’t work. The left joystick used to go forward and back, left and right, is only letting the robot go forward and back. Strafing does not work. There also seems to be something off with the rotation position too, where only some of the motors are turning the 45 degrees. We are using the same swerve modules as last year that worked so i don’t think it’s anything mechanical. Note, we haven’t figured out out encoder offsets yet, but i don’t think that would be causing this specific issue as the turn motors aren’t turning much at all when the joystick moved left or right. Our swerve modules are Mk4 L2, with falcon 500s, CANcoders and a pigeon gyro centered to the robot.

Our code file is uploaded here: https://github.com/vickitine404/phoenix6Swerve/tree/main

Any advice would be greatly appreciated!

1 Like
1 Like

I’m sorry for any confusion, that is the file my team is using right now. For some reason it’s giving the issues stated in the original post. I only changed the configs and joysticks to be for our robot.

You can choose to use whatever code base you want as a starting point, but I have to ask considering the set of hardware you have.

Have you tried using the CTRE TunerX Swerve configuration tool and the template project it generates at all?

I would start there because that tool makes you run certain tests to make sure you haven’t got issues with inversion of motors.

3 Likes

I just looked into it and it looks so much easier than trying to figure this out. I’ll try that out with the robot next practice. Thank you so much!

1 Like

I used the 364 swerve base code for my team’s robot. I have it converted to phoenix 6 and configured properly, and we drove it already. Feel free to take a look here. I also implemented pathplanner to it.

1 Like

Try increasing your P value, the value defaults to 1 for the mk4s. We had a similar issue and we increased P to around 100 and that fixed the issue.

i was trying to use your code for my implementation but i cannot get the auto to work can you just commit with the new code. Thanks!

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