在互联网上搜索了很长时间之后,我认为没有适当的答案,所以我提出了这个问题。作为这里的新手,如果我有任何错误,我深表歉意。 我有一个通过USB连接到ubuntu16.04的Tof相机和一个用于操作它的软件。当我尝试通过软件接收图像时:
./smartTOFViewer
它反复给出这些错误:
2018/07/06 20:27:20.297[3249948416][DBG] [dmcam_dev_open] open dmcam device @ 0x7f8ab88e29c0
2018/07/06 20:27:20.297[3249948416][DBG] [_usb_ll_dev_open] create usb context
2018/07/06 20:27:20.300[3249948416][ERR] [dmcam_dev_open] open device failed!
2018/07/06 20:27:21.301[3249948416][DBG] [dmcam_dev_open] open dmcam device @ 0x7f8ab88e29c0
2018/07/06 20:27:21.301[3249948416][DBG] [_usb_ll_dev_open] create usb context
2018/07/06 20:27:21.303[3249948416][ERR] [dmcam_dev_open] open device failed!
2018/07/06 20:27:22.304[3249948416][DBG] [dmcam_dev_open] open dmcam device @ 0x7f8ab88e29c0
2018/07/06 20:27:22.304[3249948416][DBG] [_usb_ll_dev_open] create usb context
2018/07/06 20:27:22.307[3249948416][DBG] [_usb_ll_dev_open] found dmcam device (speed=3) @ 001:002:020
2018/07/06 20:27:22.307[3249948416][WRN] [_usb_ll_dev_open] failed to open this device: LIBUSB_ERROR_ACCESS, try next ...
2018/07/06 20:27:22.308[3249948416][ERR] [dmcam_dev_open] open device failed!
但是如果我运行此命令:
sudo ./smartTOFViewer
它正常工作。所以我认为这是一个权限问题,并创建一个udev规则文件:
sudo nano /etc/udev/rules.d/99-persistent-usb.rules
和内容:
SUBSYSTEMS=="usb",ATTRS{idVendor}=="111b", \
ATTRS{idProduct}==1238",GROUP="root", OWNER="root", \
MODE="0666"
使用以下方法检查idVendor和idProduct:
$ lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 002 Device 005: ID 8087:07dc Intel Corp.
Bus 002 Device 004: ID 064e:920b Suyin Corp.
Bus 002 Device 003: ID 046d:c530 Logitech, Inc.
Bus 002 Device 021: ID 111b:1238
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
我还尝试设置一些内容:
GROUP="dongtu" or "adm" or "usrs" or "plugdev",
OWNER="dongtu" or just removing it,
adding TAG+="uaccess",
putting in one line and remove " \"
我运行以下命令进行重新加载:
sudo udevadm control --reload
但是,所有这些都没有改变。我观察到在连接tof时/ dev /下没有任何更改,但是我无法弄清原因。 我希望通过python在anaconda中完成工作,这意味着在系统python环境下运行的情况下,我不能使用sudo。有没有人可以帮助我?如果我浪费您的时间,请再次道歉。