Hi it is our first season doing swerve and we are using neos with sds mk4i modules and cancoders. We are having trouble when driving and forward and backwards will work for a few seconds and then it starts dragging and having random movement/spasms. The only error that we are getting is that the magnets are at a less than ideal distance or the cancoders are blinking yellow. You can see the behavior in this video. Thanks for reading.
Can you check what it looks like in FRC Web Components?
The magnets at a less than ideal distance error is likely because your Cancoders are not flashed to Phoenix 6 firmware. Using Phoenix Tuner to update them to 2024 firmware that is compatible with Phoenix 6.
Ok here is the screen recording of the FRC Web Components and I also have a video of what is happening in real life when I was screen recording. I enable the robot and let it do its thing and once it stopped having spasms, I did a few cycles of driving forwards and backwards.
Video of FRC Web Components screen recording
Video of real life swerve behavior
Thank you.
Could you send your code for me to examine?
We were seeing the same message and indeed moving to the new phoenix 5 and 6 libraries (and updating the firmware) fixed that problem.
Here is our code GitHub - MECO-Robotics/swerve-yagsl: Yet Another General Swerve Library Example Project
Our team was facing the same problem. We were able to solve this with the conversion factor in SwerveSubsystem. If Iām not mistaken, this serves to identify your swerve model and avoid errors like this Lines in code. The values that worked for us were 6.75 for driveGearRatio and 21.42 angleGearRatio, if that doesnāt work try adjusting manually by increasing or decreasing the values, I would recommend changing mainly the angleGearRatio. Another thing you can check is the inversion of the engines Lines in code
The scheme I use is as follows
backLeft: ādriveā: true
āangleā: true
backRight: ādriveā: false
āangleā: true
frontLeft: ādriveā: false,
āangleā: true
frontRight: ādriveā: false,
āangleā: true
Try deleting the other module configurations in the code as well, it may be causing some internal confusion in the code
If none of the options work, contact me and Iāll send you my code to test
Yeah that is what we did and it works perfectly. I forgot to tell that we solved it. Thank you.
Okay, Iām glad it worked
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.