I checked the output, and this is what I think:
As you can see in this dump (after calibration), not only is the error 0x0002 but it says that the index has been found. This means that the error is not
. I don’t really know why the terminal says 0x2 when accessing the error (probably something to do with conversion) but the fact that the index has been found excludes
ERROR_CPR_OUT_OF_RANGE means that the encoder is responding correctly and is predictable when the motor turns, but that the ODrive got something odd while measuring the cpr value and comparing it to the given value. So I would check the following things:
- Is the cpr of the encoder set correctly? Your encoder can handle a cpr of 4000 but it is programmable. So perhaps the encoder is configured for a different cpr?
- Make sure that the pole pair count is correctly set. This can also cause this error.
- Make sure the motor can rotate freely during calibration without load other than normal friction and resistance.
Looking at the motor brand you are using and doing some research, my guess is that your pole pair count is wrong. I don’t know what motor you are exactly using but take the GBM2804H-100T as an example:
As you can see, the configuration is 12N14P. This (I guess) means that there are 12 ‘stator arms’ (not really important for us) and 14 permanent magnets, or poles. Then there is the fact that ODrive whants the pole pair count, and not the pole count. So the value that you will need to enter using this example motor is 14 / 2 = 7, and not 14.
Hopefully it is solved now !