0

如何为OpenNIGrabber对象的构造函数设置特定的设备 ID?

教程示例使用OpenNIGrabber("#1")orOpenNIGrabber("#2")效果很好,但我需要以某种方式选择特定设备。是否可以选择连接到特定 USB 端口的设备?

我正在使用一些 Xtion PRO。我在 ubuntu 13.04 64 位。

4

1 回答 1

2

您可以使用ID,在 Linux 上bus@address可以通过命令查找总线号和 USB 端口地址(设备) 。lsusb这种类型的设备 ID 仅适用于非 Windows 系统,如您在 PCL 源代码中所见(https://github.com/PointCloudLibrary/pcl/blob/master/io/src/openni_grabber.cpp#L352-L361,方法pcl::OpenNIGrabber::setupDevice,第 352-361 行)。

您也可以使用 ASUS Xtion Pro 的序列号作为 ID。

更多 PCL 文档:http ://docs.pointclouds.org/1.7.2/a00897.html#a5753a422ff92067c9065797697d69244

例子

quepas@ubuntu:~$ lsusb
Bus 001 Device 002: ID 1d27:0601 ASUS 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

然后:

OpenNIGrabber("1@2")
于 2014-10-08T05:42:54.133 回答