I upgraded my odrive (v3.6, 56V version) firmware from 0.5.1 (which had some problem talking to AS5047P encoders via SPI) to 0.5.4 (which seems to deal with them just fine.)
However I am now facing a litany of problems. In fact, almost every time I run a test I seem to hit a brand new, totally different problem, which has made systematically investigating anything rather hard.
Firstly, trying to set encoder mode to ENCODER_MODE_INCREMENTAL causes a constant MOTOR_ERROR_DRV_FAULT (on both axis0 and axis1, even though I’m only using axis0).
This isn’t a showstopper for me, since don’t want to use incremental mode, and after encoder.config.mode = 257
everything works fine. But 0.5.1 didn’t have this issue.
Secondly, during calibration, the motor movement is very juddery. This is new behaviour since in 0.5.1 it moved smoothly.
- Calibration has a similar success rate to 0.5.1, though roughly 1 in 4 attempts still result in ENCODER_ERROR_CPR_POLEPAIRS_MISMATCH; I have never been quite sure why.
Thirdly, in closed loop torque control, setting the torque to a low value (eg 0.7) causes the comms between the odrive and the PC to drop out. I get this message in odrivetool (which then itself becomes unresponsive):
Oh no odrv0 disappeared
In [11]: ←[91;1m11:39:31.425452100 [USB] Transfer on EP 0x83 still in progress. This is gonna be messy.←[0m
Exception in callback <CFunctionType object at 0x000001FE1221E798>(<ctypes.winty...001FE1221BEC8>)
handle: <Handle <CFunctionType object at 0x000001FE1221E798>(<ctypes.winty...001FE1221BEC8>)>
Traceback (most recent call last):
File "c:\python36\lib\asyncio\events.py", line 145, in _run
self._callback(*self._args)
OSError: exception: access violation writing 0x0000000000000024
Fourthly, if instead of letting the motor spin up to any kind of speed I actually hold it firm and fight it, the comms don’t drop out but I see a very strange behaviour. Basically I am able to ‘stick’ the motor such that I can move my hand away and it stays motionless. Then if I tap it, it suddenly experiences the torque again and begins accelerating until I grab it again.
- when the motor is stuck this way I can set requested_state to Idle and back again, and the motor stays motionless.
- My working theory is that this is something to do with the encoder offset being off somehow, maybe as a result of the juddering during calibration.
And finally, if I hold the motor still while it’s trying to turn(without doing the sticking trick) and steadily increase the torque, I can get it to about 1.3 before the odrive bombs out with this error:
system: no error
axis0
axis: no error
motor: Error(s):
MOTOR_ERROR_UNKNOWN_TORQUE
MOTOR_ERROR_UNKNOWN_VOLTAGE_COMMAND
sensorless_estimator: no error
encoder: Error(s):
ENCODER_ERROR_ABS_SPI_COM_FAIL
controller: Error(s):
CONTROLLER_ERROR_INVALID_ESTIMATE
At this torque I should be well within the current_lim, which I set to 45. And although it says ENCODER_ERROR_ABS_SPI_COM_FAIL, I have never seen spi_error_rate visibly move from 0 on the liveplotter.
I do not know how to approach dealing with these issues.