odriverobotics / ODrive

High performance motor control
https://odriverobotics.com
MIT License
2.89k stars 1.5k forks source link

odrivetool: Error on drv-status #743

Open liborw opened 5 months ago

liborw commented 5 months ago

Describe the bug drv-status produce following error:

$ odrivetool drv-status
Waiting for ODrive...
Traceback (most recent call last):
  File "/home/wagnelib/Work/protocols/2024-03-12_Odrive/env/bin/odrivetool", line 216, in <module>
    print_drv_regs("Motor 0", my_odrive.axis0.motor)
  File "/home/wagnelib/Work/protocols/2024-03-12_Odrive/env/lib/python3.11/site-packages/odrive/utils.py", line 449, in print_drv_regs
    fault = motor.gate_driver.drv_fault
            ^^^^^^^^^^^^^^^^^
AttributeError: 'anonymous_interface_127888826724624' object has no attribute 'gate_driver'

To Reproduce

Call:

$ odrivetool drv-status

Expected behavior Print drv status.

Desktop (please complete the following information):

$ odrivetool --version
ODrive control utility v0.6.8

Additional context None

samuelsadok commented 5 months ago

Thanks for the heads-up. This is a quite old command that hasn't been maintained for a while, I actually forgot it's there. I'll make a note to retire it.

You can instead look up DRV fault details by typing dump_errors(odrv0) or odrv0.axis0.last_drv_fault inside the interactive odrivetool console.

That said, on new-gen ODrives (S1, Pro, ...) you should not be getting DRV faults during normal operation (or at all, for that matter). if you do, please let us know (e.g. here or on Discord or info@odriverobotics.com).