We are working on getting a swerve drive system up and running and notice that the swerve modules will rotate to some random angle when the strafing stick is released. That makes sense since there is no joystick angle to calculate. It’s not a huge problem but it would be nice to have the module maintain the same angle from just before the stick reached the zero position.
We tried using a deadband and not updating the angle after entering the deadband but the joystick does not follow a linear path to zero, so it helps a little but without an unacceptably large deadband there is still some rotation when the stick is released. We have been working with a Switch and an Xbox controller.
How have other teams dealt with this? Are other controller less prone to this issue, or do we just accept it?