ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Problem launching two openni_camera/OpenNINodelet with two Kinect connected

asked 2011-06-17 22:57:23 -0600

fberga gravatar image

updated 2016-10-24 08:59:02 -0600

ngrennan gravatar image

Hi, I have to merge pointclouds from two Kinect at runtime. To do so, I'm trying to launch two openni_camera nodelets one for each Kinect. But there are some problems.

With openni_ros stack there wasn't any problem, the two nodelets did their work. When I tried to move to the openni_kinect stack with openni_camera stable, it gave this output

terminate called after throwing an instance of 'openni_wrapper::OpenNIException'

what(): unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @ /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera/src/openni_driver.cpp @ 120 : number of streams and devices does not match: 3 devices, 4 depth streams, 4 image streams

So I moved to the openni_camera_unstable package and the output is the following...

[manager-2] process has died [pid 28786, exit code -11].

log files: /home/iaslab/.ros/log/e221454c-98c2-11e0-8b63-782bcb97fb78/manager-2*.log

When openni_device is initialized, two more virtual devices (the SensorV2 from PrimeSense devices) are instantiated in the same bus of the real one and this seems to be a problem for the wrapper...

What kind of problem could it be??

Thanks in advance, Filippo

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-06-17 22:59:12 -0600

fberga gravatar image


How are you bringing up the two cameras? If you simply launch the openni.launch file twice, things won't work because you will launch the same nodes with the same names twice. You have to pass a camera namespace argument to the launch file. For openni_camera_unstable, this would look like:

roslaunch openni_camera_unstable openni.launch camera:=kinect_1 roslaunch openni_camera_unstable openni.launch camera:=kinect_2

Or, if you want to create your own launch file:

<launch> <include file="$(find openni_camera_unstable)/launch/openni.launch"> <arg name="camera" value="kinect_1"/> </include>

<include file="$(find openni_camera_unstable)/launch/openni.launch">
   <arg name="camera" value="kinect_2" />


Hope this helps.


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-17 22:57:23 -0600

Seen: 717 times

Last updated: Jun 17 '11