odriverobotics / ODrive

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

axisError = can.Signal("Axis_Error", 0, 32, receivers=['Master'], choices={error.value: error.name for error in AxisError}) #738

Closed zhangbeyonder closed 1 year ago

zhangbeyonder commented 1 year ago

Hi, Guys. When I make the master branch, some errors occured. An error report:

Traceback (most recent call last):
  File "D:\WorkSpace\ODrive\tools\create_can_dbc.py", line 15, in <module>
    axisError = can.Signal("Axis_Error", 0, 32, receivers=['Master'], choices={error.value: error.name for error in AxisError})    
TypeError: __init__() got an unexpected keyword argument 'choices'
make: *** [Makefile:36: all] Error 1

Do you know how to fix it?

Desktop

samuelsadok commented 1 year ago

There was a recent breaking change in the cantools Python package. As a workaround you can install an older version with pip install "cantools<39.0.0".

(your pip command may look a bit differently, depending on your Python installation)

Alternatively, you can try to make our code compatible with the newer cantools version and open a PR with the fix.

zhangbeyonder commented 1 year ago

Thank you for your help. The command does make sense. BTW, I am a beginner in ODrive. I would like to try to fix it and it may need some time.

1256879347 commented 10 months ago

I have the same problem. Have you solved it? How to do