Quote:
Originally Posted by JewishDan18
We wanted to get be able to make more than one full twist of the modules, which the magnetic encoders are able to do, but the zeroing once again becomes an issue.
|
Depending on how the rotation motor is connected to the module, there are several possible ways to get multiple turns of the module to correspond to a single turn of the sensor. If you use chain, it's easy to put the sensor on an appropriately-sized "idler" sprocket.
There is also a software solution. Each time the swerve module makes a full rotation, save the "twist number" to a file. When initializing the system, read that file. This does fail if someone turns the module too far by hand while the robot is not powered off.
The simplest answer is to make the modules capable of rotating without limit so you don't need to keep track of how many full turns they've made. That's not necessarily the easiest answer, though.