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

hydro + kinect + Ubuntu 12.04 library issue?

asked 2014-01-28 05:13:29 -0500

gt-mike gravatar image

updated 2016-10-24 09:02:37 -0500

ngrennan gravatar image

I am trying to use ROS Hydro to launch a Kinect in Ubuntu 12.04 LTS.

I installed the proper packages using: sudo apt-get-install ros-hydro-openni-camera ros-hydro-openni-launch

However, when I run $roslaunch openni_launch openni.launch I get this error with ROS Hydro: /opt/ros/hydro/lib/nodelet/nodelet: symbol lookup error: /opt/ros/hydro/lib//libopenni_nodelet.so: undefined symbol: _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

It seems to me that the path is wrong because it contains two //'s in a row before libopenni_nodelet.so but I have no idea where I should fix the problem.

Thanks for your time in advance. --Mike

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2014-01-28 06:17:52 -0500

bchr gravatar image

updated 2014-02-19 23:07:47 -0500

Tip: type this in your shell:

c++filt _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

This will allow you to see the missing symbol in human-readable format:

ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)

This process is called demangling. Now, your system is not able to find this symbol in /opt/ros/hydro/lib/libopenni_nodelet.so or the shared libraries it's linked to. You can confirm that you don't have it in your installed ROS libraries by typing:

nm -D /opt/ros/hydro/lib/*.so | grep -i "T _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z"

In my case (working Hydro), I get (in /opt/ros/hydro/lib/librosconsole.so):

0000000000016530 T _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

Conclusion: there must be an error in the package (not up-to-date or missing shared library dependency). Check that you are up-to-date as advised by @ahendrix, and if the problem persists, you may want to contact the developers and/or packagers.

Update

Here's a script that can help you find a given symbol in a given library directory:

find_symbol.sh

#!/bin/sh
# First argument: library folder (e.g. /opt/ros/hydro/lib)
# Second argument: mangled symbol (e.g. _ZN3ros7console8shutdownEv)
for lib in $(find $1 -name \*.so) ; do
    res=`nm -D $lib | grep $2 | grep -v " U "`
    if [ ! -z "$res" ]; then
        echo "$lib: $res"
    fi
done

Then run (for instance):

./find_symbol.sh /opt/ros/hydro/lib _ZN3ros7console8shutdownEv

Output:

/opt/ros/hydro/lib/librosconsole.so: 0000000000015e00 T _ZN3ros7console8shutdownEv

edit flag offensive delete link more
0

answered 2014-02-01 06:50:41 -0500

Keerthi Raj gravatar image

Even I am experiencing the same issue except that the undefined symbol is different:

/opt/ros/hydro/lib/nodelet/nodelet: symbol lookup error: /opt/ros/hydro/lib//libopenni_nodelet.so: undefined symbol: _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

If I type

c++filt _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

I get,

openni_wrapper::OpenNIDevice::getSerialNumber()

and I type:

nm -D /opt/ros/hydro/lib/*.so | grep -i "T _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv"

I get:

00000000000233a0 T _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

Can someone explain what does this mean and how to fix it? Note that I installed latest ROS hydro on 28th Jan and checked that ROS is up-to-date by running sudo apt-get update and sudo apt-get dist-upgrade today (1st Feb).

Thanks, Raj

edit flag offensive delete link more

Comments

This looks like a missing link to the library. Check whether "libopenni_nodelet.so" is linked to the library holding this symbol (which is apparently not the case), and check the package's CMakeLists for this missing library in the linker-related part.

bchr gravatar image bchr  ( 2014-02-01 07:59:41 -0500 )edit

How to find the library which is holding this symbol? Sorry, I am totally new to ROS.

Keerthi Raj gravatar image Keerthi Raj  ( 2014-02-12 02:47:58 -0500 )edit

You can use the find_symbol.sh script that I added to my answer. This leads me to: /opt/ros/hydro/lib/libopenni_driver.so

bchr gravatar image bchr  ( 2014-02-19 22:55:02 -0500 )edit

"openni_wrapper::OpenNIDevice::getSerialNumber()" I'm not sure which version of the Kinect you're using but 1473's don't have serial numbers.

Athoesen gravatar image Athoesen  ( 2014-02-20 10:27:11 -0500 )edit
1

answered 2014-01-28 06:11:27 -0500

ahendrix gravatar image

The path looks fine; the OS will collapse multiple '//'s together automatically.

It looks like the real issue here is ABI breakage in one of the underlying libraries; probably the call to ros::console::print(). I think rosconsole underwent some ABI changes recently, and it's possible that the version you have isn't up to date.

Try running sudo apt-get update and sudo apt-get dist-upgrade to install the latest versions of the ROS packages.

edit flag offensive delete link more

Comments

I had the exact same problem as bchr, and this solved it. I think this should be the accepted answer.

rand gravatar image rand  ( 2014-02-19 11:50:13 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-01-28 05:13:29 -0500

Seen: 2,529 times

Last updated: Feb 19 '14