Openni_launch does not recognize ''device_id" argument for PrimeSense

I have a kinect and a PrimeSense v2 device. If I only plug in the kinect and set the device_id argument to "#1" for first device, it runs the kinect and displays the device_id. I can then use the 'device_id' argument to make sure that kinect is always referred to by a particular camera name. So far so good. If I plug in only the PrimeSense and select first device, it will find it, display the device_id, and run properly. However, when I enter in that device_id as an argument, I get this warning at run time: "~device_id is not set! Using first device". The only difference I can see is that the kinect id is 16 digits hexadecimal, while the PrimeSense is 10 digits decimal. I tried padding the PrimeSense id with spaces or 0's in front, but it still tells me the device_id is not set. I also a variety of other, made up id's. As far as I can see, the id must include a letter for it to be recognized. If I add characters in front of the actual id, it recognizes the string as a device_id but doesn't recognize it as matching the real device. Some goes for placing' on either side of the number- it is comparing '(number)' to ''(number)''- or converting the id to hexadecimal. What is the proper way to specify this device? I am working in a multi-device environment and need to assign the proper names to the proper devices. I know that there is an option to specify usb hubs or something, but I would rather not rely on port id's.

edit retag close merge delete

Sort by » oldest newest most voted

Hi, maybe a bit too late, but may be helpful for other readers:

You need to add the attribute type="string" to the device_id parameter in device.launch

/opt/ros/groovy/share/openni_launch/launch/includes/device.launch

Change Line 30 (groovy) from:

<param name="device_id" value="$(arg device_id)" /> to <param name="device_id" value="$(arg device_id)" type="string" />

more

( 2014-03-25 10:41:00 -0500 )edit