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

Using other library in ros node

asked 2017-02-07 22:30:56 -0500

jason gravatar image

Hello, I am new to ROS and have browsed the beginner tutorial. I have installed ros on Raspberry Pi(the beta is developed by Emlid). Now I want to write a new node to control the raspberry pi camera, to take images, to use opencv analyze the image data. What should I do to use the raspicam-0.1.4 librarylink text in ros? I have seen that to use opencv in ros on this pagelink text, are these two similar? Just need to modify the CMakeLists.txt to

target_link_libraries(my_awesome_library ${Raspicam_LIBRARIES})


target_link_libraries(my_awesome_library ${Raspicam_LIBRARIES})

edit retag flag offensive close merge delete


ahendrix gravatar image ahendrix  ( 2017-02-07 23:43:39 -0500 )edit

I tried to follow the their tutorial. But there ros is kinetics while mine is indigo, and there is an error when I run

rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

and the error "Unable to locate package ros-kinetic-camera-info-manager"

jason gravatar image jason  ( 2017-02-08 13:07:46 -0500 )edit

If you're using indigo instead of kinetic, you shouldn't tell rosdep that you're using kinetic. Use indigo in that command instead: rosdep install --from-paths src --ignore-src --rosdistro=indigo -y

ahendrix gravatar image ahendrix  ( 2017-02-08 17:50:53 -0500 )edit

when I run it, the error:

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies:

raspicam_node: No definiton of [camera_info_manager] for OS [debian]

jason gravatar image jason  ( 2017-02-08 18:20:43 -0500 )edit

Does this command relate to using rosdep for third party library? I have browsed that part, but because my knowledge is limited, i am confused, have no idea how to use rosdep

jason gravatar image jason  ( 2017-02-08 18:22:26 -0500 )edit

If you're using indigo instead of kinetic, you shouldn't tell rosdep that you're using kinetic

just an FYI (@jason): if you already have sourced a setup.bash file, you don't even need to use --rosdistro=.., as it will use the value of $ROS_DISTRO.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-09 01:27:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-16 15:55:06 -0500

jason gravatar image

Finally I figured out how to make it work. You need to edit the cmakelists.txt according to the directory where the library is and the cmakelist and readme file of that library. Maybe easy for those who are familiar with cmakelist, but really not for those who are not.

edit flag offensive delete link more


Thanks gvdhoorn and ahendrix for the advices

jason gravatar image jason  ( 2017-02-16 15:56:00 -0500 )edit

Question Tools



Asked: 2017-02-07 22:30:56 -0500

Seen: 350 times

Last updated: Feb 16 '17