0
$\begingroup$

Rosanswers logo

Hello. I'm new for ROS. I have a question about how to use and implement a stack.

I've already read all of the tutorials of ROS. But I couldn't find the way to implement an arbitrary stack.

For instance, I'd like to use an OpenCV with ROS.(My PC has NOT been installed OpenCV) In this case, first I install ROS(electric). Second, I get the stack, vision_opencv via internet. Next, what should I do?

Sorry for my beginner's question. Thanks in advance.


Originally posted by moyashi on ROS Answers with karma: 721 on 2012-04-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There's a vital, but subtle, distinction between a package and a stack. It goes like this: a stack is an installation-level construct, while a package is a user-level construct.

That is: a package never "uses" a stack: it only uses other packages. Groups of packages that "belong together" are distributed as stacks.

To have one package use another, you add the appropriate <depend> tag to your manifest.xml; you can then #include headers provided by the package you're using, link against libraries, and so on.

For the specific example of OpenCV, you want to add

<depend package="opencv2"/>

to your package's manifest.xml, and then you can use OpenCV just as if you'd installed the library and dealt with the various compile flags yourself.


Originally posted by Mac with karma: 4119 on 2012-04-02

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.