ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Openni_launch does not recognize ''device_id" argument for PrimeSense

asked 2013-08-06 09:01:36 -0600

cyberguy42 gravatar image

updated 2013-11-18 16:50:31 -0600

tfoote gravatar image

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.

Thank you for your help in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-12-12 08:10:27 -0600

tsparber gravatar image

updated 2013-12-12 08:12:57 -0600

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" />

edit flag offensive delete link more

Comments

Question Tools

1 follower

Stats

Asked: 2013-08-06 09:01:36 -0600

Seen: 1,001 times

Last updated: Dec 12 '13