odrive环境构筑问题

不识别yaml,no module named yaml

1、pip install pyyaml -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

2、pip install jinja2

3、pip install jsonschema

4、pip install cantools

Firmware version 0.4.11-dev (fw-v0.4.11-19-g1c947631*)
 [     ] 100%
Could not init terminal features.
Could not init terminal features.
Refer to install instructions at http://docs.odriverobotics.com/#downloading-and-installing-tools
Traceback (most recent call last):
  File "D:\Foc\od\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:37: all] Error 1

解决办法:

一、查询cantools存在版本,pip install cantools==

二、安装指定版本, pip install cantools==38.0.2

编译成功烧录后芯片不启动,PC端检测不到设备。

晶振主频为12MHz,不同于8MHz.修改分频4为6;8/4=12/6=2

Could not init terminal features.
Could not init terminal features.
Refer to install instructions at http://docs.odriverobotics.com/#downloading-and-installing-tools

PS D:\Foc\od\ODrive\Firmware> python .\lsusb.py
Traceback (most recent call last):
  File "D:\Foc\od\ODrive\Firmware\lsusb.py", line 9, in <module>
    dev =  usb.core.find(idVendor= 0x1209, idProduct= 0x0D32)
  File "C:\Users\PC\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\core.py", line 1321, in find
    raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available

Windows环境下基于Python的PyUSB库开发USB通讯_notimplementederror: operation not supported or un-优快云博客

(1)运行时报错:usb.core.NoBackendError: No backend available
点击下面的链接下载libusb-1.0.20的压缩包,解压后将MS64\dll\libusb-1.0.dll复制到C:\Windows\System32。如果还不行的话再将同一目录下的libusb-1.0.lib到Python路径下的lib\site-packages\usb文件夹中。
https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.20/libusb-1.0.20.7z/download
 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值