0
$\begingroup$

Rosanswers logo

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

[ INFO] [1308303787.775217888]: Loading nodelet /Kinect1 of type openni_camera/OpenNINodelet to manager manager with the following remappings:

[ INFO] [1308303787.778629897]: Loading nodelet /Rototranslation of type viewer/ViewerNodelet to manager manager with the following remappings:

[ INFO] [1308303787.778699180]: /k1 -> /kinect2/rgb/points

[ INFO] [1308303787.778724068]: /k2 -> /kinect1/rgb/points

[ INFO] [1308303787.779804870]: Loading nodelet /Kinect2 of type openni_camera/OpenNINodelet to manager manager with the following remappings:

[ INFO] [1308303791.121934776]: [/Kinect1] Number devices connected: 2

[ INFO] [1308303791.122159531]: [/Kinect1] 1. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'

[ INFO] [1308303791.122209011]: [/Kinect1] 2. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A' [ INFO] [1308303791.124482589]: [/Kinect1] searching for device with serial number = A00364907959051A

[ INFO] [1308303791.163914404]: [/Kinect1] Opened 'Xbox NUI Camera' on bus 1:18 with serial number 'A00364907959051A'

[ INFO] [1308303791.176684366]: rgb_frame_id = '/openni_rgb_optical_frame'

[ INFO] [1308303791.178508719]: depth_frame_id = '/openni_depth_optical_frame'

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...

[ INFO] [1308302364.222578975]: [/Kinect1] Number devices connected: 2

[ INFO] [1308302364.222809829]: [/Kinect1] 1. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'

[ INFO] [1308302364.222865906]: [/Kinect1] 2. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'

[ INFO] [1308302364.225022445]: [/Kinect1] searching for device with serial number = A00364907959051A

[ INFO] [1308302364.271140658]: [/Kinect1] Opened 'Xbox NUI Camera' on bus 1:18 with serial number 'A00364907959051A'

[ INFO] [1308302364.298155716]: rgb_frame_id = '/openni_rgb_optical_frame'

[ INFO] [1308302364.299902851]: depth_frame_id = '/openni_depth_optical_frame'

[ INFO] [1308302364.687453231]: [/Kinect2] Number devices connected: 5

[ INFO] [1308302364.687551458]: [/Kinect2] 1. device on bus 001:18 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device2'

[ INFO] [1308302364.687602722]: [/Kinect2] 2. device on bus 001:18 is a SensorV2 (2ae) from PrimeSense (45e) with serial id 'Device1'

[ INFO] [1308302364.687651620]: [/Kinect2] 3. device on bus 001:26 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00361810132047A'

[ INFO] [1308302364.687694939]: [/Kinect2] 4. device on bus 001:18 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id 'A00364907959051A'

[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


Originally posted by fberga on ROS Answers with karma: 26 on 2011-06-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Filippo,

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:

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

Hope this helps.

Wim


Originally posted by fberga with karma: 26 on 2011-06-17

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.