Swerve module not zeroing rarely & randomly, but still a problem

Hi, we are using BaseFalconSwerve from 364 to operate our swerve drive this season. Almost every time we drive, all four modules zero themselves perfectly and we operate as normal. However 4 times this season (twice at home and twice at our first event), our robot had a module unzero and we had to restart robot code in order to operate as normal.

Has anyone experienced this problem? Is there a known fix? It is troubling us to go into our next event with the data that 2 out of our 17 matches left is dead in the water with an unzero’d module.

Thanks in advance!

2 Likes

We had the same issue Swerve Startup Issue

We just added a small delay before zeroing the encoders. I think it’s caused by a device not being booted or a setting being changed too quickly before getting the encoder value.

Makes perfect sense. Thanks for the idea. We will try and implement this soon :slight_smile:

1 Like

Hello there,

It’s worth considering whether the problem is with the hardware or the software. If the unzeroing always occurs in the same module, it’s possible that there is a hardware issue with that module that is causing it to lose its zero position. Alternatively, it could be a software issue that is causing the module to become unzeroed. One way to determine this is to swap the problematic module with a known good one and see if the problem persists.

If the issue is determined to be software-related, you may want to check your code to ensure that there are no bugs that could be causing the module to become unzeroed. Additionally, you may want to consider implementing some sort of error handling in your code that can detect when a module becomes unzeroed and automatically reset it.

If the issue is determined to be hardware-related, you may need to replace the problematic module or seek help from the manufacturer or a technician who specializes in swerve drive systems.

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