Ask Your Question
0

How to make opencv and ROS work together?

asked 2012-02-11 13:08:33 -0500

metal gravatar image

updated 2012-02-12 00:09:02 -0500

dornhege gravatar image

I have been stuck on this issue for days .I am trying to access image using ros and then do simple opencv algorithms like canny edge.

I do cmake and when I rosmake this particular issue keeps rising from cv_bridge.H. "//usr/local/lib/libopencv_gpu.so.2.3: undefined reference to `cv::gpu::GpuMat::release()'"

I installed the CUDA driver and it says the same error again.What am I doing wrong here? I thought ROS and OPENCV are compatible but it does not seem like that seem that all.

Please share your perspective.

edit retag flag offensive close merge delete

Comments

Please do not shout.
ahendrix gravatar image ahendrix  ( 2012-02-11 13:59:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-02-11 14:01:19 -0500

ahendrix gravatar image

This is linking a problem with opencv, and the fact that you're using the CUDA libraries.

I suggest you implement your algorithm first without using GPU acceleration, evaluate its performance and then try to use the GPU only if you really need it.

edit flag offensive delete link more

Comments

I am really not interested in using GPU acceleration.Could you please tell me what changes I should do in order to avoid the CUDA problem.Is it a necessity for ros and opencv application?.If there is an other way you are certainly welcomed to share your perspective. thank you.
metal gravatar image metal  ( 2012-02-11 16:27:14 -0500 )edit
It may be that your installation of opencv is broken in some way. How have you installed ROS and opencv? Which linux distro are you using?
ahendrix gravatar image ahendrix  ( 2012-02-11 17:10:17 -0500 )edit
I installed opencv in the home folder and the programs in opencv are working very well.ROS electric sits in the home folder too and the ROS programs works perfectly fine (ros electric with the lastedt vision_opencv). I am working in ubnutu 10.10. I thought that CUDA is a pre-requiste for ros and opencv to work together.
metal gravatar image metal  ( 2012-02-12 04:29:21 -0500 )edit

If you've installed opencv into your home directory, that could definitely be causing this problem, since it looks like you're linking against a system install of opencv. Can you list or link to the exact steps you used to install opencv?

ahendrix gravatar image ahendrix  ( 2012-02-13 07:12:07 -0500 )edit

Thanks for your concern again.I did svn checkout of the opencv from sourceforge.net which brought the opencv in my home folder and then I had to go to sample code section where the cpp files are held and make it.The programs are working good..

metal gravatar image metal  ( 2012-02-13 18:58:40 -0500 )edit

Thanks for your concern again.I did svn checkout of the opencv from sourceforge.net which brought the opencv in my home folder and then I had to go to sample code section where the cpp files are held and make it.The programs are working good..

metal gravatar image metal  ( 2012-02-13 18:58:43 -0500 )edit

An other thing ROS-ELECTRIC has vision_opencv in its stacks.It has the CV_BRIDGE and other files.

metal gravatar image metal  ( 2012-02-13 19:07:04 -0500 )edit

I'm guessing that you have opencv installed twice, and that's it's causing problems. What is the output from 'dpkg -l libopencv*' ? Why don't you have ROS and opencv installed from debs?

ahendrix gravatar image ahendrix  ( 2012-02-14 06:29:55 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-02-11 13:08:33 -0500

Seen: 1,004 times

Last updated: Feb 12 '12