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

a way to use an arbitary stack

asked 2012-04-02 04:40:32 -0600

moyashi gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-04-02 05:21:30 -0600

Mac gravatar image

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.

edit flag offensive delete link more
0

answered 2012-04-02 14:45:21 -0600

moyashi gravatar image

Thank you for your kind answer ! I could #include <opencv2 opencv.hpp=""> !

In this case, I don't need to install OpenCV alone ?

Actually I've already installed OpenCV(OpenCV2.2) alone and I could not find how to uninstall it. If possible, I'd like to uninstall OpenCV I've installed before and I'd like to use OpenCV with only the package, opencv2.

But, I can not find any source codes under vision_opencv/opencv2. There are only Makefile, ROS_NOBUILD and manifest.xml.

Where are source codes? Can I uninstall OpenCV I've installed before? If possible, how do I uninstall it? (I could not "make uninstall" in the OpenCV-2.2 directory... and any info about how to uninstall OpenCV could not found.)

edit flag offensive delete link more

Comments

A complete answer to this is...complicated. You can use OpenCV via rosdep (installing it using your package manager), or using the package. Broadly speaking, rosdep is a better choice, but it's also more complicated.

Mac gravatar image Mac  ( 2012-04-03 06:17:45 -0600 )edit

Question Tools

Stats

Asked: 2012-04-02 04:40:32 -0600

Seen: 614 times

Last updated: Apr 02 '12