[ros-users] Setup guide of uvc_stereo in ros

Ken Tossell ktossell at umd.edu
Mon Jan 10 17:34:33 UTC 2011


[Question about linking for shared libraries*]

Hi,

I'm not sure there's any completely standard way to install
third-party stacks right now, but I see you have umd-ros-pkg installed
as /opt/ros/cturtle/stacks/umd-ros-pkg. That should be fine.

You should be able to run "roscd camera_info_manager" and "roscd
uvc_camera". If those work, "rosmake uvc_camera" should build all of
the nodes and nodelets. No roscreate-pkg usage is necessary. I'm not
sure why the linking error is occurring only for the nodelet library.

[*] Does anyone know what could be causing this:

""
make[3]: Entering directory
`/opt/ros/cturtle/stacks/umd-ros-pkg/camera_umd/uvc_camera/build'
  Linking CXX executable ../bin/camera_node
  make[3]: Entering directory
`/opt/ros/cturtle/stacks/umd-ros-pkg/camera_umd/uvc_camera/build'
  Linking CXX shared library ../lib/libnodelet_uvc_camera.so
  /usr/bin/ld: cannot find -lcamera_info_manager
  collect2: ld returned 1 exit status
""

? Notice that camera_node builds fine even though it also uses
libcamera_info_manager. The uvc_camera package depends on the
camera_info_manager package, which has the following in its manifest:

 20   <export>
 21     <cpp cflags="-I${prefix}/include"
 22          lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib
-lcamera_info_manager"/>
 23   </export>

It's as if the -l flag is getting passed to the nodelet build but the
-L is not. I don't have this problem on my installations, though --
either for c-turtle or for unstable.

uvc_camera's CMakeLists.txt:

""
rosbuild_add_library(nodelet_uvc_camera src/nodelets.cpp
src/camera.cpp src/stereo.cpp src/uvc_cam.cpp)

rosbuild_add_executable(camera_node src/camera_node.cpp src/camera.cpp
src/uvc_cam.cpp)
""

 - Ken



More information about the ros-users mailing list