We are currently having some trouble with our odrive. The problem exists with firmware version 0.4.12 as well as 0.5.1.
The odrivetool works as expected, shows no errors, yet axis0.current_state always returns 0, which corresponds to undefined if I’m correct. Changing axis0.requested_state to various values, does nothing.
Do you have any tips on what to try, or is this a known issue?
Hi Florg.
That sounds bizarre… Can you post a log of exactly what you are doing?
Ideally start from odrv0.erase_configuration() and odrv0.save_configuration() followed by a power-cycle to make sure you are starting from factory default settings.
Of course, back up your configuration first with odrivetool, even if you don’t think you’ve changed anything.
In [1]: odrv0.erase_configuration()
In [2]: odrv0.save_configuration()
In [3]: quit()
(powercycle)
kcirtap@asus:~$ odrivetool
ODrive control utility v0.4.12
/usr/local/lib/python3.6/dist-packages/fibre/shell.py:104: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('import sys')
/usr/local/lib/python3.6/dist-packages/fibre/shell.py:105: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('superexcepthook = sys.excepthook')
/usr/local/lib/python3.6/dist-packages/fibre/shell.py:106: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('def newexcepthook(ex_class,ex,trace):\n'
/usr/local/lib/python3.6/dist-packages/fibre/shell.py:109: RuntimeWarning: coroutine 'InteractiveShell.run_code' was never awaited
console.runcode('sys.excepthook=newexcepthook')
Please connect your ODrive.
You can also type help() or quit().
Connected to ODrive 2082396A4D4D as odrv0
In [1]: odrv0.axis0.current_state
Out[1]: 0
In [2]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [3]: odrv0.axis0.current_state
Out[3]: 0
dump_errors(odrv0) doesn’t show any errors.
We also tried flashing the Odrive again with odrivetool dfu and reinstalled the software, same outcome
Ah, you’ve hit an old “bug” that we removed in the new code. You can’t call save_configuration() after erase_configuration() or it doesn’t do anything.
When you say “dump_errors() doesn’t show anything”, can you paste the errors? If you’re using an old version of the odrivetool with a new firmware, it’ll look like there’s no errors but odrv0.axis0.error will be non-zero.
Thanks again for the help. We traced the problem back to our encoder (the AS5048a). The problem seems to occur when the SPI pins are connected (cant say which of the pins exactly, might get back to it when I have more time to spare). We’ve replaced it with a different encoder, not using SPI, which solved the bug.