JakobEngel / dso_ros

ROS wrapper for dso
GNU General Public License v3.0
320 stars 210 forks source link

Catkin branch gives the errors about "librealsense.so" #39

Open ColinZhou1993 opened 6 years ago

ColinZhou1993 commented 6 years ago

Environment: Ubuntu14.04, ros: indigo version Issue: When I git download the catkin branch, using command "catkin_make", it gives the errors below: "/opt/ros/indigo/lib/librealsense.so: undefined reference to libusb_strerror' /opt/ros/indigo/lib/librealsense.so: undefined reference tolibusb_get_port_numbers' /opt/ros/indigo/lib/librealsense.so: undefined reference to libusb_get_parent' /opt/ros/indigo/lib/librealsense.so: undefined reference tolibusb_error_name' collect2: error: ld returned 1 exit status "

/////////////////////////////////////////////////////////////////////////////////////////// In the directory /opt/ros/indigo/lib/, input the command "ls -l | grep librealsense", the results are : " lrwxrwxrwx 1 root root 17 March 30 2017 librealsense.so -> librealsense.so.1 lrwxrwxrwx 1 root root 22 March 30 2017 librealsense.so.1 -> librealsense.so.1.12.1 -rw-r--r-- 1 root root 959216 March 30 2017 librealsense.so.1.12.1 "

///////////////////////////////////////////////////////////////////////////////////////////

I try to reinstall the library using command "sudo apt-get --reinstall install 'ros-indigo-librealsense'", but is does not work, can anyone help me solve this problem? Thanks a lot.

NikolausDemmel commented 6 years ago

Sound like an error nothing to with dso_ros. Looks like the apt package for librealsense is outdated. Have you updated all apt packages? If yes, seems to be an upstream issue.

Neither DSO nor DSO_ROS use librealsense directly AFAIK. It might come in via pangolin though. You might want to try to compile librealsense yourself (e.g. http://wiki.ros.org/librealsense?distro=indigo in your catkin workspace) and then recompiling pangolin making sure it uses that.

Or maybe better, disable librealsense when compiling pangolin.

ColinZhou1993 commented 6 years ago

@NikolausDemmel Thank you for replying, I tried "apt-get update" but does not work. I have installed DSO and Pangolin following the instructions, when I download the some dataset, and using the command "./dso_dataset \ ***", it works well, so, can it say that pangolin has been installed correctly(it should used librealsense when compiling, am I right?), but when I want to use my own camera to run live dso, I download dso_ros branch and catkin_make it, the the errors show up. Should I compile pangolin again?

NikolausDemmel commented 6 years ago

If both DSO and DSO_ROS link the same librealsense.so, and one works but the other doesn't, that is strange. Maybe you need to manually link some libusb for DSO_ROS, which seems to happen for DSO.

  1. Use ldtree to check the linked libraries for both DSO and DSO_ROS. See if they link the same pangolin lib and the same librealsense.
  2. If yes, check if DSO maybe has some additional library like libusb or something that is missing for DSO_ROS.

Otherwise, I don't know...