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

openNI_camera compiling problem

asked 2011-03-01 08:07:36 -0600

Eoghan gravatar image

updated 2011-03-01 09:53:59 -0600

tfoote gravatar image

Hi all, Using Ubuntu 10.10 and diamondback I am coming up with the following error when I run rosmake ni --rosdep-install,

Linking CXX executable

Linking CXX executable> rosmake/rosmake_output-20110301-165933

rosmake/rosmake_output-20110301-165933

rosmake/rosmake_output-20110301-165933

rosmake/rosmake_output-20110301-165933> Linking CXX executable ../bin/openni_example /usr/bin/ld: cannot find -lusb collect2: ld returned 1 exit status make[3]: * [../bin/openni_example] Error 1
make[3]: Leaving directory /home/linux/ni/ni/openni_camera/build' make[2]: *** [CMakeFiles/openni_example.dir/all] Error 2 make[2]: Leaving directory /home/linux/ni/ni/openni_camera/build' make[1]: *
[all] Error 2 make[1]: Leaving directory `/home/linux/ni/ni/openni_camera/build' -------------------------------------------------------------------------------} [ rosmake ] Output from build of package openni_camera written to: [ rosmake ]
/home/linux/.ros/rosmake/rosmake_output-20110301-165933/openni_camera/build_output.log [rosmake-0] Finished <<< openni_camera [FAIL] [ 2.46 seconds ]
[ rosmake ] Halting due to failure in package openni_camera. [ rosmake ] Waiting for other threads to complete. [ rosmake ] Results:
[ rosmake ] Built 62 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/linux/.ros/rosmake/rosmake_output-20110301-165933rosmake/rosmake_output-20110301-165933

Linking CXX executable

rosmake/rosmake_output-20110301-165933

Can anyone suggest where I might have gone wrong ? I am quite new to Linux and still trying to get my head around both Ubuntu and Ros. Any help is gratefully appreciated ! rosmake/rosmake_output-20110301-165933 rosmake/rosmake_output-20110301-165933Linking CXX executable

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-03-01 11:10:38 -0600

dan gravatar image

updated 2011-03-01 11:36:44 -0600

Your program is failing at runtime because it cannot find libusb. The most likely answer is that you are using a build from a few days ago that had a bug, see this question: http://answers.ros.org/question/162/building-ni-on-ubuntu-1010-and-diamondback-cant

and Tully responded:

There was a missing export of -lusb in the openni_camera. I've patched it in the master branch of ni.

However, if you have already updated and are still getting this problem, then you need to be sure that you have libusb installed (Check synaptic package manager) and a path to it. Along those lines, plug in your kinect and use lsusb to be sure it is recognized.

Although, this is not directly related to your problem, if you are having trouble with libusb, then it is possible you have not used usb devices with Linux much, so you may want to look at how to set up permissions for that. This was covered in the kinect Getting Started tutorial but, unfortunately, when WG decided to go with the OpenNi driver, the older kinect tutorial was deprecated and the Getting Started tutorial eliminated. That's too bad because it told how to set up USB permissions that you need to do to get the kinect to work. It also listed the sort of results you should see from lsusb if the kinect is recognized correctly. The good news is that google has that paged cached. So look at look at the cache result of the first hit on google with this search: ros kinect getting started

and, in case the cache is lost, here are the pertinent lines:

Setup Port

  1. Plug in Kinect to USB port
  2. Open up permissions on usb port

    sudo chmod 777 -R /dev/bus/usb

udev way

Using udev rules, your computer will always be setup to use the kinect. This only needs to be done once. In Lucid, paste the following into /etc/udev/rules.d/53-kinect.rules Hint: use sudo.

SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02b0", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ad", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ae", MODE="0666"

Make sure the kinect is disconnected from your computer and run:

sudo service udev reload

Then reconnect your kinect - permissions should be normal (read/write).

edit flag offensive delete link more
0

answered 2011-03-02 03:37:42 -0600

Eoghan gravatar image

Thanks Dan, That was the problem. I updated the build and everything is working fine now !

edit flag offensive delete link more

Comments

In the future please mark dan's answer as correct by using the check mark next to the thumbs up/down buttons on his answer. I've done it for you on this one.
tfoote gravatar image tfoote  ( 2011-03-02 05:24:32 -0600 )edit

Question Tools

Stats

Asked: 2011-03-01 08:07:36 -0600

Seen: 707 times

Last updated: Mar 02 '11