0
$\begingroup$

Rosanswers logo

I recently purchased the ASUS Xtion Pro and am trying to get it running on my laptop which is running Ubuntu 12.04 and ROS fuerte. I followed the instructions on the ROS wiki page for openni_camera and openni_launch for fuerte. I did the following installs:

sudo apt-get install ros-fuerte-openni-camera
sudo apt-get install ros-fuerte-openni-launch

When I plug the sensor in, I can do a lsusb -v and I get the following block for the PrimeSense

Bus 004 Device 006: ID 1d27:0601  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1d27 
  idProduct          0x0601 
  bcdDevice            0.01
  iManufacturer           5 PrimeSense
  iProduct                4 PrimeSense Device
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          206
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
 
.......

So it seems like the machine is recognizing the device properly.

I then run: roslaunch openni.launch.

Here is some of the output I get from this:

[ INFO] [1386787263.933250900]: Number devices connected: 1
[ INFO] [1386787263.933369646]: 1. device on bus 004:06 is a PrimeSense Device (601) from PrimeSense (1d27) with serial id ''
[ INFO] [1386787263.934284326]: Searching for device with index = 1
[ INFO] [1386787264.035335419]: No matching device found.... waiting for devices. Reason: openni_wrapper::OpenNIDevice::OpenNIDevice(xn::Context&, const xn::NodeInfo&, const xn::NodeInfo&, const xn::NodeInfo&, const xn::NodeInfo&) @ /opt/ros/fuerte/stacks/openni_camera/src/openni_device.cpp @ 61 : creating depth generator failed. Reason: USB interface is not supported!

I see that many of the ros topics come up, but they are not being written to. I tried using various device_id's by modifying the openni.launch file, but none of these worked.

I also tried plugging the device into all of the USB ports on my machine with the same result.

Does anyone have any idea on how to fix this problem?

Thanks in advance. Mark


Originally posted by rosey1211 on ROS Answers with karma: 51 on 2013-12-11

Post score: 5

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Our lab has two separate Asus Xtion Pro Live devices both ordered from the same NewEgg part number, and both with the same part number listed on the side of the box. However, looking in the lenses of the projector, it is clear that they are two different versions of the device. The old one works in fuerte, groovy, and hydro on several different USB ports on several different computers. The new one gives the same error you get on all ports/computers/ROS versions that we have tried.


NEW VERSION:

image description


OLD VERSION:

image description


Notice the "square" shape of the internals of the left lense on the new version.

Possible Solutions:

  1. Install OpenNI-Compliant Sensor Driver v5.1.6.6 from this site. This post has a discussion about why this helps the situation. This fixes the problem on our computers, but then the Kinects in the lab don't work. The command sudo apt-get install --reinstall libopenni-sensor-primesense0 allows the Kinects to work again.
  2. Use openni2_camera This also allows the device to work. I tried it in hydro and groovy. Unfortunately using OpenNI 2 caused other applications we are working with to not work.

There might be other ways to fix this problem, but I really haven't dug into it much.

EDIT

Just to provide a bit more info, the old sensor has an idProduct value of 0x600 in lsusb and the new one has an idProduct of 0x601.

EDIT 2

Our lab just bought 2 new Xtions from NewEgg, and we spent an entire day trying to come up with a single set of drivers that would allow collection of data off both 0x600 and 0x601 Xtions and 0x02ae Kinects. Additionally we wanted the openni_tracker to work as well. We tried compiling many different forks of the original Primesense/Sensor repo, each with different versions of NITE and the OpenNI SDK installed. Just for reference, we spent the most time with the following repositories:

  • jspricke openni-sensor-primesense - seems to be where the apt-get versions were built from (not super sure of this)
  • ph4m/SensorKinect - applied a patch 6 months ago that allowed building of avin2's repo with OpenNI SDK v1.5.7.10
  • rbrusu/Sensor - seemed to be a likely candidate, and once we got it building and installed, we were actually able to sporadically get data off of all devices

In the end, this is what worked

  1. Install drivers and OpenNI packages from apt-get. Gave following versions:

    • libopenni-dev ~ 1.5.4.0-4+precise1
    • libopenni-nite-dev ~ 1.3.1.5~precise
    • libopenni-sensor-primesense-dev ~ 5.1.0.41-2+precise1
    • libopenni-sensor-primesense0 ~ 5.1.0.41-2+precise1
    • libopenni0 ~ 1.5.4.0-4+precise1
  2. Then as mentioned on this page, you must change to a different NITE version to get openni_tracker working. So do one of the following:

    • Install NITE v1.5.2.21
    • Install both NITE 1.5.2.23, and OpenNI SDK v1.5.7.10
  3. I'm not 100% positive this step is necessary, but the udev rules that ship with the apt-get packages seem to be leaving out some devices. So we created a new file called /etc/udev/rules.d/primesense-usb.rules. I'll put its contents at the bottom of this answer. They can also be found at this pastebin.

  4. Following cues from this answers.ros.org page and @hfb below, we edited the /etc/openni/GlobalDefaults.ini. We set UsbInterface=0, and that's it. Suddenly both Asus devices, and the Kinect devices started working on 3 separate computers with Fuerte, Groovy and Hydro. All computers were on 12.04, and all devices were on USB 2.0 ports.

I realize that step 2 has multiple packages that may be hard to come by now that Primesense/OpenNI sites are gone (message me if you need copies of any old OpenNI/NITE/SensorDriver packages). Perhaps we can get structure.io to host some legacy versions as well as OpenNI2.

Contents of /etc/udev/rules.d/primesense-usb.rules:

# Make primesense device mount with writing permissions (default is read only for unknown devices)
SUBSYSTEM=="usb", ATTR{idProduct}=="0200", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0300", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0401", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0500", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0600", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0601", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="0609", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="1250", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="1260", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="1270", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="1280", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="1290", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="f9db", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video"

#--avin mod--
# Kinect
SUBSYSTEM=="usb", ATTR{idProduct}=="02ae", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="02ad", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
SUBSYSTEM=="usb", ATTR{idProduct}=="02b0", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="02be", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
SUBSYSTEM=="usb", ATTR{idProduct}=="02bf", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"

Originally posted by jarvisschultz with karma: 9031 on 2013-12-12

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by Martin Günther on 2013-12-13:
Great answer!

Comment by gkmbinh on 2015-07-16:
[ WARN] [1437028436.633715431]: Camera calibration file /home/ubuntu/.ros/camera_info/rgb_1404280413.yaml not found. [ WARN] [1437028436.633808427]: Using default parameters for RGB camera calibration. [ WARN] [1437028436.633902173]: Camera calibration file /home/ubuntu/.ros/camera_info/depth_140428

Comment by swilker on 2016-09-06:
Yes this got me the image when I use: rosrun image_view image_view image:=/camera/rgb/image_color However the depth map seems broken, can you help? rosrun image_view image_view image:=/camera/depth/image_raw locks up the system.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I'm not sure if this will help as I'm running mine on hydro and 12.04 but this helped me out. http://answers.ros.org/question/61211/problem-with-xtion-pro-live-and-openni_camera/?answer=61212#post-id-61212 When I first was troubleshooting, I saw this above question and went into GlobalDefaults.ini and changed UsbInterface to 2 but something that was not mentioned in the answer was you need to reboot the computer after you change this file. I did not when I first tried it out, it didn't work, so I assumed it was bad advice but I saw elsewhere that you do need to reboot and that fixed my problem.

Steps:

sudo chmod 666 /etc/openni/GlobalDefaults.ini

Uncomment the UsbInterface line and set value to 2

REBOOT computer

roslaunch openni_launch openni.launch

You should be good to go after that. At least that is what worked for me. Now getting my Kinect to work is another issue that has been bothering me for quite some time now but that's a different question for another day after I hack around some more.


Originally posted by hfb with karma: 31 on 2014-04-15

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by zipper1956 on 2014-08-10:
I works for me! Thank you very much!

Comment by rdhn on 2015-03-07:
The UsbInterface line has already been set value to 2. What should I do next? I am working with the newer version of Xtion on hydro.

Comment by hfb on 2015-03-09:
rdhn, I have the newer version as well and the steps I wrote are what ended up working for me. The reboot was the key to getting it work. It's a pain. You might try changing the value, reboot, try it, then change it back, reboot, and try it again. Also make sure to follow the other steps as they did

Comment by rdhn on 2015-03-09:
I rebooted the system several times after changing the value. Xtion is working at its best now. Nice hack.

Comment by gkmbinh on 2015-07-16:
[ WARN] [1437028436.633715431]: Camera calibration file /home/ubuntu/.ros/camera_info/rgb_1404280413.yaml not found. [ WARN] [1437028436.633808427]: Using default parameters for RGB camera calibration. [ WARN] [1437028436.633902173]: Camera calibration file /home/ubuntu/.ros/camera_info/depth_140428

$\endgroup$

Your Answer

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