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

registered depth image is black

asked 2013-01-29 23:45:21 -0600

sebastianKrabben gravatar image

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

ngrennan gravatar image

Hi, i have two working places (office and home).

Office: When i try to display depth images from the kinect with rviz, everything is ok. I switch between depth images and registered depth images with dynamic_reconfigure.

Home: Depth image is normal. The registered depth image is black. The status in rvis is OK. The amount if images rises. When i try to display the data in C++ (cout << image), every pixel is NAN (not a number).

I use (of course) another pc and another kinect at the two working places. The OS (Ubuntu 12.04 (precise)), ROS (rosversion ros 1.8.10) and all used programms should be the same (i'm not shure).

I tried to find some difference between the both systems -> unsuccessful. Any ideas?

Thanks Sebastian

edit retag flag offensive close merge delete

Comments

1

which kind of USB Bus are you using? There are still problems with USB3.0

dinamex gravatar image dinamex  ( 2013-01-30 01:27:43 -0600 )edit

We got the same black depth (or other confusing silent errors) with enabled registration since the last openni update, too..

felix k gravatar image felix k  ( 2013-01-30 02:16:31 -0600 )edit
1

I use USB 2

sebastianKrabben gravatar image sebastianKrabben  ( 2013-01-30 20:14:16 -0600 )edit

I have seen this around a lot and experienced it myself, I guess we can confirm it is an OpenNI bug. I think we should all go to the OpenNI community and report that bug. We can start supporting this question: http://gsfn.us/t/3krs6

georgebrindeiro gravatar image georgebrindeiro  ( 2013-01-31 04:27:38 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
6

answered 2013-01-31 04:58:42 -0600

anto1389 gravatar image

updated 2013-08-30 03:25:47 -0600

But the problem it is that if you turn off that variable the point cloud is not a correct one because the depth and the rgb information is not in the same reference frame! As you can see in one of the topicis you said that they talk about the same topics!

Edit 2

I made it work finally, i don't know whether it will work for you. What i did, was uninstall openni_camera, openni_launch, libopenni-dev and install agian openni and kinect sensor as follows:

To install openni

$ mkdir ~/kinect 
$ cd ~/kinect
$ git clone https://github.com/OpenNI/OpenNI.git -b unstable
$ cd OpenNI/Platform/Linux/CreateRedist
$ bash RedistMaker
$ cd ../Redist/OpenNI-Bin-Dev-Linux-x86*/
$ sudo ./install.sh

To install kinect sensor

$ cd ~/kinect
$ git clone https://github.com/avin2/SensorKinect
$ cd SensorKinect/Platform/Linux/CreateRedist
$ bash RedistMaker
$ cd ../Redist/Sensor-Bin-Linux-x86*
$ sudo sh install.sh

Once, i installed this, i installed back openni_camera and openni_launch. This worked for me, i hope it works for you all too!

edit flag offensive delete link more

Comments

For some reason, it is working OK for me now. Maybe it was a recent update... It was very enlightening to read the documentation about depth_registration, though: http://www.ros.org/wiki/openni_launch#Registration

georgebrindeiro gravatar image georgebrindeiro  ( 2013-02-01 05:44:34 -0600 )edit

I tried to install openni and kinect sensor manually, but i get errors during "bash RedistMaker": ...javac: not found make[1]: * [../../../Bin/x86-Release/org.OpenNI.jar] Error 127 make: * [Wrappers/OpenNI.java] Error 2...Building Failed! (openjdk is installed on my pc!!!)

sebastianKrabben gravatar image sebastianKrabben  ( 2013-02-02 00:48:54 -0600 )edit

This did resolve the problem for me too, along with some downsides: http://answers.ros.org/question/55513

stfn gravatar image stfn  ( 2013-02-20 04:21:09 -0600 )edit

Hi ! i know it hasn't been updated for a long time, but if anyone runs through the same issue as sebastian, it can be solved by installing javac : sudo apt-get install openjdk-7-jdk is the right command for Ubuntu

Lucile gravatar image Lucile  ( 2013-06-11 05:09:26 -0600 )edit
1

After three frustrating days of trying to make depth registration work i finally found your post. Now it works. Thank you! Thank you! Thank you! (I'm using Kubuntu 12.04.2 lts 64 bit and ROS fuerte)

Blizzard gravatar image Blizzard  ( 2013-08-29 23:18:51 -0600 )edit

Hi, i followed george steps but now when i roslaunch openni_launch openni_launch i get: [ INFO] [1379865586.935153519]: No devices connected.... waiting for devices to be connected ........ ........ Before openni could find my kinect...what i'm missing?? Please help me. thanks (Ubuntu 12.04 ROS fuerte) Here is my lsusb command: Bus 001 Device 025: ID 045e:02c2 Microsoft Corp. Bus 001 Device 026: ID 045e:02ad Microsoft Corp. Xbox NUI Audio Bus 001 Device 028: ID 045e:02ae Microsoft Corp. Xbox NUI Camera So kinect is found by pc!! Thanks.

GioRos gravatar image GioRos  ( 2013-09-22 06:15:50 -0600 )edit

@GioRos: Have you blacklisted or otherwise removed the gspca_kinect module? Have you tried installing avin2's SensorKinect module for OpenNI?

georgebrindeiro gravatar image georgebrindeiro  ( 2013-09-23 07:20:38 -0600 )edit

Thank for reply. If i type rmmod gspca_kinect i get "Module gspca_kinect does not exist in /proc/modules";However gspca_kinect blaklisted but again no device connetted...! here is what i did: sudo apt-remove openni_camera, openni_launch, libopenni-dev. Then followed your guide to install openni & avin2 kinect sensor. Then sudo apt-get install openni_camera, openni_launch.

GioRos gravatar image GioRos  ( 2013-09-23 07:40:23 -0600 )edit
4

answered 2013-01-31 04:47:58 -0600

updated 2013-01-31 05:23:43 -0600

Apparently the newest version of OpenNI has a bug where, in ROS:

  1. Point clouds are available in /camera/depth_registered/points even if the depth_registration flag is off.

  2. When the depth_registration flag is off, the clouds do not seem depth registered.

  3. When the depth_registration flag is on, the point clouds and the corresponding depth image are filled with NaN values.

That may be a bug in the latest version of OpenNI or an incompatibility between the latest version and ROS. I haven't seen any reports of people having this problem outside of ROS, but that may be just because I haven't looked enough.

edit flag offensive delete link more
1

answered 2013-04-15 05:39:21 -0600

jcc gravatar image

This is likely a bug on the implementation, i'v open a issue ticket on github, and i sugest that if you have the same problem to do the same (in my ticket or in another).

Here it is: https://github.com/ros-drivers/openni_camera/issues/13

edit flag offensive delete link more
0

answered 2013-08-22 00:40:31 -0600

JosiahKhor gravatar image

updated 2013-08-22 02:26:49 -0600

I recently came across the same problem (On Ubuntu 10.04 Lucid with ros fuerte), and managed to resolve the issue as follows:

First install openni_camera and openni_launch:

$ sudo apt-get install openni_camera
$ sudo apt-get install openni_launch

Now, the problem with this appears to be as on ht.tp://www.ros.org/wiki/openni#Fuerte_migration_guide, except I had trouble actually getting openni-dev and ps-engine to install. What I ended up doing was to first copy openni_camera and openni_launch:

$ roscd openni_camera
$ cd ..
$ sudo cp -r openni_camera openni_camera_backup
$ sudo cp -r openni_launch openni_launch_backup

Then I installed openni-dev and ps-engine (this will tell you that it is going to delete openni_camera and openni_launch! This is expected, say yes):

$ sudo apt-get install openni-dev
$ sudo apt-get install ps-engine

Then restore from your backups:

$ sudo mv openni_camera_backup openni_camera
$ sudo mv openni_launch_backup openni_launch 
$ roscd openni_camera

Now follow the steps at ht.tp://www.ros.org/wiki/openni#Fuerte_migration_guide (edit manifest.xml and Cmakelists.txt, in manifest.xml, remove the line '<rosdep name="libopenni-dev"/>').

$ rosmake

The depth registration image should now work. The basic idea was that you wanted openni_camera to use openni-dev instead of libopenni-dev, but you can't install openni-dev with apt-get without uninstalling openni-camera simultaneously.

edit flag offensive delete link more

Comments

1

Maybe one should use those packages from source in an overlay rather than moving with sudo, as this might break with updates. Also since catkin the package contents are somewhat spread.

felix k gravatar image felix k  ( 2013-08-23 05:27:51 -0600 )edit

I get the following error: `ps-engine : Depends: openni-dev (>= 1.5.2.23~precise) but 1.3.2.1-4+precise2 is to be installed`

Rasoul gravatar image Rasoul  ( 2013-12-30 04:56:27 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2013-01-29 23:45:21 -0600

Seen: 6,685 times

Last updated: Aug 30 '13