Giter Club home page Giter Club logo

Comments (14)

mdhorn avatar mdhorn commented on June 2, 2024

Did you follow the librealsesne installation instructions?

Are you using the recommended Video4Linux backend? None list listed.

The version of librealsense you listed is too old; you need to upgraded to v0.9.2.
This is likely the reason for the undefined library symbol.
In your librealsense github local repo, update to version v0.9.2:
git pull
git checkout -B branch_v0.9.2 v0.9.2
make && sudo make install

There will be production packages released soon which will avoid this setup overhead.

from realsense-ros.

LorenzMeier avatar LorenzMeier commented on June 2, 2024

@mdhorn Just ran into the same issue.

from realsense-ros.

LorenzMeier avatar LorenzMeier commented on June 2, 2024

@mdhorn Your suggested fix does not fix this. Do you have an Ubuntu 16.04 system with ROS Kinetic that you can test on? A lot of the documentation is generally also outdated or outdated for 16.04.

from realsense-ros.

LorenzMeier avatar LorenzMeier commented on June 2, 2024

Error in my case:

[ERROR] [1470149601.091958711]: Failed to load nodelet [/camera] of type [realsense_camera/R200Nodelet] even after refreshing the cache: Failed to load library /home/pixhawk/catkin_ws/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/pixhawk/catkin_ws/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZNK3ros10NodeHandle8hasParamERKSs)
[ERROR] [1470149601.092001623]: The error before refreshing the cache was: Failed to load library /home/pixhawk/catkin_ws/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/pixhawk/catkin_ws/devel/lib//librealsense_camera_nodelet.so: undefined symbol: _ZNK3ros10NodeHandle8hasParamERKSs)
[FATAL] [1470149601.092118211]: Service call failed!
[camera-3] process has died [pid 21593, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load realsense_camera/R200Nodelet nodelet_manager camera/depth/image_raw:=camera/depth/image_raw camera/color/image_raw:=camera/color/image_raw camera/ir/image_raw:=camera/ir/image_raw camera/ir2/image_raw:=camera/ir2/image_raw camera/depth/points:=camera/depth/points camera/depth/camera_info:=camera/depth/camera_info camera/color/camera_info:=camera/color/camera_info camera/ir/camera_info:=camera/ir/camera_info camera/ir2/camera_info:=camera/ir2/camera_info camera/get_settings:=camera/get_settings __name:=camera __log:=/home/pixhawk/.ros/log/da858370-58c0-11e6-b2f8-4485007315ea/camera-3.log].

from realsense-ros.

LorenzMeier avatar LorenzMeier commented on June 2, 2024

I noticed that the Intel install instructions for librealsense mess with the GCC version installed on the system and its not entirely clear which version is required. I'm investigating if this is the core reason the package breaks.

from realsense-ros.

mdhorn avatar mdhorn commented on June 2, 2024

Are are building the code in Continuous Integration for both Indigo and Kinetic as well as build for both in the ROS Build Farm. We also do full regression testing under both Indigo and Kinetic before an official release is made.

I'm open to improving the documentation if you see some part that isn't covering both 14.04 for Indigo and 16.04 for Kinetic.

In the librealsense directions, you should be using the compiler upgrade steps if you are on Kinetic, just for Indigo under 14.04.
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md#video4linux-backend
In Step 3 you would only follow the instructions for 16.04 "Kernel in 16.04.xx"

If you are still having this problem, can you please provide all of the requested data for your configuration

Version Method
Operating System grep DISTRIB_DESCRIPTION /etc/*elease*
Kernel uname -r
Backend `ls /sys/class
ROS rosversion -d
ROS RealSense rosversion realsense_camera
librealsense `cat /librealsense/readme.md
R200 Firmware View the ROS log from running nodelet OR `/librealsense/bin/cpp-enumerate-devices

And the commands you used to both build and then launch the node.
There has to be something difference we aren't seeing when it builds for many people and the build farm, so helping identifying this difference will be good.

from realsense-ros.

jb892 avatar jb892 commented on June 2, 2024

Hi @mdhorn ,

Thanks for your reply! I tried the command you provided to update my librealsense. However, I failed to update. Could you please give me a more detailed setup guide? Thanks very much!
Bo.

jack@jack-All-Series:~/Documents/librealsense$ git pull
Already up-to-date.
jack@jack-All-Series:~/Documents/librealsense$ git checkout -B branch_v0.9.2 v0.9.2
M   librealsense.qtcreator/c-tutorial-1-depth.pro
M   librealsense.qtcreator/cpp-capture.pro
M   librealsense.qtcreator/cpp-pointcloud.pro
Switched to a new branch 'branch_v0.9.2'
jack@jack-All-Series:~/Documents/librealsense$ make && sudo make install
mkdir -p obj/libuvc
mkdir -p lib
mkdir -p bin
g++ src/uvc-libuvc.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0` -mssse3 -c -o obj/uvc-libuvc.o
/bin/sh: 1: g++: not found
Makefile:98: recipe for target 'obj/uvc-libuvc.o' failed
make: *** [obj/uvc-libuvc.o] Error 127

from realsense-ros.

mdhorn avatar mdhorn commented on June 2, 2024

@jb892 The current error shows g++ not found.
I'm not sure how you previously built the librealsense and the camera module without g++, but please run these steps:
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libusb-1.0-0-dev libglfw3-dev g++

Did you already follow the required librealsense instructions?
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

from realsense-ros.

Thomas00010111 avatar Thomas00010111 commented on June 2, 2024

Hi @mdhorn,
I am running into the same problem on my PC, on my laptop I can use my r200 camera with ros. Here is information you asked for:

robot@robot-S5520SC:~/SourceCode/librealsense$ git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
git pull
git checkout -B branch_v0.9.2 v0.9.2
Then steps from master/doc/installation.md. ( I had t add this line to ./scripts/patch-uvcvideo-4.4.sh: CONFIG_LOCATION=/usr/src/linux-headers-$(uname -r) )

robot@robot-S5520SC:/SourceCode/librealsense$ grep DISTRIB_DESCRIPTION /etc/elease
/etc/lsb-release:DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
robot@robot-S5520SC:
/SourceCode/librealsense$ uname -r
4.4.0-040400-generic
robot@robot-S5520SC:/SourceCode/librealsense$ ls /sys/class | grep video4linux
video4linux
robot@robot-S5520SC:
/SourceCode/librealsense$ rosversion -d
indigo
robot@robot-S5520SC:/SourceCode/librealsense$ rosversion realsense_camera
1.4.0
robot@robot-S5520SC:
/SourceCode/librealsense$ cat /home/robot/SourceCode/librealsense/readme.md | grep release-image | awk -F- '{print $3}'

0.9.1
robot@robot-S5520SC:~/SourceCode/librealsense$ cat /home/robot/SourceCode/librealsense/bin/cpp-enumerate-devices | grep -i firmware
Binary file (standard input) matches

And the error I get when calling roslaunch realsense_camera r200_nodelet_rgbd.launch is:
[ERROR] [1472775639.998427419]: Failed to load nodelet [/camera/camera] of type [realsense_camera/R200Nodelet] even after refreshing the cache: MultiLibraryClassLoader: Could not create object of class type realsense_camera::R200Nodelet as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ERROR] [1472775639.998518547]: The error before refreshing the cache was: Failed to load library /home/robot/catkin_ws/devel/lib//librealsense_camera_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/robot/catkin_ws/devel/lib//librealsense_camera_nodelet.so: undefined symbol: rs_is_stream_enabled)
[FATAL] [1472775639.998911327]: Failed to load nodelet '/camera/cameraof typerealsense_camera/R200Nodeletto managercamera_nodelet_manager'
[camera/camera-3] process has died [pid 25234, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet load realsense_camera/R200Nodelet camera_nodelet_manager camera/depth/image_raw:=depth/image_raw camera/color/image_raw:=rgb/image_raw camera/ir/image_raw:=ir/image_raw camera/ir2/image_raw:=ir2/image_raw camera/depth/points:=depth/points camera/depth/camera_info:=depth/camera_info camera/color/camera_info:=rgb/camera_info camera/ir/camera_info:=ir/camera_info camera/ir2/camera_info:=ir2/camera_info __name:=camera __log:=/home/robot/.ros/log/12cb9784-70a3-11e6-a3f6-001517fd6d9c/camera-camera-3.log].
log file: /home/robot/.ros/log/12cb9784-70a3-11e6-a3f6-001517fd6d9c/camera-camera-3*.log

Maybe as additional information, the library itself is present in /home/robot/catkin_ws/devel/lib/.
... and I tried it first without switching to the 0.9.2 branch, with the same error message.
... and I can execute /bin/cpp-config-ui and all camera images are shown.

Regards,
Thomas

from realsense-ros.

mdhorn avatar mdhorn commented on June 2, 2024

@Thomas00010111
There is a conflict between those versions of librealsense and realsense_camera.

Since you've followed the steps for updating the kernel for librealsense, please try using just the prebuilt, release ROS packages.

Open a new terminal, and do not source your local catkin workspace. Check that you do not attempt to source your workspace in your shell startup files (i.e. .bashrc or .profile).

Only source the system setup file:
source /opt/ros/indigo/setup.bash
Verify this by checking the ROS_PACKAGE_PATH
echo $ROS_PACKAGE_PATH
/opt/ros/indigo/share:/opt/ros/indigo/stacks

Install the released RealSense camera package:
sudo apt-get update
sudo apt-get install ros-indigo-realsense-camera
This will install both realsense camera and librealsense into /opt/ros/indigo

Now verify that you have the released versions installed:
rosversion librealsense
0.9.2
rosversion realsense_camera
1.3.0

If you need the latest version of realsense_camera (version 1.4.0 for the SR300 support), then you can a) build from source, or b) use the release candidate from the [Shadow Repository|(http://wiki.ros.org/ShadowRepository).

If you build from sources, be sure NOT to have librealsense in your catkin workspace or you could face the version conflict again.
If you use the Shadow Repository, be sure to remove it when you are done as you will get unexpected results in the future in getting release candidate packages for all of ROS.

from realsense-ros.

Thomas00010111 avatar Thomas00010111 commented on June 2, 2024

Hi @mdhorn,
Thank you very much for your fast reply! It worked!
I guess I can know delete the realsense directory from my catkin_ws as well as the librealsense directory (plus /usr/local/lib/lirbrealsense.so)?

Thanks,
Thomas

from realsense-ros.

mdhorn avatar mdhorn commented on June 2, 2024

@Thomas00010111 Yes, you do not need the catkin workspace version of librealsense, nor do you need the /usr/local/lib/librealsense.so, /usr/local/include/librealsense -- they can be purged.

from realsense-ros.

Thomas00010111 avatar Thomas00010111 commented on June 2, 2024

One more question, maybe you can explain this one, too. I have the very strange situation that when I run "rosrun image_view image_view image=/camera/rgb/image_rect" in console A the shown window is black (i.e. frozen) when I run the same command in console B it works. But it only works in B, in a new console the shown image is frozen as well. I compared the environment variables (export) and they are identical.

from realsense-ros.

Thomas00010111 avatar Thomas00010111 commented on June 2, 2024

I think I solved it by deleting /usr/locale/lib/librealsense.so.

Thanks,
Thomas

from realsense-ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.