Quote:
Originally Posted by Alan Anderson
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.
|
Yes, we considered saving the number of turns to a file, but we didn't want some I/O error breaking the robot in competition. We actually had plans to use slip rings along with magnetic encoders (which is ideal), but slip rings were banned this year
