Team 1710 is having recurring issues with SDS MK4 swerve modules at champs this year. It began once our partner contacted us over the frame perimeter, and bent the falcon base plate. We chose to change out this module for a new one, and things went downhill. Our driving was significantly slower, and after the match, the steer motors were extremely hot (especially the one we switched). Additionally, we experienced extreme power draw from the modules, as the battery was dropping down to 8 volts. We tested the swerve modules when the robot was lifted up, and it seemed pretty normal. After, we diagnosed to find any potential issues, and we believed that it was the magnet inside the swerve module itself. We swapped back to the old module, tested it on a practice field, and it worked flawlessly. However, we ran another practice match and it continued to have issues yet again. We would appreciate any help.
It sounds like your replacement module is fighting your other modules. I would put the chassis up on some blocks so that you can clearly the wheels, and check to make sure that the replacement wheel is pointing in the direction that you expect it to. Also check that the wheel is spinning in the direction you expect it to.
As for why you are experiencing inconsistent results with the original module, it’s hard to say without more details, but if something is bent out of shape, I could imagine a multiple of reasons why you might experience a variety of issues under different usages
We tried to place the robot in a position to view the wheels, and the one which was replaced was about 10 degrees off consistently. However, it doesn’t make sense why it would work, and then suddenly not work. We have been using the same method to recalibrate all season, however, it may be the issue. I truly appreciate the response, we need all the help that we can get.
10 degrees off is likely enough to make you experience the drive feel slower, and to stress the turn motors. (And the drive motors too!)
I don’t know how the encoder setup works, or the zeroing works, on those particular modules. But if you are consistently 10 degrees off, it sounds to me like the encoder is working properly, but the zeroing is not. I’d double check whatever it is you do to zero the module.
You could probably send someone to swing by the AM Booth, explain the problem, and they would likely send someone along, though you could also flag down any of the CSAs I (assume; haven’t been to an event in a hot minute) are roaming around in orange hats if you think it’s not a mechanical problem.
We already asked the CSA, and they suggested it was the magnet
Here’s our method of calibration:
- Turn on the robot and establish a connection.
- Set all wheel angle offsets to zero, which can be found in either Constants.java or the DrivetrainSubsystem.java.
- Deploy the code to the robot.
- Optionally, power cycle the robot before attempting the calibration again.
- Tilt the robot on its side and align the wheels, ensuring the gears are all to the same side.
- Access the encoder angle values from Shuffleboard.
- Enter the encoder angle values for each wheel into the corresponding offset in the code.
- Deploy the updated code to the robot.
- Optionally, power cycle the robot again.
- Test the robot’s driving capabilities. If issues persist, repeat the calibration process.
I was just reading how the encoder setup works for this module. If you are using the CAN Coder or the SRX Magnetic encoder, you should check to make sure that you are getting a good reading on the magnet. Take a look at the section on the LED status lights here: https://store.ctr-electronics.com/content/user-manual/CANCoder%20User’s%20Guide.pdf#page6
If you are using the thrifty encoder, it doesn’t seem to have a status LED like that, so it’s harder to tell if you are getting a good reading.
But all that being said: if the module is consistently ten degrees off, then the encoder sounds like it is doing exactly what it is supposed to be doing, and the problem does not relate to the magnet. Rather, it is a zeroing problem.
What do you suggest for zeroing? If your team uses swerve, how do you guys do it?
That sounds like a reasonable zeroing procedure. From a distance, I don’t have much of a guess as to what might be wrong there.
After you apply the updated constants in your code, and you manually point all of the wheels to straight ahead, does the ShuffleBoard dashboard say zero for all of the wheels?
If you use Phoenix Tuner and use the “Self-Test Snapshot” option while selecting the CANCoder, it should tell you what the CANCoder’s absolute position is without resetting the zeros in your code and power cycling your robot. Our team used to do a similar proceduere by doing it through code and found that it can be inconsistant and using Phoenix Tuner was quicker.
As the team at fault in this situation, we’ve had several members stop by to ask if you guys required assistance after this. I can stop by tomorrow morning to help out if needed.
Don’t take the blame on your team, we simply didn’t realize how bad the issue would be. We certainly appreciate all the help you are providing
Hi Joshua and Team 1710,
I just wanted to also apologize on behalf of Team 4201 for the damage we caused your robot. We didn’t intend to damage your robot during our qual match and should have been more careful.
If you need anything (falcon 500s, parts, cancoders, etc.) please let us know. We want everyone to be playing at their full potential and are here to help however we can.
We had an issue with one of our modules that has similar symptoms to what you’re describing here where one module would be consistently 10ish or more degrees off despite all other modules being fine and many rezero/verify attempts. The issue ended up being a loose magnet in the shaft which we fixed by pulling it out and adding green loctite. I wonder if maybe this is also the problem you’re seeing?
No worries, it’s a learning experience. We already tried the green loctite and it still didn’t work.
Just want to add to your understanding of the problem.
-We recalibrated the module that was replaced.
-We tested by tilting the robot to the side and tested various directions at various speeds. The modules performed as they should, they were aligned with each other and drove in the correct direction
-During matches, the module would end up not being aligned with the other three. This misalignment was not consistent. It varied between 10-90 degrees.
Basically, the back left, and only the back left, would become decalibrated over the course of a match. We have tried replacing the module again after it was fixed. Same issue. We had a CSA help us and we were shown the self test snapshot, and the cancoder behaved as it should (we got the degree, twisted it a few degrees, and got a reasonable change in degrees after running the snapshot again).
Make sure everything on the suspect module (especially the CANcoder) is on the same F/W revisions as other modules – less likely than other theories here, but a quick check that eliminates a possible variable.
While you are at it, consider factory reset of config parameters, then carefully reapplying any of these you change, starting with CAN ID.
Here’s a video of one of our matches with said swerve issues:
It looked better last match, did you get this fixed and what was the solution?
We recalibrated a few times, and it seemed to be a bit better. Additionally, some parts in the center of the swerve module were bent, especially the ones holding the magnet. It seems to be back to normal now. We appreciate all the help!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.