kvaser_interface需要库:libcanlib.so.1。我应该安装 linuxcan lib 还是现在安装?
看来我正面临着两难的境地。我需要运行 kvaser_interface ROS1 (noetic, 1.15.14) 节点。我正在使用此存储库: https://github.com/astuff/kvaser_interface
我点击此链接在我的 ubuntu 20.04.4 上安装 kvaser CAN/USB 驱动程序。如果我不安装 CANlib 或 linuxcan,我的 CAN 网络可以正常工作(can0 已列出,candump 和 cansend 可以工作)。但是 kvaser_interface 需要 linuxcan 的库,因此给我错误:
... kvaser_can_bridge: error while loading shared libraries: libcanlib.so.1: cannot open shared object file: No such file or directory
显然 kvaser_interface 节点需要 CANlib。所以我使用以下命令安装了 linuxcan 和 CANlib:
sudo make install
kvaser_interface 运行没有问题。但 can0 不再工作了。
ip link
不显示 can0。还
sudo ip link set can0 type can bitrate 500000
给出了
Cannot find device "can0"
这是因为linuxcan将socketCAN列入黑名单。看来我正面临进退两难的境地。我也不清楚 CANlib 在这里扮演什么角色。任何建议都会有帮助。谢谢。
It seems that I'm facing a delemma. I need to run kvaser_interface ROS1 (noetic, 1.15.14) node. I'm using this repo: https://github.com/astuff/kvaser_interface
I follow this link to install kvaser CAN/USB driver on my ubuntu 20.04.4. If I don't install CANlib or linuxcan, I can have my CAN network working (can0 is listed, candump and cansend works). But kvaser_interface needs a library from linuxcan, hence gives me error:
... kvaser_can_bridge: error while loading shared libraries: libcanlib.so.1: cannot open shared object file: No such file or directory
Apparently kvaser_interface node requires CANlib. So I installed linuxcan and CANlib using:
sudo make install
kvaser_interface runs without a problem. But can0 isn't working anymore.
ip link
doesn't show can0. Also
sudo ip link set can0 type can bitrate 500000
gives
Cannot find device "can0"
This is because linuxcan blacklists socketCAN. It seems that I'm facing a delimma. Also I'm not clear what role CANlib is playing here. Any suggests will help. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尚未对此进行测试,但是您可以进入
/etc/modprobe.d/kvaser.conf
sudo编辑文件以删除黑名单模块:
https://askubuntu.com/questions/questions/questions/1103411103411 /how-to-blacklist-kernel-modules
I have not tested this yet, but you can go into the
/etc/modprobe.d/kvaser.conf
and sudo edit the file to delete the blacklisted modules:
https://askubuntu.com/questions/110341/how-to-blacklist-kernel-modules