Ask Your Question
1

How can use external library in ros.

asked 2014-08-12 01:37:11 -0500

pjnsoo gravatar image

I want to use POCO library within my package. I followed this manual http://wiki.ros.org/UsingThirdPartyLi... but it was not successful.

I tried to add find_package(poco REQUIRED) to CMakeLists.txt but cmake can't find it.

Would you please help me to add POCO to my project.

edit retag flag offensive close merge delete

Comments

Maybe it might be a good idea to find out if what you'd like to do is handled by http://wiki.ros.org/pluginlib .

dornhege gravatar image dornhege  ( 2014-08-12 03:39:59 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-08-12 01:59:13 -0500

ahendrix gravatar image

The class_loader package uses Poco. Perhaps you can use it as a template?

It looks like they have a cmake directory and a PocoConfig.cmake which describes where to find the Poco libraries, and a dependency on libpoco-dev in their package.xml

edit flag offensive delete link more
0

answered 2014-08-13 01:31:15 -0500

Artem gravatar image

You can find some related questions here http://answers.ros.org/question/11051... and here http://stackoverflow.com/questions/16...

Following their advice and ahendrix answer I did the following on my Mac and it worked 1) Downloaded https://github.com/ros/class_loader/b... to somewhere on your disk 2) Added the following lines to CMakeLists.txt of your project

set(Poco_DIR _path_) # replace _path_ with a path to PocoConfig.cmake that you downloaded before

find_package(Poco REQUIRED COMPONENTS Foundation Net Netd XML XMLd) # add other components here

catkin_package(DEPENDS Poco)

include_directories(${Poco_INCLUDE_DIRS})

target_link_libraries(node_name ${Poco_LIBRARIES}) #replace node_name with the name of your project/node

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-12 01:37:11 -0500

Seen: 1,870 times

Last updated: Aug 13 '14