首页 > 解决方案 > 无法连接多个 USB 3.0 Basler 相机

问题描述

我正在尝试通过使用pylon_camera节点设置各自的设备 ID 来连接 2 个 Basler 相机。但它没有正确选择设备 ID。无需设置设备 ID,它就可以工作。

我已经通过执行 ./setup-usb.sh设置了此处提到的 USB 设备的权限 ( https://www.baslerweb.com/fp-1510124600/media/downloads/documents/readme/README.txt )。但是,当我在配置文件中指定设备 ID(例如,2676:ba02:2:2:8)时,它不会检测到相应的设备。这是它抛出的错误

[ INFO] [1531469242.730556970]: Trying to open the following camera: 2676:ba02:2:2:8
 [ERROR] [1531469242.994999730]: Couldn't find the camera that matches the given DeviceUserID: 2676:ba02:2:2:8! Either the ID is wrong or the cam is not yet connected

可能设备 ID 设置不正确。任何可以对此发表评论的人都非常感谢。

我在 ROS 社区(https://answers.ros.org/question/297261/unable-to-connect-more-than-one-usb-30-basler-cameras/)中询问。还是没有回复

标签: ros

解决方案


在花了很多时间之后,终于找到了解决这个问题的正确方法。以下是您需要遵循的步骤,

安装pylon_camera 后,可以在 /ros/lib/pylon_camera/ 目录中找到一个名为 pylon_camera_write_device_user_id_to_camera 的库一次只需插入一个摄像头,然后为所选摄像头分配一个设备 ID,如下所示,

ros/lib/pylon_camera/pylon_camera_write_device_user_id_to_camera traffic_left<this is the id of the camera>

然后在配置文件中,定义分配的设备。


推荐阅读