As mentioned on the Discord support channel, we at the Greppy team are making a 5 DoF robot arm integrated with ROS using 3 ODrives. Because of all the joint constraints & interactions, we can’t run calibration at every bootup. So we’re looking at doing the “Encoder Calibration” with “Encoder with Index signal” (following https://github.com/madcowswe/ODrive/tree/master/Firmware#encoder-with-index-signal )
I’d like to understand a bit more how this works. @madcowswe mentioned in the channel:
So there are two uncertainties that need to be calibrated out. One is what angle the encoder had when you mounted it to the motor shaft. There is no good way to do this repeatable enough, so it’s random, but stays the same once mounted: so we need to calibrate this once.
The other uncertainty is where is the encoder when the ODrive boots. […] The encoders are incremental so the ODrive doesn’t know where “0” is, the encoder only sends the equivalent of “+1, +1, +1, -1, +1”, etc, indicating that we moved one count up/down. We don’t make any assumptions about where the encoder is on startup, so we need to find out where it was. This is done with the index pulse. When the index pulse fires, that is “0”. So when we see it, we can start counting from there, and be correct.
finding where “0” is needs to be done at every startup, since we stop counting when shut down.
On boot the encoder count is just something, we don’t care. Then we find the index, at that time we reset the count and start from there. […] if we do this index search before we calibrate the 1st time, and then always do the index search on every bootup, then we can restore the calibration offset, because we know we are locked into the correct start-position, so the calibration is still valid
A couple follow up questions. The documentation says that “check that the motor scans for the index pulse but skips the encoder calibration”.
I’m guessing this means that there is still motion from the odrive on bootup?
Is there any way to call this manually, so our code could start it on odrive 1, then 2, then 3? Because all the odrive motors are connected to each other mechanically, having everything spinning at once on bootup can get a bit out of hand.