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

Openni2 Unable to Subscribe To Two Cameras Simultaneously

asked 2014-08-07 13:43:17 -0500

atp gravatar image

updated 2014-08-11 08:53:27 -0500

I have two Asus Xtion Pros, but it is impossible to subscribe to both depth_registered/points topics at the same time. I have looked into the logs of openni2 launch but there's nothing relevant in there, and there are also no error messages printed in the terminal. Any ideas?

UPDATE: Actually, there is a warning when starting the openni2 driver:

Warning: USB events thread - failed to set priority. This might cause loss of data...

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-10 16:22:47 -0500

paulbovbel gravatar image

updated 2014-08-11 10:20:57 -0500

Might be able to help troubleshoot if you post the contents of your kernel log (dmesg), as this is most likely a hardware issue. Make sure you capture the bits when you plug in the cameras, and start openni for each of them.

Making the setup work greatly depends on which revision of Xtion you're using (0600 or 0601, check lsusb -l output). Since you're using openni not openni2, I'm assuming you're using the older 0600 Xtions.

Running two cameras simultaneously is definitely possible, but you'll be limited by your hardware. I found that many USB chipsets would not support running multiple Xtions (probably due to data bandwidth limitations), which could be solved by using a separate USB host card for the second camera.

Making everything work is compounded by the fact that older Xtions in particular are very finicky about USB hardware support - USB2 and USB3. There is a firmware hotfix ( https://github.com/nh2/asus-xtion-fix ) that supposedly makes the 0600 work with USB3 and openni2, but I was lucky enough to be able to pull two newer 0601s from labmates and didn't have to go through that mess.

edit flag offensive delete link more

Comments

Just saw that you're using openni2, so disregard the last part. Also keep in mind that openni2 uses a 'lazy publisher', meaning that it will only start pulling data from your cameras AFTER someone subscribes to it. So make sure that's what's captured in your dmesg log if you post it.

paulbovbel gravatar image paulbovbel  ( 2014-08-10 16:26:04 -0500 )edit

Until now, putting each camera on a different bus solved the problem. I assume that this connects each camera to a different USB host card (as you suggested).

atp gravatar image atp  ( 2014-08-11 10:07:00 -0500 )edit

But it doesn't work anymore? Weird that you don't see anything pop up in dmesg. What happens when you try to subscribe to both, just no output from either?

Have you tried playing around with the endpoint settings (don't forget to restart) - link

paulbovbel gravatar image paulbovbel  ( 2014-08-11 10:19:08 -0500 )edit

No, it does work! I just said until now because I wanted to give it some more time before I say that it works. So, I think this is enough time now. That's why I marked your answer here as correct.

atp gravatar image atp  ( 2014-08-11 11:51:07 -0500 )edit
2

answered 2014-08-07 13:50:30 -0500

ahubers gravatar image

updated 2014-08-07 13:55:52 -0500

Are the two cameras in separate namespaces? This can be modified within openni.launch through the following argument:

   <!-- "camera" should uniquely identify the device. All topics are pushed down
   into the "camera" namespace, and it is prepended to tf frame ids. -->
    <arg name="camera" default="camera" />

So running roslaunch openni_launch openni.launch camera:=camera1 on the first camera, and, on the other, roslaunch openni_launch openni.launch camera:=camera2 should publish the topics under separate namespaces.

edit flag offensive delete link more

Comments

Yes, they are under different namespaces. I think if you start a second openni2_launch with the same name for the camera, then the first one gets killed. I have already a program that succesfully subscribes to .../depth/points for both devices.

atp gravatar image atp  ( 2014-08-07 18:24:27 -0500 )edit

Don't forget to set a new device_id, too. So you need to type roslaunch openni2_launch openni2.launch camera:=camera2 device_id:=#2

BanditBloodwyn gravatar image BanditBloodwyn  ( 2016-09-05 04:21:14 -0500 )edit

I have the same problem, please help me to solve it, this is my question https://answers.ros.org/question/316305/how-to-run-kinect-and-asus-cameras-simultaneously/

Redhwan gravatar image Redhwan  ( 2019-03-06 20:14:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-07 13:43:17 -0500

Seen: 1,351 times

Last updated: Aug 11 '14