My robot stopped publishing encoder reading, I checked the connection, it is right, I power the encoders with 5v. I have checked the firmware, it doesn't look like anything is wrong. I even tried to replace the encoder with an optical encoder because I initially use the magnetic encoders attached to the motors, but the optical still didn't work, the encoder keeps publishing 0 or some random numbers and it does not react to turning.
Any help will be appreciated.