Reputation: 2472
how can I set a specific device ID to the constructor of the OpenNIGrabber
object?
The tutorial example with OpenNIGrabber("#1")
or OpenNIGrabber("#2")
works well but I need to select a specific device somehow.
Is it possible to choose the device connected to a specific USB port?
I'm using some Xtion PRO. I'm on ubuntu 13.04 64bit.
Upvotes: 0
Views: 1017
Reputation: 1003
You can use bus@address
ID where bus number and USB port address (device) can be looked up with lsusb
command on Linux. This type of device ID works only on non-Windows systems as you can see in PCL sources (https://github.com/PointCloudLibrary/pcl/blob/master/io/src/openni_grabber.cpp#L352-L361, method pcl::OpenNIGrabber::setupDevice
, lines 352-361).
Also you can use ASUS Xtion Pro's serial number as an ID.
More in PCL documentation: 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
Then:
OpenNIGrabber("1@2")
Upvotes: 2