Ask Your Question

Kinect freezes or loses rgb under openni_launch

asked 2015-10-07 18:41:04 -0500

dinosaur gravatar image

updated 2015-10-07 18:45:29 -0500

When running kinects (the original kinect, not kinect 2) with roslaunch openni_launch openni.launch, I have found two problems.

  1. The kinects stop publishing frames
  2. The rgb image (as seen in rviz) flickers between normal color and all-black

Usually the kinect will run normally for about a minute, then one of these issues happens, and the kinect needs to be restarted. Both issues these occur with no visible error messages in the console where I ran openni_launch. The driver keeps running and doesn't seem to be aware that anything is wrong. The problem seems to be intermittent -- some days it's better, some days it's worse, and sometimes restarting my computer helps.

I've had the freenect driver recommended to me, but I need to use openni for compatibility with openni_tracker.

How can I make the openni driver run more robustly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-07 18:43:48 -0500

dinosaur gravatar image

updated 2015-10-07 18:47:34 -0500

Figured this out! Similar root cause to this question, but with different symptoms.

The cause seems to be stray processes that don't shut down correctly from the last time the kinect was started.

  1. xn processes. Find them with ps aux | grep -i xn. If this grep finds processes related to primesense or XnSensorServer, and the kinect is not running, kill them.
  2. nodelet processes. Find them with ps aux | grep -i nodelet. They should have names like camera_nodelet_manager[1]. If no kinect is running, kill them.

I don't have direct proof that this is the solution, but I noticed that the kinects worked smoothly after I killed the above processes, after a day of continually crashing a few minutes after being started.

I'd recommend checking for the above processes and killing them before each time you launch a kinect. It could also help to always give the openni driver time to shut down normally, i.e. do ctrl-c and wait 10 seconds, rather than doing ctrl-\ to stop it immediately.

[1] Or xxx_nodelet_manager, if you ran openni.launch with camera:=xxx.

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

1 follower


Asked: 2015-10-07 18:41:04 -0500

Seen: 154 times

Last updated: Oct 07 '15