Ask Your Question

How do I install openCV to work with ROS

asked 2013-08-18 19:19:56 -0600

u_will_neva_no gravatar image

updated 2013-08-21 02:24:08 -0600

Hi everyone, I have ROS Fuerte installed on ubuntu 12.0.4 and I would like to install openCV that is supported by ROS. Could someone point me in the right direction because I am confused with setting it up. Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-08-19 01:22:53 -0600

pkohout gravatar image

updated 2013-08-20 01:07:11 -0600

Hi, i have accomplished to use openCV in ROS.

I have installed opencv [],not sure if it is necesarry i had it on the pc before i intalled ros.

The vision_opencv is a "bridge" to use opencv with ros, for further information look and

And of course you need to tell ros that the package needs opencv to run/compile. So you need to include it into your CMakeList.txt (here i mean the CMakeList.txt in your package):

find_package(OpenCV REQUIRED)

target_link_libaries(your_node ${OpenCV_LIBS})

your_node is just a placeholder, there should be the name of your library or execution. If you are not so familiar with CMake, read on about the target_link_libaries/find_package macro. And you need to create a dependenc in your manifest.xml

<rosdep name="opencv2"/>

hope that helps you

edit flag offensive delete link more



Thanks for the reply. I noticed in my opt/ros/fuerte/stacks I have something called vision_opencv. Do I still need to install using the link you provided? Also, do I have to change 'your_node' to anything?

Also, what CMakeList.txt file are you referring to?

u_will_neva_no gravatar imageu_will_neva_no ( 2013-08-19 09:13:22 -0600 )edit

hope it is now more understandable

pkohout gravatar imagepkohout ( 2013-08-20 01:09:47 -0600 )edit

May i know what you mean by CMakeList.txt in your package?

mmmmhw gravatar imagemmmmhw ( 2016-03-29 08:11:26 -0600 )edit

Question Tools

1 follower


Asked: 2013-08-18 19:19:56 -0600

Seen: 30,935 times

Last updated: Aug 21 '13